Viewing 15 posts - 57,451 through 57,465 (of 59,067 total)
Your code to handle the header appears to have a couple of a problems... as you are aware, the Deleted table is empty for Deletes... why does the SELECT in the...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 10, 2006 at 5:45 am
>>Then generate the header record and pick up its unique id – (how do I get this).
Right after you insert into the header table, do a SELECT @variable = SCOPE_IDENTITY()...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 9, 2006 at 10:29 pm
Aren't you missing a "TableName" or TableID column?
--Jeff Moden
Change is inevitable... Change for the better is not.
October 9, 2006 at 9:47 pm
I ran your code against the Northwind database (assume that's where you were running it, as well)... Just to be sure, this is your code, isn't it (I added the...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 9, 2006 at 9:40 pm
City Index? Neither the code you posted or my code would even come near a "city" index if the Primary Key was the CustomerID column. ![]()
--Jeff Moden
Change is inevitable... Change for the better is not.
October 9, 2006 at 8:52 pm
The thing I'd like to add to Steve's good comments is that you should not use SELECT *
It's, well... a bit lazy... and...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 9, 2006 at 8:37 pm
Actually, you can get ALL the column names at once with the commas at the end with the added benefit of carriage returns in just the right places... run this...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 9, 2006 at 8:24 pm
There's that "ISNUMERIC" thing again... see a couple of frames up for the warning ![]()
--Jeff Moden
Change is inevitable... Change for the better is not.
October 9, 2006 at 8:00 pm
Alex,
Nice article especially for the proverbial "newbie". I do agree that the examples were a bit overdone but how are ya going to learn if you don't try? 
--Jeff Moden
Change is inevitable... Change for the better is not.
October 9, 2006 at 7:49 pm
I've found that that is NOT true... not with INT ID's anyway... In my testing of the various solutions posted against this article, I get INDEX SCAN's, not table scans using WHERE (CustID...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 9, 2006 at 7:39 pm
Sorry... it's a "Moden-ism" pronounced "ree-bar" and stands for "Row By Agonizing Row"
Why "ree-bar"? Because it's like the metal stakes stuck in...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 9, 2006 at 4:18 pm
Thanks for the feedback, Steve.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 9, 2006 at 4:16 pm
p.s. You would be amazed at just how useful that Tally table is gonna be... and, a lot of the time, it will greatly enhance the performance of your code......
--Jeff Moden
Change is inevitable... Change for the better is not.
October 8, 2006 at 5:30 pm
Aye... and thank you for the feedback, Perry.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 8, 2006 at 5:25 pm
p.s. The above was from your original query... it does not include the change due to the "blond-attack" ![]()
--Jeff Moden
Change is inevitable... Change for the better is not.
October 8, 2006 at 5:23 pm
Viewing 15 posts - 57,451 through 57,465 (of 59,067 total)