Forum Replies Created

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

  • RE: using a varible in an insert operation

    Hi,

    Please try this -

    insert into auditHistory

    (auditOrgId, auditPropID, auditTableName, auditTableColumn, auditColumnType, auditAction, auditData)

    SELECT 'IGT', 'IGT', 'ImageTypes', B.COLUMN_NAME, B.DATA_TYPE, 'I',

    CASE WHEN B.COLUMN_NAME = 'CompanyNbr' THEN CONVERT(NVARCHAR,I.CompanyNbr)

    WHEN B.COLUMN_NAME = 'ImageType' THEN CONVERT(NVARCHAR,I.ImageType)

    END...

  • RE: nth record of a recordset

    Try this -

    DECLARE @i INT

    SET @i = 8

    SELECT *, IDENTITY(INT,1,1) AS AutoId INTO #temp FROM Property

    SELECT *

    FROM #temp

    WHERE AutoId = @i

    DROP TABLE #temp

    Hope this helps you.

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