Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)

  • RE: Insert multiple records from one row

    <---- Buys GSquared a Coke. 🙂

  • RE: Insert multiple records from one row

    The easiest way is something like this:

    INSERT INTO Table2 (EmpID, AssetType, AssetValue)

    SELECT EmpID, Type1, Type1Value

    FROM Table1

    UNION ALL

    SELECT EmpID, Type2, Type2Value

    FROM Table1

    UNION ALL

    SELECT EmpID, Type3,...

  • RE: Data To Flat files from single table

    You can try something like this. You many need to use convert if your non-id fields are of different data types.

    I can give you a more exact answer if you...

  • RE: Table with only one record

    There are several ways that you can do this.

    You can create an Identity column and use a check constraint against the identity column. This will work unless the record is...

  • RE: executing dos commands

    You can either write a batch script to get the required information from the database via a command line, or if you want to do from within the database you...

  • RE: Insert a distinct number into a table with an Identity Column

    You could do it using NOT EXISTS but you would need to reference the outer table in the subquery.

    INSERT INTO TestID

    (OldLicenseNumber)

    SELECT

    DISTINCT x1.OldLicenseNumber

    FROM TableFrom2002 x1

    WHERE NOT EXISTS

    (SELECT x2.OldLicenseNumber FROM TestID...

Viewing 6 posts - 1 through 6 (of 6 total)