Viewing 15 posts - 19,591 through 19,605 (of 22,202 total)
Paul DB (9/10/2008)
Steve Jones - Editor (9/9/2008)
Why not just use the SELECT UNIONS instead of the temp tables in the select? It appears that you're using static values in there.
I...
September 10, 2008 at 6:34 am
There is so much code missing from this query, it's hard to see where you're going wrong. First, using sp_executesql is for working with dynamic TSQL. Nothing in this query...
September 10, 2008 at 6:30 am
This is psuedo-code, but something along these lines:
CREATE TABLE #MyIDs
(ID int)
INSERT INTO TableA
(...)
OUTPUT INSERTED.ID
INTO #MyIDs
SELECT ...
FROM TableB
Then you can obviously do what you want with the temporary table. use...
September 10, 2008 at 6:25 am
I'm not a RAID expert, but having seperate file groups on different drives will be faster than all the filegroups on one drive, yes.
September 10, 2008 at 6:11 am
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
Viewing 15 posts - 19,591 through 19,605 (of 22,202 total)