Viewing 15 posts - 4,951 through 4,965 (of 7,191 total)
If you create your staging table with an identity column, you can do something like this:
INSERT INTO Table1 (colA, colB, colC,...)
SELECT (colA, colB, colC,...)
FROM MyStagingTable
WHERE IDCol <= 500
INSERT INTO Table2...
November 15, 2011 at 3:55 am
I don't know, because you haven't said on what criteria the record set will be split. There are transformations you may be able to use, such as the Conditional...
November 15, 2011 at 3:35 am
Import all the records into a staging table, then use whatever logic is necessary to move the first 500 records to one table and the rest to the other.
John
November 15, 2011 at 3:24 am
What goes into the parentheses at the end of the INSERT line is a list of the columns into which the rows will be inserted. If the columns in...
November 11, 2011 at 5:50 am
SELECT INTO creates a new table. If you want to insert into an existing table, do it like this:
INSERT INTO Table1 (ColA, ColB, ...)
SELECT ColA, ColB, ...
FROM Table2
John
November 11, 2011 at 4:49 am
Two things you might consider are converting your scalar-value "Get" functions to table-value functions, and omitting the ORDER BY and having your presentation layer do the sorting instead.
John
November 11, 2011 at 4:14 am
How many boxes in total (2 for each node, do I need a witness and a DNS box too [4 in total])?
Each node is a "box", so for a two-node...
November 11, 2011 at 3:46 am
Dev (11/11/2011)
November 11, 2011 at 1:48 am
The error message tells you what you need to know. You can't use the same physical files for a different database. You have to specify new files.
John
November 10, 2011 at 4:24 am
Lee
(1) http://www.sqlservercentral.com/articles/Administration/2960/
(2) That's the Windows version.
John
November 10, 2011 at 4:03 am
Never code an application so that a transaction waits for user input. You'll have too many locking issues when users forget to complete their work before they go off...
November 10, 2011 at 3:38 am
If you're just executing a simple insert, why do you need an explicit transaction? If you want to do it like this, I think you'll need something in your...
November 10, 2011 at 2:43 am
You could try searching for "gaps and islands" - this looks like a similar principle to that.
John
November 10, 2011 at 2:01 am
Instead of GETDATE()-1, try DATEADD("Day",-1,GETDATE()).
John
November 10, 2011 at 1:16 am
So you want the date in the file name always to be yesterday's date? Best way to do that is to do some date arithmetic and take one day...
November 9, 2011 at 9:13 am
Viewing 15 posts - 4,951 through 4,965 (of 7,191 total)