Forum Replies Created

Viewing 15 posts - 7,786 through 7,800 (of 10,144 total)

  • RE: Result table join based on active or inactive flag in table two

    Chaitanya Patil (6/18/2010)


    Have a look at the snap shots, you may get idea what I'm trying to explain...

    I this snap shot I've taken one particular USER_NUM to show.

    Can we use...

  • RE: Result table join based on active or inactive flag in table two

    Have a look at the output from the following query.

    I reckon you're looking for all rows where [source] = 0, and also all rows where the value of the...

  • RE: Today's Random Word!

    dbowlin (6/17/2010)


    Excelsior!

    Fat Freddy's Cat.

    Fertility Pills!

  • RE: Output based on group by and sum values

    This should give you a few ideas

    DROP TABLE #TABLE_A

    CREATE TABLE #TABLE_A (DEl_No VARCHAR(6), L_Amt INT, T_Amt INT, A_Name VARCHAR(6))

    INSERT INTO #TABLE_A (DEl_No, L_Amt, T_Amt, A_Name)

    SELECT '087NT1', 24000, 28699, 'Physic'...

  • RE: insert multiple values

    delwarinc (6/17/2010)


    thanks for your reply, please can you show how to do this

    Of course!

    You will have to write this bit though - Write a query to retrieve the ingredient...

  • RE: Getting Run-around on well deserved raise

    Unreserved apologies, jvanderberg, for appearing shallow - however the remark passes the logic test. It appears your employers have no intention of raising your salary at the current threat level:...

  • RE: Today's Random Word!

    jcrawf02 (6/17/2010)


    Chris Morris-439714 (6/17/2010)


    Before Sing4you whines "Not Yet" and Jason protests "Wasn't me!", this is about football and not pregnancy, right? 😀

    You mean Hand-Egg?

    Jon, you always lower the tone of...

  • RE: Getting Run-around on well deserved raise

    jvanderberg (6/17/2010)


    What do you think I should do?

    --J

    Resign from BP and get a job with TexasOil.

  • RE: Today's Random Word!

    Before Sing4you whines "Not Yet" and Jason protests "Wasn't me!", this is about football and not pregnancy, right? 😀

  • RE: insert multiple values

    This looks too simplistic to be a real world problem.

    Step by step:

    Write a query to retrieve the ingredient rows of the recipe which you are cloning.

    Hard-code the new RecipeID into...

  • RE: to find string between special characters appearing twice in a string

    -- query 1

    SELECT

    MyString,

    --CHARINDEX('_', MyString),

    --SUBSTRING(MyString, CHARINDEX('_', MyString)+1, LEN(MyString)),

    --CHARINDEX('_', SUBSTRING(MyString, CHARINDEX('_', MyString)+1, LEN(MyString))),

    MySubstring = LEFT(SUBSTRING(MyString, CHARINDEX('_', MyString)+1, LEN(MyString)),

    CHARINDEX('_', SUBSTRING(MyString, CHARINDEX('_', MyString)+1, LEN(MyString)))-1)

    FROM ( -- sample data

    SELECT '00_MECH_UG' AS MyString...

  • RE: SQL Server 2005 Query View

    Hello

    There are at least three methods for deriving a running total:

    1. Triangular join, as you are attempting here

    2. Recursive CTE

    3. Quirky update

    Method 1 is not recommended as it performs poorly...

  • RE: Performance tuning on insert query

    How long does the select part SELECT

    a.policy,

    a.form,

    a.date,

    SUM(a.premium/b.premprcnt) AS premium

    FROM b

    INNER JOIN a

    ON b.policy = a.policy

    AND b.form = a.form

    AND b.date = a.date

    AND...

  • RE: Multiple updates on the same column

    Here's why I asked - a simple and fast way to get your results:

    ;WITH Sourcedata AS (

    SELECT SubID = ROW_NUMBER() OVER (PARTITION BY ID ORDER BY OLD_VAL),

    ID, OLD_VAL, NEW_VAL

    FROM...

  • RE: Multiple updates on the same column

    Hi Daniel

    In your sample data, you have two rows in table #VAL for each row in your update target table. Is this always the case? What's the maximum number of...

Viewing 15 posts - 7,786 through 7,800 (of 10,144 total)