Forum Replies Created

Viewing 15 posts - 91 through 105 (of 363 total)

  • RE: Using new Identity in new insert (other table)

    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

  • RE: BCP OR BULK INSERT

    -- 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

  • RE: Using new Identity in new insert (other table)

    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

  • RE: Dynamically Generate Table Name in Stored Procedure

    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

  • RE: "Disappearing" Table. Why?

    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

  • RE: Selecting data from several servers. Is it possible?

    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

  • RE: Union query doesnt work. Please help

    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

  • RE: Bulk Insert And Table Data Type

    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

  • RE: Selecting data from several servers. Is it possible?

    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

  • RE: How to FileCopy LAN to DMZ using SQL?

    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

  • RE: How to create an uneditable database ?

    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

  • RE: Corrupt database question?

    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

  • RE: Query date and time data

    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

  • RE: How Can I Get a List of the Fields in a Table?

    Sorry, you need to expand the "Columns" prior to dragging it.



    Once you understand the BITs, all the pieces come together

  • RE: Best Practice - Copy Database

    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

Viewing 15 posts - 91 through 105 (of 363 total)