Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1003415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:58:37+00:00 2026-05-16T07:58:37+00:00

Whats wrong wrong with this query please correct me on this syntactcally it’s going

  • 0

Whats wrong wrong with this query please correct me on this syntactcally it’s going wrong please correct me on this how to concatenate this

string cmd = "SELECT * 
                FROM [tbl_students] 
               WHERE course_id=@courseId 
                 AND branch_id IN ("+branchId+") 
                 AND (@passoutYear is null or passout_year>=@passoutYear) 
                 AND (@currentBacklog is null or current_backlog<=@currentBacklog)
                 AND gender=@sex 
                 AND (@eGap is null or gapin_education<=@egap)
                 AND (@firstYrPercent is null or first_yea_percent>=@firstYrPercent
                 AND (@secondYrpercent is null or second_year_percent>=@secondYrPercent)
                 AND (@thirdYrPercent is null or third_year_percent>=@thirdYrPercent)
                 AND (@finalYrpercent is null or final_year_percent>=@finalYrpercent)
                 AND (@currentDegreePercentage is null current_degree_percent>=@currentDegreePercentage)
                 AND (@highSchoolPercentage is null high_school_percentage>=@highSchoolPercentage)
                 AND (@higherSchoolPercentage is null higher_school_percentage>=@higherSchoolPercentage)
                 AND (@graduationPercent is null graduation_percent>=@graduationPercentage)
                 AND (@diplomaPercentage is null diploma_percentage>=@diplomaPercenage)
                 AND (@noOfAtkt is null or no_of_atkt<=@noOfAtkt)
                 AND (@date is null or date_of_birth>=@date)";
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T07:58:38+00:00Added an answer on May 16, 2026 at 7:58 am

    I think I got it.

    Are you getting an error while trying to COMPILE the code, as opposed to running the SQL query?

    I’m going to bet that you’re using C#, and that you should do multi-line strings with an @-symbol before the “-symbol. Such as this:

    string blabla = @"
         hello
         there
    ";
    

    Then of course you need it also when you open up the string after branchId

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone tell me whats wrong with this MySQL query ? select distinct(a.productId) from
Can any one please suggest me whats the wrong with my query. SELECT SUM(cCallDuration),
What is wrong with this query, please let me know. From the inner query
whats wrong with this? anybody help me please.. if(stripos($nerde, $hf) !== false) && (stripos($nerde,
Can someone please tell me whats wrong with this code. I'm not getting complete
Could someone point me whats wrong with this code please? I'm having a very
can someone please tell me what is wrong with this query? $sql = INSERT
I want to create a database query string which should be like this, (SELECT
Can you please check this mysql query and maybe help with what's wrong with
what wrong with this Query ??? i need this Query. UPDATE user_preferences SET user_preferences_value

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.