Forum Replies Created

Viewing 15 posts - 3,676 through 3,690 (of 10,144 total)

  • RE: exec proce

    elham_azizi_62 (2/3/2014)


    I am in hurry and I don't have time and I have to give it to my boss immediately.please help me.

    Something so timecritical should not be subject to the...

  • RE: problem with openquery

    Put a PRINT statement prior to the EXEC.

    PRINT @Query

    EXECUTE sp_executesql @Query

    Run the batch. Copy the output from the Messages window and paste it here.

  • RE: exec proce

    elham_azizi_62 (2/3/2014)


    please write T-Sql for me.thanks

    If I do this, you will remain a novice. You must at least make an attempt to write the TSQL.

  • RE: Write a conditional query

    Please post ddl and dml for the tables involved in your query.

    This is quite a trivial request and there are several ways to do it - what have you...

  • RE: exec proce

    Pass the string into the stored procedure as a string parameter and split it there. Splitting it first and attempting to pass in all of the resolved elements as a...

  • RE: Stored Proc And View Giving Different Results

    That's okay, it was always going to be a long shot with no sample data blah blah.

    I hope you can take away a few ideas from it though, and...

  • RE: Find max and min where count of unique > x...

    Luis Cazares (1/31/2014)


    Chris, I think you were expecting different results than the ones the OP asked for.

    I would go for the last query from o.fimin.

    Heh I see it now.

    "In the...

  • RE: Stored Proc And View Giving Different Results

    You might get some performance lift by jigging around with your filters. If you're going down this route then do take on board Gail's comments about DISTINCT. You might benefit...

  • RE: Find max and min where count of unique > x...

    Always carefully test any solutions offered to you. The one you rejected works with the sample set, the one you appear to have accepted does not. Here's a third offering:

    SELECT...

  • RE: How to update select number of rows without join

    -- The requirement is the Table1.SetId (1, 2, 3...) is to be assigned to the Table2.SetId

    -- for the same number of rows as the value of Table1.MsgCount. For example,

    CREATE...

  • RE: Generate a Comma-Separated List

    SELECT

    s.subTypeId, s.subTypeValue, s.subparentId, s.childLevel, s.sortOrder,

    s.leafFlag, s.aggregatesSubTypeId, s.sourceIdentifier, s.origId, s.RecId,

    camasapavalue = '[' + x.ConcatenatedString + ']'

    FROM #SAMPLEDATA s

    CROSS APPLY (

    SELECT ConcatenatedString = STUFF(

    (SELECT ',' + CAST(subTypeID AS VARCHAR(30))

    FROM...

  • RE: Need help with merge

    Can you post up some sample data, Kapil? Showing multiple rows per key? Obfuscate if necessary, but it really would be very useful to see it.

  • RE: Need help with merge

    Let's say you have a "dupe pair" of rows in your source table - dupes on the basis of a unique key on one or more columns.

    Does it matter...

  • RE: Need help with merge

    MERGE #temp T

    Is the table #temp always empty before you start the upsert?

  • RE: Need help with merge

    Use a traditional upsert.

    What you're trying to do in your original MERGE is to update rows which don't exist.

    Perform your inserts first from a deduped source set -...

Viewing 15 posts - 3,676 through 3,690 (of 10,144 total)