Viewing 15 posts - 91 through 105 (of 363 total)
I'm sorry, but I can do not completely understand your post. Are you executing SQL1, SQL2, SQL3 all in same script, one after the other?
Whay can't SQL3 be:
INSERT INTO [UserID]...
Once you understand the BITs, all the pieces come together ![]()
January 28, 2004 at 3:18 pm
-- After table creation...
Create View TestVW as
Select NUM, [DESC], QTY
From [Test]
GO
Bulk Insert TestVW from 'C:\temp\test.dat'
With ( CODEPAGE = 'RAW',
DATAFILETYPE = 'char',
ROWTERMINATOR = ',OK\n',
FIELDTERMINATOR = ',',
LASTROW =...
Once you understand the BITs, all the pieces come together ![]()
January 28, 2004 at 3:12 pm
In BOL, check out SCOPE_IDENTITY, IDENT_CURRENT, and @@IDENTITY. One of them will suit your needs.
Once you understand the BITs, all the pieces come together ![]()
January 28, 2004 at 3:01 pm
charlesd ,
You Wrote "...querying after the session ends..."
what do you mean by "session"? New connection, maybe even days later?
Once you understand the BITs, all the pieces come together ![]()
January 28, 2004 at 2:59 pm
Thanks Allen.
Interesting
, when I perform my 1st
-- Now see if table is still still there? (Same SELECT as used above)
Select *...
Once you understand the BITs, all the pieces come together ![]()
January 28, 2004 at 12:59 pm
SQLBill, you got me by a minute.... I had to correct more typing errors than you though (that's my excuse).
Once you understand the BITs, all the pieces come together ![]()
January 28, 2004 at 11:37 am
To simplify things a little perhaps...
Instead of...
CREATE TABLE #MyTempTable
(
tfld1(9) PRIMARY KEY,
tfld2 NVARCHAR(9),
tfld3 datetime,
)
INSERT INTO #MytTempTable (tfld1,tfld2,tfld3)
Select Distinct Top 3 fld1,fld2,fld3
from A
Order by fld3
You could ...
Select Distinct Top 3...
Once you understand the BITs, all the pieces come together ![]()
January 28, 2004 at 11:35 am
Sorry, I do not know "off the top", but i know BULK INSERT #TempTB .... works. Can you use a #TempTB instead of a @Table variable?
Once you understand the BITs, all the pieces come together ![]()
January 28, 2004 at 11:26 am
For your syntax to work, you must 1st "Link" the remote server....
See BOL for other options to "link". You can look at the following sp's to start with.
Examples below are...
Once you understand the BITs, all the pieces come together ![]()
January 28, 2004 at 11:22 am
OK, I've got the data (File) in the LAN DB, "Linked" the DMZ DB (used MSDASQL...DRIVER={SQL Server}) , made same structure table on DMZ DB I try to
Insert Into LinkedSrv.Database.DBO.FileCopyTable...
Once you understand the BITs, all the pieces come together ![]()
January 28, 2004 at 9:46 am
I haven't tried it, but can a DB on a read only media like a CD be attached?
Once you understand the BITs, all the pieces come together ![]()
January 28, 2004 at 9:24 am
Also, make a quick check that your not critical on drive space, especially where Temp DB is located. This can cause very very strange results (errors) on other "good" databases....
Once you understand the BITs, all the pieces come together ![]()
January 28, 2004 at 7:43 am
There are various ways....
WHERE ChkDate BETWEEN '1/6/2004' AND '1/6/2004 23:59:59.999'
This may perfom much better especially if ChkDate is indexed and the optimizer thinks its useful to use.
Also, a while back there...
Once you understand the BITs, all the pieces come together ![]()
January 27, 2004 at 5:51 pm
Sorry, you need to expand the "Columns" prior to dragging it.
Once you understand the BITs, all the pieces come together ![]()
January 27, 2004 at 5:41 pm
If the production DB can be brought offline, make a copy of them on the test server and sp_attach them. If not, Backup, restore is a fast operation also. You...
Once you understand the BITs, all the pieces come together ![]()
January 27, 2004 at 5:39 pm
Viewing 15 posts - 91 through 105 (of 363 total)