all groups > sql server programming > june 2007 > threads for sunday june 10
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Update with subquery
Posted by Charlie at 6/10/2007 9:08:00 PM
I am trying to run an update to a table that requies a count from another
table and want the update to be where the Year & Month are equal to each
other. I am trying to work with a poorly set up table structure and am
having a hard time trying to figure out how to get an update to work form a... more >>
Easy Batch Table Drop?
Posted by Don Miller at 6/10/2007 2:23:58 PM
My application creates, without tracking, real temporary tables (not #temp
or @table) that need to be dropped after a user session is ended. They are
all labeled tempXXXX.
Is there any easy way to drop all of these tables at once with an SP? It
seems that it will require dynamic SQL (e.g. E... more >>
What is most effecient way to do summary?
Posted by Andrew at 6/10/2007 1:14:00 PM
Hello, friends,
I need to write a report to summarize items bought by each department in
each month for the last 3 years. What is the most effecient SQL statement to
do this? (I am using SQL Server 2000). Any sample snippet?
Thanks a lot.... more >>
SP aborts before hitting @@error test
Posted by K. Abit at 6/10/2007 12:07:54 PM
My SP is exiting early and I want to prevent it from aborting early.
Inside my SP, with sql server 2005, I have something like:
INSERT INTO MYTABLE (FIELD1, FIELD2) VALUES ('WORD',1)
SELECT @myrowcount = @@ROWCOUNT , @myerror = @@ERROR
But the problem is that it exits out of the proc with ... more >>
SQL Server performance - [Select] on the same record multiple time
Posted by Eugene at 6/10/2007 2:39:00 AM
Hi folks, one general question on SQL Server performance optimization.
Consider the scenario where within a single stored procedure, single
transaction, the code read on the same table (same record, consider
equivalent comparison on primary key) multiple times, does SQL Server always
reseek... more >>
|