Forum Replies Created

Viewing 7 posts - 166 through 172 (of 172 total)

  • RE: how to move data

    Just a quick blurb on the sql

    select min(key1), person_id, 'contract1_id', ...yada...

    INTO #t2 --(from above)

    FROM contract_connect_table

    where contract_id in ('contract1_id', 'contract2_id')

    GO

    Delete from contract_connect_table

    GO

    insert into contract_connect_table

    select * from #t2

  • RE: easier way??

    I would think it would be possible to create a parm table with the different values.

    Select yada

    FROM parm_table

    WHERE @time between time1 and time2

    and @ServerTimeDif between svrTime1...

  • RE: How to get output of SP_HELP_JOB into a script?

    SELECT * INTO #JobInfo

    FROM OPENROWSET('sqloledb', 'server=(local);trusted_connection=yes'

    , 'set fmtonly off exec msdb.dbo.sp_help_job @execution_status=4')

    This works to get...

  • RE: Query to find customers that ordered x AND y AND z

    Very correct, the above derived tables on the original link_table performance would rapidly degrade.

    The simplest approach

    SELECT distinct customer

    FROM customer join link-table

    where link-table.product in (yada)

  • RE: Query to find customers that ordered x AND y AND z

    Sorry, neglected to catch that in the question.

    Another option would be to create the sql statement in a cursor

    and then exectue the statement. Storing the result in a tmp...

  • RE: Query to find customers that ordered x AND y AND z

    Below is a fairly simple method. Note joining the table on itself (link table) can be cpu intensive.

    SELECT distinct ct.customer_name

    FROM (select customerid from linktable where productlid = a) a

    JOIN...

  • RE: DTS Package file dsn issue

    While testing/digging into...

    dynamic properties Task:

    Connections

    ODBC Connection (name)

    OLE DB Properties

    Extended Properties

    .. attach a global variable to this value gv_file_dsn...

Viewing 7 posts - 166 through 172 (of 172 total)