Forum Replies Created

Viewing 15 posts - 9,091 through 9,105 (of 10,144 total)

  • RE: Temp table usage in dynamic sql

    GilaMonster (12/18/2008)


    Ah. I thought that the end of the dynamic SQL would mean that the last reference to the global temp table was gone.

    BOL doesn't make it clear - at...

  • RE: Select top random rows ?

    Mark Shvarts (12/18/2008)


    I need to get a sample random rows from a table. Top will get only first records, but I need my sample to be evenly distributed. The table...

  • RE: Totally Dumb Dev Question

    Hi Shaun

    Wasn't this a qotd earlier in the year?

    INSERT INTO table Default Values

  • RE: Replacing Case statement in UPDATE

    dhanasekar.palani (12/18/2008)


    That is the whole query. You are right it hits the performance. can you give some idea to write in the condition instead as a case statement.

    Yep, move the...

  • RE: Replacing Case statement in UPDATE

    Can you post the whole statement? It's unlikely that the CASE construct - as you've posted it - will cause much of a performance hit.

  • RE: Temp table usage in dynamic sql

    dongadoy (12/18/2008)


    Yes, a global temp table is an option. Just have to remember the concurrency issue - can't have multiple processes executing the code concurrently, or have different code using...

  • RE: Temp table usage in dynamic sql

    GilaMonster (12/17/2008)


    If you create the temp table in dynamic SQL, the temp table will go out of scope and be dropped as soon as the dynamic SQL ends. There's no...

  • RE: Return missing hours from a table

    Can you post some sample data please Fred? The link in my sig will explain how to do this.

    Many thanks

    ChrisM

  • RE: Spot the incorrect syntax please..!

    Ninja's_RGR'us (12/18/2008)


    And there I was thnking you knew everything about everything ;). Now that dream is gone for me.

    There I was thinking you dreamed about SQL Server, and all...

  • RE: Want to select Records with null values

    sar_kan25 (12/18/2008)


    I have a table Info with Name, address,Mob.No.,Designation as Columns.

    Some of the records in the table contain null values.

    Now i want to write the select query which will give...

  • RE: group by and difference

    Join table1 twice...

    SELECT...

    FROM table2 t2

    INNER JOIN table1 y ON y.coulmn3 = t2.column4 AND y.column2='Y'

    INNER JOIN table1 n ON n.coulmn3 = t2.column4 AND n.column2='N'

    GROUP BY...

    If this fails because of the aggregate,...

  • RE: Count number of occurancies

    bhushanhegde (12/18/2008)


    Hi,

    I dont have rights to create any objects in the data base since that is in production.

    I want to do with any sys defined functions....is it possible?

    Yes.

    DECLARE @TargetString VARCHAR(100),...

  • RE: Count number of occurancies

    Thank you for the prompt answers.

    There are several ways to do this, my preference would be a function using a tally-table - are you permitted to add a utility table...

  • RE: Count number of occurancies

    bhushanhegde (12/18/2008)


    Hi,

    My string is as follows:

    'hurrycanecathurrycanecatand dod race'

    I want to find out character 'a' how many times occured in the above string.

    pls help me.

    What have you tried so far?

    How do...

  • RE: Query to fill in missing dates in a series of rows

    Jeff Moden (12/17/2008)


    bnordberg (12/17/2008)


    Thanks Chris!

    that appears functional. Now to tune and see how it works with a few hundred million rows!

    Why on Earth do you need to create what is...

Viewing 15 posts - 9,091 through 9,105 (of 10,144 total)