|
Prev: Need Ideas for SQL Query
Next: SP performance problem
From: todtown on 21 Jul 2008 15:56 I have a query that needs to return only if there are records that match the criteria. My current query is something like this: SELECT MAX(RECORD_DATE),RECORD_NAME FROM TABLE_NAME WHERE RECORD_DATE >= '7/21/2008' /*Today's Date*/ GROUP BY RECORD_NAME The problem is that there can be thousands of records. The query can often time out. And all I need to know is if there are any records. If there is even one that's all I need to know. Could somebody help me with this one? tod
|
Pages: 1 Prev: Need Ideas for SQL Query Next: SP performance problem |