Forum Replies Created

Viewing 15 posts - 481 through 495 (of 3,544 total)

  • RE: Are the posted questions getting worse?

    Did upgrade 7 to 10 at home, quick and no problems (after I remembered to remove anti virus software), switched off Advertising ID and Cortana.

    I still hate the interface (hated...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: string columns containing alphanumeric

    SELECT Section

    FROM #temp

    ORDER BY

    SIGN(PATINDEX('%[a-zA-Z]%',Section)) ASC,

    CAST('0'+LEFT(Section,PATINDEX('%[a-zA-Z]%',Section+'A')-1) as int) DESC,

    RIGHT(Section,LEN(Section)-(PATINDEX('%[a-zA-Z]%',Section+'A')-1)) ASC

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Are the posted questions getting worse?

    Jeff Moden (8/24/2015)


    I've written all my own such as sp_ShowWorst and sp_WhatsRunning...

    Care to share 🙂

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Are the posted questions getting worse?

    Sean Lange (8/20/2015)


    ...Obvious they have absolutely no idea how the current query works at all.

    About sums me up with queries I write :hehe: 😀

    Does that mean you won't help me...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Are the posted questions getting worse?

    Sean Lange (8/19/2015)


    Thanks. Shouldn't be too bad. This is a super simple process. No need for the "T" portion. Just need to truncate a staging table and pull data from...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: CURSOR LOOP

    Koen Verbeeck (8/6/2015)


    What's this cursor thing? 😀

    It's the precursor to a pork chop launcher 😛

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Select Query Help

    SELECT ISNULL(Month,'TOTAL'),Resource,DepDate,SUM(Increase),SUM(Proj_Bkd),SUM(Vol_Target),SUM(Difference_B_T),SUM(Difference_Proj_T),SUM(Perc_Bkd_Trgt),SUM(Final_Prev_Year),SUM(Booked_SDL),SUM(Perc_Booked_To_Final)

    FROM temp

    GROUP BY Month,Resource,DepDate

    WITH ROLLUP

    HAVING (GROUPING(Resource) = 0 AND GROUPING(DepDate) = 0) OR GROUPING(Month) = 1

    ORDER BY GROUPING(Month) ASC,DepDate ASC

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: TSQL PatIndex

    PATINDEX('% [2] %', ' ' + Marketing_Special_Attributes + ' ')

    will give you char position in the string

    or zero if not found

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Help with a subquery in a CASE and a JOIN

    Why are you using a subquery?

    SELECTZIF19_ACCDOC_H_T.GJAHR,ZIF19_ACCDOC_H_T.MONAT,HWAER,UKURS

    ,UseRate = CASE WHEN UKURS = 0 THEN 1 / dbo.MonthlyExRates.Rate

    ELSE dbo.ZIF19_ACCDOC_H_T.UKURS END

    FROMdbo.ZIF19_ACCDOC_H_T

    JOIN dbo.MonthlyExRates

    ON ZIF19_ACCDOC_H_T.GJAHR = dbo.MonthlyExRates.GJAHR

    AND ZIF19_ACCDOC_H_T.MONAT = dbo.MonthlyExRates.MONAT

    AND...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: =COUNT(SWITCH Query

    =Sum(Switch(

    Fields!Operating_System.Value = "Microsoft Windows 7 Workstation" and Fields!Version.Value = "11",1,

    Fields!Operating_System.Value = "Microsoft Windows Server 2008 R2" and Fields!Version.Value = "11",1,

    Fields!Operating_System.Value = "Microsoft Windows Server 2008 SP2" and Fields!Version.Value = "9",1,

    Fields!Operating_System.Value...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Expression needs a false argument, please can you help?

    Your outermost IIf does not have a value for false, you must supply one

    What does the ultimate result of 0 or 1 represent?

    What value do you want to return if...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Are the posted questions getting worse?

    And from ten years ago!

    Don't forget good procedure

    DROP Dirty_Nappy

    GO

    SELECT Clean_Nappy FROM Nappy_Pile WHERE COUNT(Clean_Nappy) > 0

    INSERT Baby INTO Clean_Nappy

    GRANT ALL Smiles to Baby

    GO

    And the mandatory function

    CREATE FUNCTION Daddys_Turn ()

    ...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Are the posted questions getting worse?

    Congratulations, Alan 🙂

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Error using "Update" and "Set" commands

    Why do you select data first and then update?

    If you want details of rows updated add OUTPUT clause to the update statement

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Bulk insert from Excel

    That looks like a standard update to me, something like this

    UPDATEp

    SETp.A = t.A,

    p.B = t.B

    FROMdbo.products p

    JOIN dbo.temp t

    ON t.productid = p.productid

    If you need to add new rows as well then...

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 15 posts - 481 through 495 (of 3,544 total)