Viewing 15 posts - 53,536 through 53,550 (of 59,065 total)
if you want to pass parameters into dynamic sql, then you MUST use sp_executesql.
I guess that depends on what you're calling a "parameter"...
Mike, going back to your original post, the...
December 18, 2007 at 9:12 am
Perfect... thanks, Matt.
December 18, 2007 at 8:24 am
SELECT INTO to populate the entire recordset is painfully slow compared to INSERT INTO
Not real sure where you're coming up with that... I agree that SELECT/INTO will hold a lock...
December 18, 2007 at 8:16 am
I was pleasantly surprised a few years back to see MS trot out an actual certification specifically for these folks with most of its emphasis on the SQL side, and...
December 18, 2007 at 7:44 am
For so many reasons, storing dates as formatted VARCHARs is such a terrible idea. If you need to do any date math or comparison of dates, formatted dates only...
December 18, 2007 at 6:40 am
Actually, here's a solution that doesn't use a temp table...
--===== Solve the problem ==========================
--===== Declare a variable to hold the delimiter
DECLARE @Delim CHAR(1)
SET @Delim = ','
...
December 17, 2007 at 8:02 pm
Oh no... a "sequence" table. :hehe: Third party app we got used one... cause an average of 640 deadlocks per day because of the way they wrote the increment...
December 17, 2007 at 11:36 am
Thanks for the feedback, Taffy.
December 17, 2007 at 11:07 am
Jeff, your "auto magic" one came the closest but I got some extra zeros I haven't quite figured yet -
Original Modified
-------------------
A14 A00014
B2 B0002
OBT 0000OBT
YH3 YH0003
XX 0000XX
So - too many...
December 17, 2007 at 11:04 am
Karthik, it looks as if your code will fail if the length of any part changes because you've hard-coded each length. Also, I wouldn't use the spt_Values table in...
December 17, 2007 at 10:48 am
If you use SQL Server 2005, then you can make use of CTE as well
Ummm.... I'm pretty sure I'll avoid recursive CTE's just like I avoid Cursors... they're just too...
December 17, 2007 at 8:25 am
Heh... dunno... must be a new "feature" than MS built in... 😉
December 15, 2007 at 12:39 pm
Heh... yeah... it's a shame that MS can't figure out the best of both worlds. Having just seen 2k5 for the first time and the apparent mess they made...
December 15, 2007 at 12:10 pm
Viewing 15 posts - 53,536 through 53,550 (of 59,065 total)