Forum Replies Created

Viewing 15 posts - 2,041 through 2,055 (of 3,543 total)

  • RE: display row number of import file in error message

    If you are using DTSrun to execute the package (eg in a scheduled job), it will output any errors which includes the row(s) and column(s). If it is a scheduled...

  • RE: Seconds to dd:hh:mm:ss

    DECLARE @date datetime

    SET @date = DATEADD(second,508621,0)

    SELECT

    CAST(DATEPART(dayofyear,@date)-1 as varchar) + ' days ' +

    CAST(DATEPART(hour,@date) as varchar) + ' hour ' +

    CAST(DATEPART(minute,@date) as varchar) + ' mn...

  • RE: Is there a better way to ignore time portion of a smalldatetime field

    There are several threads discussing this subject and I think the concensus is that the following are the most efficient to avoid the use of CONVERT.

    CAST(DATEADD(day,DATEDIFF(day,0,@dateField),0) as smalldatetime)

    CAST(CAST(@dateField as int)...

  • RE: Epoch time

  • RE: Epoch time

    quotebut not quite the elegant minimalistic solution...

  • RE: Epoch time

    quoteNow do you have anything for the required formatting other than concatenation ?!?!

    STUFF(CONVERT(varchar,DATEADD(s, epochCol,'19700101'),120),1,10,CONVERT(char(10),DATEADD(s, epochCol,'19700101'),103))

  • RE: Epoch time

    SELECT DATEADD(s,[epochcolumn],'19700101')

    assuming that your 'Date Zero' is 01/01/1970

  • RE: @@DateFirst Different when scheduled

    @@DATEFIRST is dependant on the Language setting for your login, check the Language settings for the login that is running the job and the login you use for QA,  e.g.

    @@DATEFIRST...

  • RE: complex ORDER BY

    quoteWell, the syntax for that doesn't check out. Incorrect syntax near CASE

    Don't see why, it worked fine...

  • RE: complex ORDER BY

    Do you mean

    select TimeCol, DescriptionCol

    from myTbl

    order by

    case @sortBy

       when 'Time' then convert(varchar(50),TimeCol,121)

       when 'Description' then DescriptionCol

    end DESC,

    case @sortBy

       when 'Time' then DescriptionCol...

  • RE: Another Pivot Table

    quotewhat do you mean -> Item.Qty be repeated for a [Date]

    UNION will suppress duplicates as in...

  • RE: Another Pivot Table

    SELECT [Date],ItemA AS [Item],QtyA AS [Qty]

    FROM

    UNION

    SELECT [Date],ItemB,QtyB

    FROM

    UNION

    SELECT [Date],ItemC QtyC

    FROM

    How many Item's are there, is it a fixed number?

    Can Item/Qty be...

  • RE: Returning ADO recordset and output parameters in one stored procedure call

    quotewe tried releasing the recordset (RS = Nothing)

    Try closing the recordset (and any additional ones if...

  • RE: Returning ADO recordset and output parameters in one stored procedure call

    Not if the output is > 8000 bytes

    The problem is due to the consumption of the output recordsets, as in the following from MSDN

    "If a command returns a single result...

  • RE: Pulling My Hair Out

    quotethank you for making me feel like an old goat

    ooops!

Viewing 15 posts - 2,041 through 2,055 (of 3,543 total)