Viewing 15 posts - 5,776 through 5,790 (of 6,036 total)
I told you to search
between 1.11.2005 and 3ms before 1.12.2005.
What's wrong with this approach?
Another way is
>= 1.11.2005 and < 1.12.2005
Why you don't like these?
And...
_____________
Code for TallyGenerator
November 24, 2005 at 1:43 pm
Never use
where DAY(datecol) between !!!
Unless your table not gonna exceed 100 rows.
This option of WHERE clause eliminates all indexes, it gonna be full table scan.
_____________
Code for TallyGenerator
November 24, 2005 at 1:37 pm
By
SELECT DateAdd(day,-1,DateAdd(month,DateDiff(month,0,getdate())+1,0))
you miss last day of the month
SELECT DateAdd(ms,-3,DateAdd(month,DateDiff(month,0,getdate())+1,0))
will be better
_____________
Code for TallyGenerator
November 23, 2005 at 6:09 pm
Ask your sysadmin what did he changed in access rights last week.
There are possibly 3 different accounts:
SQL Server started;
SQL Server Agent started;
Your local your Command Prompt started.
Find out all 3...
_____________
Code for TallyGenerator
November 23, 2005 at 2:59 pm
If you look at my post again you may notice that on real server the query with UDF took 6 (six) seconds, and query with built-in functions took 10 (ten)...
_____________
Code for TallyGenerator
November 23, 2005 at 1:44 pm
Did you notice? This is a forum about transactional SQL.
What "object of the class" in T-SQL are you talking about?
_____________
Code for TallyGenerator
November 23, 2005 at 3:40 am
What I've tried:
CREATE TABLE #Var (id int IDENTITY(1,1), col1 varchar(10))
declare @I int
set @I = 0
while @I < 100000
BEGIN
INSERT INTO #Var VALUES ( '000H.K6' )
INSERT INTO #Var VALUES...
_____________
Code for TallyGenerator
November 22, 2005 at 9:39 pm
Did you ACTUALLY try it?
Don't fool yourself with scaring trace.
Switch off trace and run simple select from big table, one time with UDF, second time with, say, ISNULL.
I have...
_____________
Code for TallyGenerator
November 22, 2005 at 7:11 pm
Can be???
I don't see any real solution in this topic except mine.
![]()
_____________
Code for TallyGenerator
November 22, 2005 at 5:55 pm
Same way as REPLACE, ISNULL functions.
But you don't worry about those function, so why do you about this one?
Try it first, than say. ![]()
_____________
Code for TallyGenerator
November 22, 2005 at 5:52 pm
It will be fast.
There are no disk operations inside of this function, so you probably would not notice the difference.
_____________
Code for TallyGenerator
November 22, 2005 at 5:46 pm
Why not just create a fuction?
Supply your string as a parameter, create WHILE LEFT(@InputString, 1) = '0'...
inside of the function and use result of the fuction in your select.
P.S. I...
_____________
Code for TallyGenerator
November 22, 2005 at 5:37 pm
Insert list of queried produxct to temp table #QProduct
SELECT CustomerId
FROM Customer C
Inner join CustomerProduct CP on CustomerId = CP.CustomerId
Inner join Product P on P.Productd = CP.ProductId
Inner...
_____________
Code for TallyGenerator
November 22, 2005 at 1:58 pm
But what if @LastId become not really last Id before you start this statement?
If another process inserted 1 row in the table in the moment between retrieving of @LastId and...
_____________
Code for TallyGenerator
November 22, 2005 at 1:25 pm
And "CREATE TABLE ..." would be useful.
_____________
Code for TallyGenerator
November 22, 2005 at 4:11 am
Viewing 15 posts - 5,776 through 5,790 (of 6,036 total)