Viewing 15 posts - 55,486 through 55,500 (of 59,078 total)
Works fine (pretty cool solution, too, Peter) if you guarantee the order by loading a temp table... bit of a problem otherwise...
-- Prepare sample data
DECLARE @Sample TABLE (RowID INT IDENTITY(1,1), col1...
August 6, 2007 at 5:32 pm
You want just the names of the PK's and FK's along with the related table name?
August 6, 2007 at 5:21 pm
Have you considered just using TSQL and a call to OSQL?
August 6, 2007 at 5:03 pm
In light of Peter's solution, I'd have to say "Yeah, you're wrong"
Also, what's wrong with putting "the work in the query"? Isn't...
August 6, 2007 at 5:02 pm
Don't forget... Op wants numbers to restart at 1 at the beginning of each group. ![]()
August 6, 2007 at 4:56 pm
Read the post, Joe... he's a rookie and he said he'd take the advice I gave him to format in the front end ![]()
August 6, 2007 at 4:54 pm
Heh... or concatenate the groups on a single line? ![]()
August 6, 2007 at 11:22 am
Heh... that's why I asked to see the code... I'll be doing the ol' million row testing on these solutions tonight... Ladies and Gentlemen, place your bets
August 6, 2007 at 11:20 am
Or... just use the set based solution I provided to do the whole table at once ![]()
August 6, 2007 at 11:19 am
Using John's good test setup... this is 1 place where a triangular join may work well because the groups indicated by Col1 are so small...
DECLARE @Table TABLE (RowID int IDENTITY(1,1),...
August 6, 2007 at 11:16 am
BTW... couldn't help but notice you're using @@IDENTITY... if a trigger is present, that could mess things up because @@IDENTITY returns the last id of ANY table updated. Recommend you...
August 6, 2007 at 11:02 am
Viewing 15 posts - 55,486 through 55,500 (of 59,078 total)