Viewing 15 posts - 16 through 30 (of 1,472 total)
This is a very rough first attempt. Ran out of time to clean it up today (and as a result it's pretty messy with bad aliases and data types...
June 22, 2011 at 2:50 pm
JustMarie (6/17/2011)
Phil Parkin (6/17/2011)
June 17, 2011 at 1:45 pm
Sorry, It doesn't need to uniquely identify rows in the table, just the items on the order.
I'm assuming the real table is more complex, perhaps with an ItemNumber,...
June 17, 2011 at 8:52 am
Here's one way. This is assuming that ItemName can uniquely identify the items.
DECLARE @NewSNnvarchar(50),
@OldSalesOrderIDint,
@NewSalesOrderIDint
SELECT@OldSalesOrderID = 1,-- Order to be Copied
@NewSN = 'AFFI'-- SN for the new Order (May not...
June 17, 2011 at 8:11 am
I tend to use tabs to line things up in cases where I've got a lot of field names that are all aliased. If the vast majority of fields...
June 17, 2011 at 7:27 am
WayneS (6/3/2011)
June 3, 2011 at 12:45 pm
Heh. I'm surprised at 2 things.
1. They all fit on one line (On my screen anyways).
2. I actually know what they all are!
Very nice list though.
Is it...
June 3, 2011 at 9:14 am
I saw the big bowl of alphabet soup get added onto Gus' signature and figured this would be the place to figure out what led up to it. Only...
June 3, 2011 at 8:24 am
peter.row (5/19/2011)
I guess in my career dynamic SQL has been a last resort kind of thing in an attempt to...
May 19, 2011 at 11:59 am
peter.row (5/19/2011)
Using dynamic SQL like this is equal to the last S in KISS - Stupid!SQL Injection attack waiting to happen.
Could be. That's why I said "depending on...
May 19, 2011 at 6:14 am
No, to replace his empty strings with NULLS. Most of the time you wouldn't really want to insert empty strings into fields. As you said though, it depends.
May 18, 2011 at 4:29 pm
You can also use dynamic SQL to create the index. It is not parsed during sp compilation and would not throw the errors.
May 18, 2011 at 7:39 am
Yeah, you'd probably want to throw a NULLIF('<data>' ,'') in the replace as well.
May 17, 2011 at 6:21 pm
Viewing 15 posts - 16 through 30 (of 1,472 total)