Viewing 13 posts - 166 through 178 (of 178 total)
Non _ cursor method....(If I made the wrong assumption on which is the duplicate employee_id (highest or lowest), change max to min and > to <)
select min(e1.employee_id) 'employee_id', e1.employee_fname ...
December 9, 2007 at 11:30 am
Lots of great reading here.... another suggestion (way back to the table design)... At least for me if I can remember the author's last name that's doing...
December 5, 2007 at 5:53 pm
Hi.. this is how I got a proc to run on all dbs
you need to create the proc from the statement(s) on each database (using your standard distribution...
December 5, 2007 at 12:20 pm
Getting Sizes for Each Index...
I borrowed the concept to create a script to get size of each index instead of size of all indexes for the table.
/* Get...
December 5, 2007 at 9:46 am
Thanks for the explanation Doug.
It sure sounded like a concurrency problem. As you say the lock needs to be at the transaction level since both the insert...
December 5, 2007 at 9:08 am
Ok... not knowing how SQL Server handles concurrent users this is a big guess.
SP InsertNewOrder:
Begin
Insert into order_table(..) values (...)
SELECT SCOPE_IDENTITY();
End
Is it possible that between the time one user completes their...
December 4, 2007 at 9:26 pm
Oh... and if you want to keep the same identity numbers SET IDENTITY_INSERT tablename ON before doing the copy out and recopy then SET IDENTITY_INSERT ... OFF when all...
November 16, 2007 at 1:59 pm
When I tried an approach (just messing around) similar to the
col1=val1 and col2=val2....
when one of the cols had nulls then it doesn't equate to another null so the...
November 14, 2007 at 9:30 pm
This may or may not be relevant depending on who/how the query is run but would getting the first group of rows using a FAST n Query Hint on the...
November 14, 2007 at 9:11 pm
I agree that cursors are overkill. I was looking for a way to use cursors as part of learning about them is all Anyway, thanks for the response and...
November 8, 2007 at 6:09 am
ok.... it turns out that you have to have a UNIQUE index on the table in order for the cursor to be UPDATE. I have other problems...
November 6, 2007 at 1:54 pm
If there is a way to best do this without giving away solutions to the person who doesn't want to do homework(who would be in bad shape if they just...
October 29, 2007 at 10:19 am
Hi. I am new to this forum and also a student of SQL (but not with this homework) preparing for certification testing. These looked like very good exercises...
October 29, 2007 at 10:12 am
Viewing 13 posts - 166 through 178 (of 178 total)