Viewing 15 posts - 961 through 975 (of 1,413 total)
Then we would be pretty sure that the design was probably not the best one. And the performance of the -- admittedly more manageable -- query that PW supplied would...
April 18, 2005 at 1:38 am
Yes, 1 byte is always needed to store bit columns, even if there is only one column. However, if there are more than one bit column on a table they...
April 15, 2005 at 8:25 am
Something like this?
SELECT Address, MAX([Date])
FROM dbo.foobar
GROUP BY Address
UNION ALL
SELECT foobar.Address, MAX([Date])
FROM dbo.foobar
INNER JOIN (
SELECT Address, MAX([Date]) MaxDate
FROM dbo.foobar
GROUP BY Address
) exclude
ON foobar.Address...
April 15, 2005 at 12:49 am
Eh, you misunderstood me. My example code using WAITFOR DELAY was only for getting time to test if an implicit transaction was takingg place or not. Several messages in this...
April 14, 2005 at 1:06 pm
I'll just add the usual response: http://www.sommarskog.se/dynamic_sql.html
Everything you need can be found there, including an explanation of why this is normally not a good idea, just as Remi points...
April 14, 2005 at 12:59 pm
SUSER_SNAME() returns the name of the login that the user is connected to the database with. If you are using SQL Server authentication it will return the SQL Server login...
April 14, 2005 at 6:55 am
>However, if you are stuck with this design, what about one of these?
...
>Result is always : 30
Yes, they all evaluate to the same execution plan. Which is almost the same...
April 14, 2005 at 5:03 am
It does not work that way. Transactions are written to the log file when they occur, and then written to the data file(s) at 'regular' intervals (during checkpoints). There is...
April 14, 2005 at 12:50 am
True, but at least for this example that would have much worse performance, since it would require three scans as opposed to one.
April 14, 2005 at 12:38 am
And just add the MAX aggregate function around the CASE if that is what you were looking for.
April 13, 2005 at 3:13 pm
Is it just for 1 row, or is it the aggregate MAX function you are talking about?
For 1 row:
SELECT
CASE WHEN ScheduleTime1 > ScheduleTime2 THEN
CASE WHEN...
April 13, 2005 at 3:05 pm
Kenneth, could you elaborate on the following?
>Each delete must be within it's own transaction. As written, all is one giant implicit tran, thus locks and resources would be held for...
April 13, 2005 at 8:55 am
Viewing 15 posts - 961 through 975 (of 1,413 total)