Forum Replies Created

Viewing 15 posts - 6,061 through 6,075 (of 10,143 total)

  • RE: Help with SQL query please

    -- with CostsNet in the GROUP BY, there's no aggregate of CostsNet

    -- Try the original query with and without SUM

    -- Then take CostsNet out of the GROUP BY and check

    --...

  • RE: Find employee with overlapping shifts using cte recursive

    Hello and welcome to ssc. Please read the link in my sig (click on the word "this"), which will show you how to create sample data for folks to code...

  • RE: Fill variable from cursor

    After you have populated the variables, how do you use their values?

  • RE: Help on SQL query

    Jeff Moden (7/10/2012)


    @Gus,

    Ok... I've been looking at this thread for a bit for "Sam's view definition" and I'm not finding any "SAM" that posted. Did you mean "Chris' view...

  • RE: Help on SQL query

    Jeff Moden (7/10/2012)


    ChrisM@Work (7/10/2012)


    Jeff Moden (7/9/2012)


    In 2008 or less, I'd REALLY like to know how to create a view that does a running total without forming a Triangular Join. ...

  • RE: The Beer Cooler Thread

    anthony.green (7/10/2012)


    I had a couple of pints of St Austell's Tribute on Saturday, that was a good tasting ale

    http://www.staustellbrewery.co.uk/beers/cask-beers.html

    Lovely stuff - FGW sell it on board their trains.

  • RE: The Beer Cooler Thread

    Stuart Davies (7/10/2012)


    Two favourite ales of mine one found here

    http://www.marstonsbeercompany.co.uk/our_brands/marstons/oldempire.asp

    and the other here

    http://www.innisandgunn.com/en/the-range/original.aspx

    Not beers for drinking by the bucket full though - they pack a bit of a punch as...

  • RE: Help on SQL query

    GSquared (7/10/2012)


    Just looked in Jeff's old article on running totals, and on his PC, the quirky-update running total on a million rows of data was about 6 seconds. Assuming...

  • RE: Help on SQL query

    GSquared (7/10/2012)


    ChrisM@Work (7/10/2012)


    Jeff Moden (7/9/2012)


    In 2008 or less, I'd REALLY like to know how to create a view that does a running total without forming a Triangular Join. I...

  • RE: Help on SQL query

    Jeff Moden (7/9/2012)


    In 2008 or less, I'd REALLY like to know how to create a view that does a running total without forming a Triangular Join. I don't believe...

  • RE: Fill variable from cursor

    There's no aggregate in my previous post:

    SELECT @90000119Sum = Avamel

    FROM V_Factor_Total4

    WHERE cslPricingFactorRef = '95'

    AND ProductCode = '90000119'

    Why do you need a cursor for this?

    Performance is likely to be very...

  • RE: Fill variable from cursor

    eh.shams (7/10/2012)


    it is not agggregation, the name of my variable is (90000120sum)

    SELECT @90000119Sum = Avamel

    FROM V_Factor_Total4

    WHERE cslPricingFactorRef = '95'

    AND ProductCode = '90000119'

  • RE: Fill variable from cursor

    eh.shams (7/10/2012)


    i try :

    While @@Fetch_Status = 0

    Begin

    select

    CASE

    WHEN (@ProductCode = 90000119) and (@cslPricingFactorRef =...

  • RE: Fill variable from cursor

    eh.shams (7/10/2012)


    because i need to analysis each row of cursor , and make decision by value of column

    Like this:

    CASE

    WHEN (@cslPricingFactorRef= 90000119) THEN (SELECT @sum=@Avamel)

    What are the other decisions?

  • RE: Fill variable from cursor

    eh.shams (7/10/2012)


    i write :

    SELECT @90000119Sum = @Avamel

    "@90000119Sum" this is variable i declare it,@Avamel is belong to cursor as shown in top

    in cursor but give me this error...

Viewing 15 posts - 6,061 through 6,075 (of 10,143 total)