1.Could anyone tell me if I were to use the OPTION FAST(x) in an SQL query (where x is a number smaller then the total number of rows returned by the query) would it be of any help if i use that query in ASP.NET to fill a dataset ?
For as much as i know a dataset is completly filled with the data and then it is displayed
2. I have a query that sounds like this:
select * from Media where Description like @Value and convert(char(10),ShootingDate,110) =@BeginDate
The problem is that if leave the @Value blank () and @beginDate is a date found in the table there are no results returned.
If I use "or" instead of "and" and I give @Value a value and @Begindate a date it returns all the rows that match the date without looking at the @Value !
The question is: Can I create a query that checks for both @Value and @BeginDate and if one is missing to check only for the one given ? And how ?
10x
For as much as i know a dataset is completly filled with the data and then it is displayed
2. I have a query that sounds like this:
select * from Media where Description like @Value and convert(char(10),ShootingDate,110) =@BeginDate
The problem is that if leave the @Value blank () and @beginDate is a date found in the table there are no results returned.
If I use "or" instead of "and" and I give @Value a value and @Begindate a date it returns all the rows that match the date without looking at the @Value !
The question is: Can I create a query that checks for both @Value and @BeginDate and if one is missing to check only for the one given ? And how ?
10x
Last edited by a moderator: