Viewing 15 posts - 46,051 through 46,065 (of 59,095 total)
If the following formula results in zero, the data was entered today, regardless of time...
SELECT DATEDIFF(dd,datecolumn,GETDATE())
--Jeff Moden
Change is inevitable... Change for the better is not.
January 8, 2009 at 10:11 pm
DavidB (1/8/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
January 8, 2009 at 10:04 pm
Lynn Pettis (1/8/2009)
Amazing, isn't it? Three days ago I scraping ice off my car, today I walked at lunch without a jacket!
Amazing, isn't it? For the last 3...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 8, 2009 at 9:18 pm
You'll like this... takes just seconds to run on a half million rows... of course, you'll need to change #YourTable to your actual table name. For future...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 8, 2009 at 9:06 pm
gvsriramakrishna (1/8/2009)
480002 rows
I'll be right back...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 8, 2009 at 8:46 pm
SQLMAIN (1/8/2009)
May be a minute or so.
That would be about right for 15M rows.
Just a bit of caution, though... make sure you follow ALL the instructions in the article. ...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 8, 2009 at 8:25 pm
On the flip side, you can get the machine name and maybe go from there...
SELECT HOST_NAME()
--Jeff Moden
Change is inevitable... Change for the better is not.
January 8, 2009 at 8:21 pm
I can't help getting the feeling that was homework and the OP didn't try.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 8, 2009 at 8:17 pm
Micheal Young (1/8/2009)
1. If there are queries that use...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 8, 2009 at 8:06 pm
Why not just map a drive on each server and use the same drive letter on each server?
--Jeff Moden
Change is inevitable... Change for the better is not.
January 8, 2009 at 7:39 pm
roy vagner (1/8/2009)
what is better for performance?
Leave the table like that or divide it for 2 or 3...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 8, 2009 at 6:58 pm
Either of the following will meet your requirements... ๐
SELECT MIN(RowNum)+1
FROM dbo.JbmTest
WHERE RowNum+1 NOT IN (SELECT RowNum FROM dbo.JbmTest)
SELECT MIN(RowNum)+1
FROM dbo.JbmTest...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 8, 2009 at 6:51 pm
gvsriramakrishna (1/7/2009)
Seems the query is taking a while to execute. I tried it for 20minutes.. not have seen any output.
Does this have any performance dependancy on the size of...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 8, 2009 at 6:25 pm
Chris Morris (1/8/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
January 8, 2009 at 6:24 pm
Fรกbio (1/8/2009)
Thank you also Jeff, how could I not think about referencing the table twice :blink:
You were probably thinking about alligators, instead... ๐
--Jeff Moden
Change is inevitable... Change for the better is not.
January 8, 2009 at 11:35 am
Viewing 15 posts - 46,051 through 46,065 (of 59,095 total)