Skip to main content

Currently we have the following where clause for the database connection which works well:

image 

Need to add additional parameter which is transactiondate]= CONVERT (date, GETDATE()) . Tried the following but no results returned:

pPartDate]= CONVERT (date, GETDATE()) AND Dtransactiondate]= CONVERT (date, GETDATE()).

Ran in SQL and for sure there are data based on the above where statement. Please let me know what did i do wrong. Thanks.

You can combine any two predicates with AND and OR. In addition, you can use the NOT keyword to specify that the search condition that you want is the negated value of the specified search condition. To pass multiple parameters, we love language test will use “&” symbol to separate the other field and value combinations. On button click (from code behind), redirect to another page with two QueryString parameters. Now this example has two parameters or variables.Here we'll study how can we check multiple conditions in a single if statement. This can be done by using 'and' or 'or' or BOTH in a single statement. and comparison = for this to work normally both conditions provided with should be true. If the first condition falls false, the compiler doesn't check the second one.


Reply