Viewing 15 posts - 12,931 through 12,945 (of 15,381 total)
Post back if you have problems. I suspect when you dig through his article you will see how to utilize this against your proc (hint cross apply the function)....
February 24, 2012 at 1:34 pm
Take a look at the string splitter link in my signature. It is exactly what you need.
February 24, 2012 at 1:19 pm
Like this?
select top 1
A.productID,
B.surrogateID2,
C.description
from
#tableB as B
INNER JOIN #tableA as A on b.surrogateID1 = a.surrogateID1
INNER JOIN #tableC as C on b.surrogateID2 = c.surrogateID2
where
b.surrogateID1 = (select max(b2.surrogateID1)
...
February 24, 2012 at 11:58 am
You are welcome. Glad that worked for you. The code blocks especially are useful since it does a decent job of even keeping the color coding. We always appreciate the...
February 24, 2012 at 7:58 am
Nice job posting your desired output and what you have tried so far. Unfortunately there is little anybody can do without ddl (create table scripts) and sample data (insert statements)....
February 24, 2012 at 7:32 am
mckennap (2/24/2012)
February 24, 2012 at 7:29 am
mckennap (2/23/2012)
February 23, 2012 at 3:46 pm
Like Craig said, it is nearly impossible with the underlying tables to figure this out.
I would suggest taking it out of the dynamic sql and see if the actual code...
February 23, 2012 at 3:28 pm
rabisco (2/22/2012)
Each trip through your cursor it will update the ENTIRE table if @prereplace is null.
More than anything else there is no need for a cursor. I will ask again...
February 22, 2012 at 3:55 pm
I hope you have better names than Function1, @parameter1, Table1 etc...
Seems like just about every table has NOLOCK and is using index hints. How come?
In case you never read about...
February 22, 2012 at 2:21 pm
From looking at this scaled down example I don't understand why you need a cursor and dynamic sql at all. It is just two insert statements.
February 22, 2012 at 7:30 am
rabisco (2/21/2012)
derek.colley (2/21/2012)
February 21, 2012 at 12:22 pm
gary.morey (2/21/2012)
February 21, 2012 at 8:36 am
If you want some real help with please read the first link in my signature. It will explain how to ask questions and what kind of information to post.
February 21, 2012 at 8:30 am
gary.morey (2/21/2012)
February 21, 2012 at 8:20 am
Viewing 15 posts - 12,931 through 12,945 (of 15,381 total)