Forum Replies Created

Viewing 15 posts - 46 through 60 (of 68 total)

  • RE: SELECT AND UPDATE

    If I try removing the Max I get the following error:

    Column 'Orders.OrderDate' is invalid in the HAVING clause because it is not contained in either an aggregate function or the...

  • RE: SELECT AND UPDATE

    I was thinking that having and where is the same thing.

    Then how should I write the query to use where in the first query because it does not allow me...

  • RE: SELECT AND UPDATE

    Thats what I have written the second query for and the only difference between the 2 queries is I am using having in the first query and where in the...

  • RE: SELECT AND UPDATE

    The second query gives the following result

    DELTA TECHNOLOGY VR3 AIR/NITROX COMPUTER 1475.95

    DELTA TECHNOLOGY VR3 AIR/NITROX COMPUTER 1209.95

    DELTA TECHNOLOGY VR3 AIR/NITROX COMPUTER 1209.95

    DELTA TECHNOLOGY VR3 AIR/NITROX COMPUTER 1404.95

    DELTA TECHNOLOGY VR3 AIR/NITROX...

  • RE: SELECT AND UPDATE

    Hi,

    I just added that where clause in the second query to be able select one product results and copy it in excel to total and compare. I even added that...

  • RE: Can you use CASE in a WHERE clause?

    try using the following statement

    SELECT blah, blah FROM blah (CASE WHEN @ID > 0 THEN WHERE pkID=@ID END)

    Could someone tell me if we can have more than 1 case in...

  • RE: SELECT AND UPDATE

    Hi remi,

    remember you had helped me with one of queries before. I again need you help.

    I think my aggregate sum function is doing something wrong in the following query

    SELECT SUM(Order_details.OrderPrice)...

  • RE: SELECT AND UPDATE

    This works perfect! It takes 6 seconds compared to 11 minutes using asp where 5000 update statements were being passed.

    Thanks a lot! I really appreciate your help.

  • RE: SELECT AND UPDATE

    You can see how random these results are if I use this query

    SELECT * FROM #SomeTempTable ORDER BY salesseq

    salesseq total

    0.9221

    61.3316

    12.9980

    181.0758

    24-.4010

    301.2163

    361.5960

    421.2350

    these results should have maximum total at top and then go...

  • RE: SELECT AND UPDATE

    I think i found the problem it is with the identity.

    I ran your first query

    "SELECT identity (int, 0, 6) as salesseq, SeqNumberTemp.ProductNameFull, (CASE WHEN OrderTotal > 0 THEN (SalesTotalTemp.OrderTotal...

  • RE: SELECT AND UPDATE

    hi, sorry for replying so late as I was tring to fix it myself. Your query did work but the results were different. I did it using my way and...

  • RE: SELECT AND UPDATE

    Thanks this works!

  • RE: SELECT AND UPDATE

    Hi Yoda or Remi, can you please write the update query also for me. I cannot seem to get it to work.

  • RE: SELECT AND UPDATE

    Can you write the update query also for me after you create this temporary table.

  • RE: SELECT AND UPDATE

    Thanks Remi for your reply but I have to update an existing table with sequence number for products and this is done only once a week. But it takes about...

Viewing 15 posts - 46 through 60 (of 68 total)