Viewing 13 posts - 1 through 13 (of 13 total)
Temporary table created through Execute statement by dynamic query cannot be accessed outside.
Here Table #tempFinal and #tempFinalOD is created by dynamic query.
To solve this issue first create these tables...
October 20, 2012 at 6:57 am
Please provide table structures and the the output you want clearly. Then only someone can suggest something.
October 20, 2012 at 5:22 am
you can use XML PATH to get the result
October 9, 2012 at 11:10 am
You can use XML PATH for the inverse function in which input is table of string and output is comma seperated value.
October 7, 2012 at 12:34 pm
You can do like this also
INSERT INTO Tablename( COLUMNName )
VALUES ( 0 ),(1),(2)......(1000)
September 28, 2012 at 1:59 am
This depends on your use as table variable have scope to there batch only as temporary tables have scope to their calling procedure.
July 22, 2012 at 9:21 am
Your question is not clearly explained but what i understand is you want difference of SUM([YTDDifferenceActivity]) between both periods.But in both the queries only period is different and SUM([YTDDifferenceActivity]) is...
July 22, 2012 at 8:58 am
For debugging purpose comment all the joins except first two joins and see the result, is it returning all the rows, if yes then uncomment 3rd join also and see...
July 19, 2012 at 6:35 am
If you want to see the data inserted in the table(#tbl_casualty) and want to use that data.
Then you can create a temp table outside the procedure and inside the procedure...
July 12, 2012 at 11:49 am
Not only SUBSTRING other things are also there like CHARINDEX,PATINDEX,LEFT,RIGHT,TRIM etc by which you can format the string.
May 4, 2012 at 11:32 am
Instead of writing the code at every Insert, Update or Delete Sql provides an automatic functionality triggers which gets called automatically when any of these three operations performed.
Views are also,...
May 3, 2012 at 11:30 am
I think this code will work for u.
Select r1.*,r4.Name+ '/' + r3.Name + '/' + r2.Name + '/' + r1.Name
From Roots r1
Inner Join Roots r2 on r1.ParentId=r2.ItemId
Inner Join Roots r3...
May 1, 2012 at 5:21 am
Viewing 13 posts - 1 through 13 (of 13 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