Viewing 15 posts - 1 through 15 (of 54 total)
CELKO (11/19/2012)
Actually #Table2 has the date, but as its only to the minute, there are duplicates - and the order of TEXT2 does not help - see the last...
November 20, 2012 at 1:32 am
thava (11/19/2012)
dwain.c (11/15/2012)
... SNIPWhere the code says AND b.aDate >= c.aDate, try making that AND b.aDate > c.aDate and run it both ways.
... SNIP
just by curiosity the last...
November 19, 2012 at 6:16 am
Actually #Table2 has the date, but as its only to the minute, there are duplicates - and the order of TEXT2 does not help - see the last few lines...
November 16, 2012 at 8:42 am
Thanks Dwain and very useful - quicker than my cursor, and it gets the same results.
November 16, 2012 at 6:37 am
And posting that CURSOR just got me promoted to 'SSC-Enthusiastic'
The Irony :rolleyes:
November 15, 2012 at 9:15 am
OK so this may not be possible to get exact results in T-SQL, because, as pointed out above, there is no default sort, but here is the solution I'm going...
November 15, 2012 at 9:12 am
drew.allen (11/15/2012)
November 15, 2012 at 8:18 am
I'll try to express it better - but I'm beginning to think its a procedural not a set-based problem.
Take a row from #Table1
Match the first row (Minimum Date) in...
November 15, 2012 at 8:16 am
Brilliant, and it runs on the full-sized table in only 4 seconds.
Thank-you. Problem solved.
November 5, 2012 at 5:24 am
I tried this as I have SSMS 2005 and SSMS 2008 R2 installed on the same machine.
opening SSMS 2005, I CAN connect to the 2008 R2 database.
When I check database...
October 9, 2012 at 2:33 am
After extensive search of MSDN and BOL, I (incorrectly) came to the conclusion that the only way to change the frequency was by scheduling a job to update stats.
Some obscure...
October 9, 2012 at 2:00 am
The dbo prefixing thing seemed to be a problem after changeover from SQL 2000 to SQL 2005, though what it was, I've forgotten.
I've always thought it is generally good practise...
October 2, 2012 at 4:54 am
Jeff Moden (10/1/2012)
t.brown 89142 (10/1/2012)
You would substitute your date column names
SELECT CAST(CONVERT(VARCHAR(10), StartDate, 120) + ' 12:00:00' AS...
October 1, 2012 at 7:54 am
OK this is getting a little difficult to work out.
Just so we're working to the same definitions:
12AM is midnight SQL time '00:00:00' , 12PM is noon SQL time '12:00:00'
Also...
October 1, 2012 at 2:31 am
I couldn't glean any meaning out of the data at first - but now I realise it was stock price data! - probably way out of date now...
October 1, 2012 at 2:17 am
Viewing 15 posts - 1 through 15 (of 54 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy