Viewing 8 posts - 16 through 23 (of 23 total)
Hi,
You can write like this:
If(your condition)
SET @result=1
ELSE
SET @result=0
OR
IF(your condition)
SELECT @result=1
ELSE
SELECT @result=0
July 20, 2010 at 2:31 am
Eugene,
I have applied necessary changes in query.
If I removed below code from sql query then query executed in 2 seconds.
,str_SourceID=STUFF(( SELECT ','+ str_SourceOfData FROM tbl_MARC_MemberSourceData MSD,tbl_MARC_SourceMaster SM
WHERE MSD.fk_MemberId =...
July 19, 2010 at 6:36 am
Hi,
Index temp tables and table variable are stored in tempdb.
Less resources required for table variable as compared to index temp tables. that's it.
July 19, 2010 at 5:10 am
Hi,
I know table variable allocating less resources as compared to index temp tables and also it stored in temp db.
But how to improve below query. it's taking more than one...
July 19, 2010 at 4:53 am
Hi,
1: #test table will allocate resources and it's stored in tempdb.
2: You can alter variable at runtime to #test and also create Clustered and other indexes as well.
3: Use table...
July 19, 2010 at 4:23 am
Hi,
1: #test table will allocate resources and it's stored in tempdb.
2: You can alter variable at runtime to #test and also create Clustered and other indexes as well.
3: Use table...
July 19, 2010 at 4:22 am
Hi,
Thanks for reply but some problems are
#2: Indexed temp table allocating resources in temp db as compared to table variable.
#4 & 5: TOP 1 used two times because one member...
July 19, 2010 at 3:51 am
Hi,
Why you are using cursors? it's degrade the performance of sql query and also consuming memory..
Use while loop instead of cursor. You can see the dramatic performance... In while loop...
July 17, 2010 at 11:52 pm
Viewing 8 posts - 16 through 23 (of 23 total)