Forum Replies Created

Viewing 15 posts - 2,506 through 2,520 (of 4,081 total)

  • RE: Using Merge to insert/update table

    Mh (8/27/2009)


    Actually this code is for the source:

    No, this is where you defined the source:

    USING ( SELECT --@OrderID,

    @orderName,

    @orderType,

    @orderNumber

    ) AS source

    Per your example I shall insert this...

  • RE: Using Merge to insert/update table

    No data to test with from you, so I don't even know if your code will run, but let me ask why is this in your code?

    (

    SELECT ordername, ordertype, ordernumber

    FROM...

  • RE: in dynamic tSQL

    nroudak (8/26/2009)


    truly sorry for making you angry ... I just couldn't paste real servers and db names (sensitive), besides it wouldn't help anyway ..

    I'm no longer angry, but that's an...

  • RE: moving data from one server using SELECT @cmd='move

    select convert(varchar(8),getdate(),112)+'_test.csv'

    The statement above will produce the correct file name for today's date.

    What is "that day"? The file with today's...

  • RE: in dynamic tSQL

    You're welcome.

    If I may make a suggestion for the future: Whenever I am working with dynamic SQL, I never begin with trying to execute the...

  • RE: in dynamic tSQL

    [schema].

    You have a table named this in every db on every server?

    You have a table named this anywhere?

    What you typed in was:

    [server].[database].[dbo].

    That wouldn't work either,...

  • RE: Are the posted questions getting worse?

    Can't get there, Lynn. I just came close to calling an OP a liar. My patience is exceedingly thin today.

  • RE: Query optimation help

    Recursive Function

    That's probably your problem with performance, right there.

  • RE: Update values from Table Two with values from Table One

    insert into #FT_FinalAmts(specimen, SG_Great_Less, Creat_Great_Less, PH_Great_Less)

    select specimen, coalesce(SGgreat,SGLess), coalesce(creatGreat,creatLess), coalesce(phGreat,phLess)

    from #FT_GreatLessAmts

    ISNULL() would work too, in this instance.

  • RE: in dynamic tSQL

    my problem is just that....

    select @SQLstr

    produces almost exact line:

    SELECT @myVarOUT =someValue FROM [server].[database].[dbo].

    WHERE someName = [@myName]

    It does not. You did not do as I requested. You...

  • RE: find the position of the charcter in delimited string

    Thanks for posting back, Peter. Your results make sense when I look at them now. Still using my creaky old laptop, I'm seeing the following times...

  • RE: in dynamic tSQL

    In the meanwhile, here's a hint:

    You are putting '[schema].' in as a constant, instead of using two variables to supply the schema name and the name...

  • RE: in dynamic tSQL

    Please, let us see the value you are building:

    -- add this statement and rerun your code, then paste the printed results back here.

    PRINT @SQLstr

    EXEC sp_executesql @SQLstr, N'@myVarOUT...

  • RE: JOINING to result of StoredProcedure

    Since Flo brought up the TVF approach, I want to ask. Can anyone point me to documentation about the performance of TVFs v stored procedures? ...

  • RE: error trap help

    print @@error ????

Viewing 15 posts - 2,506 through 2,520 (of 4,081 total)