Viewing 15 posts - 5,821 through 5,835 (of 6,036 total)
If we are talking about eyes, I would put this in UDF and never see it again.
Of course inside UDF I would choose most effective code, no matter how ugly...
November 14, 2005 at 10:47 pm
Yes, you made big effort, you are good educated, you even know who was Aristotel,
but you are just mising the point.
Hope...
November 14, 2005 at 8:24 pm
"count(order_total)" will count 2 identical values as 2, not 1.
It will not count rows where order_total IS NULL.
I believe idea of
where convert(char(10),txndatetime, 126) <= convert(char(10), @EndDate,126)
and convert(char(10),txndatetime, 126)...
November 14, 2005 at 7:14 pm
2 Carl
Did you open the link?
Your mistake is very common.
Comparing (Null = Null) returns FALSE, that's why lines with inv.InvID = NULL will not be included in resultset by NOT IN...
November 14, 2005 at 3:56 pm
These queries are not equal, they potentially return different results.
See http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=236443
November 14, 2005 at 1:54 pm
Because of "Create Index ..." following.
November 14, 2005 at 6:31 am
Make the function deterministic and set index on it.
DROP TABLE X
CREATE TABLE X(XID INT IDENTITY(1,1) NOT NULL PRIMARY KEY,
XCALCULATED AS CHAR((XID/26000)%26+65) --1st Letter
...
November 14, 2005 at 4:41 am
Functions HOST_NAME ( ), System_User, Current_User could be useful as well.
November 13, 2005 at 4:55 pm
If you want to kill server performance, increase response time dramatically, make the number of timeout errors unacceptable and finally get fired you definetely should use cursors in triggers.
November 13, 2005 at 3:58 pm
So, the expected result must be
01.01.05 01 09:00 11:00 ?
November 13, 2005 at 3:02 pm
Don't use this option:
WHERE
DATEDIFF(DAY, review_date, GETDATE()) >= 7
It eliminates index on review_date and causes table (or clustered index) scan.
Really bad for performance.
First option is much better.
November 13, 2005 at 2:43 pm
How can I understand from the data you provided which line means what?
01.01.05 01 08:00 09:00
01.01.05 01 11:00 12:00
look absolutely the same way for me and my SQL Server.
Why one...
November 12, 2005 at 3:15 pm
It's by definituion of NULL.
NULL means "don't know".
So, it's nether IN nor NOT IN.
For your task it's better to use LEFT JOIN.
November 10, 2005 at 4:50 pm
If you want to get value "from Control panel" you must read registry.
Anything else will give you settings of SQL Server, whatever else, they could be the same, could be...
November 10, 2005 at 3:52 pm
Viewing 15 posts - 5,821 through 5,835 (of 6,036 total)