Viewing 15 posts - 20,461 through 20,475 (of 26,484 total)
This is whate of Sergiy's suggestions would look like:
select
ma.memid,
ma.attributeid,
ma.thevalue,
ma.effdate,
ma.termdate,
...
June 10, 2009 at 6:58 pm
FYI, It is always a good idea to test any code you provide in a sandbox database to ensure it works correctly. We are volunteers on this site, and...
June 10, 2009 at 6:38 pm
Still waiting. We are here to help, but we need your assistance to do that.
June 10, 2009 at 6:32 pm
WayneS (6/10/2009)
A reader of my article today asked a very good question that I'm not sure what the answer would be. I'm hoping that someone along the likes of...
June 10, 2009 at 6:26 pm
Lynn Pettis (6/10/2009)
jcrawf02 (6/10/2009)
Lynn Pettis (6/10/2009)
We have our White House Window Washer, our PhD Candidate, our True-Relational Zealot. Do we call this one, The One Who Can't, or...
June 10, 2009 at 6:16 pm
True, Barry, the code I provided was very basic for generating dynamic sql.
Thank you for pointing out the need to do more regarding sql injection.
June 10, 2009 at 6:13 pm
Please do not cross post. It simply fragments any responses you may recieve.
Please post replies here.
June 10, 2009 at 4:31 pm
Here is how I would code it.
Tried posting directly, but couldn't so it is posted as an attachment.
June 10, 2009 at 4:02 pm
You are missing the point. You can't pass in the table name as a parameter to the dynamic sql in the sp_executesql. You can pass in variables where...
June 10, 2009 at 3:51 pm
May be the only way to clean up the files, sorry.
I use either SSMS or UltraEdit when writing my SQL code, so I don't run into this problem.
June 10, 2009 at 3:34 pm
Your first code block actually has the proper start. You just need to move the SET of the variable of the table above the SET for the strSQL command.
I...
June 10, 2009 at 3:06 pm
First, don't use wordpad as a text editor.
Second, exactly how did you save the files? Are you sure you saved tham as full fledge text files?
June 10, 2009 at 2:58 pm
You have to complete the variable substitution where you are building the SQL command, not in the call the sp_executesql.
June 10, 2009 at 2:48 pm
jcrawf02 (6/10/2009)
Lynn Pettis (6/10/2009)
Okay, venting...We have our White House Window Washer, our PhD Candidate, our True-Relational Zealot. Do we call this one, The One Who Can't, or Won't, Read?
Too...
June 10, 2009 at 2:34 pm
Brian Ferguson (6/10/2009)
By adding a c:\mssql folder (did not have one on my system) AND changing the the data file folder to...
June 10, 2009 at 2:31 pm
Viewing 15 posts - 20,461 through 20,475 (of 26,484 total)