Viewing 15 posts - 19,606 through 19,620 (of 22,213 total)
Or, rather than hard coding all those values in a query, create a table and store them there. It'll sure make maintenance easier.
September 10, 2008 at 6:09 am
Can you break it down and run a couple of steps at a time? I tried duplicating the script in miniature and it worked fine.
CREATE TABLE x ( id INT,...
September 10, 2008 at 6:07 am
Another vote for using the OUTPUT clause. That's incredibly useful for doing exactly what you're asking for.
Also, I wouldn't recommend using @@IDENTITY. @@IDENTITY is not limited by the scope of...
September 10, 2008 at 5:31 am
GilaMonster (9/10/2008)
September 10, 2008 at 5:18 am
Ah, that's a shortcoming with the tool, not SQL Server. Ummm, you might try associating to the first column and then renaming the association (not sure how to do that)...
September 9, 2008 at 12:55 pm
I'd start by attempting to kill the process. That should initiate a rollback, meaning whatever changes that process had been making will go away, but you shouldn't have problems with...
September 9, 2008 at 12:17 pm
The best description of this I've seen is contained in the first two chapters of Itzik Ben-Gan's book, Inside SQL Server 2005: T-SQL Querying.
September 9, 2008 at 12:15 pm
If I understand the question, you simply add the relationship three different times, relating the lookup value to the three different columns individually. It's a fine method.
September 9, 2008 at 12:13 pm
Hooey.
If it's a reporting system, and only a reporting system, you should mark the database itself as read only.
September 9, 2008 at 12:03 pm
Dropping the tables every time and then recreating the entire data set will eventually become much more painful than joining between the tables to move only the new data. For...
September 9, 2008 at 8:44 am
Batch complete and RPC complete measure the time on the SQL Server. They don't, necessarily, include network time. The reason I put a caveat there is because very large data...
September 9, 2008 at 6:48 am
You can't just remove a lock. That's data being manipulated and stopping the manipulation mid-stream will break the integrity of the data in the table, possibly losing that data, the...
September 9, 2008 at 6:42 am
Yeah, MAXDOP has been useful situationally. Although if I see a lot of queries suffering from parallelism, I'll raise the threshold.
September 9, 2008 at 6:07 am
lklein (9/8/2008)
September 8, 2008 at 8:00 am
lklein (9/5/2008)
September 8, 2008 at 7:34 am
Viewing 15 posts - 19,606 through 19,620 (of 22,213 total)