Viewing 15 posts - 271 through 285 (of 370 total)
GilaMonster (10/1/2011)
Let's say, while you're on vacation the junior developer has to make a change and he can't figure out how to get that sp_executesql working again, so he changes...
October 1, 2011 at 1:37 pm
Lexa (10/1/2011)
GilaMonster (10/1/2011)
Lexa (10/1/2011)
codebyo (10/1/2011)
'sp_executesql' will do that for you.
codebyo, what exactly do you mean by it will do that for you? If a '; drop table --' command...
October 1, 2011 at 1:32 pm
Or maybe I'm just making a big confusion or haven't understood clearly. Thank you for your advices. π
Best regards,
October 1, 2011 at 1:03 pm
GilaMonster (10/1/2011)
codebyo (10/1/2011)
I see many procedures that have checks for every parameter passed instead of doing as advised here in this topic. π
Defend in depth. Check parameters and use parameterisation...
October 1, 2011 at 12:32 pm
Lexa (10/1/2011)
codebyo (10/1/2011)
'sp_executesql' will do that for you.
codebyo, what exactly do you mean by it will do that for you? If a '; drop table --' command is passed,...
October 1, 2011 at 12:19 pm
Plus you won't need any parameter checks for SQL injection at the beginning of your code when you use 'sp_executesql' properly as Gail advised.
'sp_executesql' will do that for you.
Best regards,
October 1, 2011 at 11:06 am
drew.allen (9/29/2011)
SELECT [ID]
...
October 1, 2011 at 7:25 am
Good question.
And that's what I always wondered: is Microsoft dropping support for BIDS in favor of a new technology?
This happened with Report Builder which is now being dropped because of...
September 30, 2011 at 5:09 am
You beat me to it, ColdCoffee. π
Here's my code anyway:
SELECT t1.startdate, t1.enddate_goal, t2.date_goal
FROM (SELECT ROW_NUMBER() OVER (PARTITION BY account ORDER BY startdate) AS NId, startdate, enddate_goal, account
...
September 29, 2011 at 4:29 pm
Does 'sp_detach_db' work?
Best regards,
September 29, 2011 at 10:01 am
For a variable size code, you can do something like this:
DECLARE @Size INT = 7;
SELECT
REPLICATE('0', @Size-LEN(CAST(1234 AS VARCHAR(MAX)))) + CAST(1234 AS VARCHAR(MAX)) +
REPLICATE('0', @Size-LEN(CAST(76541 AS VARCHAR(MAX))))...
September 29, 2011 at 6:53 am
SQL Kiwi (9/28/2011)
Ah, a good precise question that doesn't require me to parse a T-SQL batch in my head. Nice.
:laugh:
Agree. Easy and straightforward question that shows an important limitation...
September 29, 2011 at 5:48 am
SQLBOT (9/27/2011)
Oh, and I'd really love to see zombies ruling the world. π
I'm prepared for it!! π
If all goes wrong we can always hide inside a mall and wait...
September 28, 2011 at 8:04 pm
Hmm. What do you mean? September 1st is Thursday, not the first day of the week.
Day of week would be like this:
SELECT CASE DATEPART(WEEKDAY, '20110901')
...
September 27, 2011 at 9:32 pm
pelusodm (9/27/2011)
Andre,Thanks for your response to my post. If you could describe your solution in simpler terms (I'm a SQL Server newbie), it would be much appreciated.
Thanks
Hmm... no offense...
September 27, 2011 at 8:21 pm
Viewing 15 posts - 271 through 285 (of 370 total)