Search:

Type: Posts; User: Zvoni

Page 1 of 13 1 2 3 4

Search: Search took 0.03 seconds.

  1. Re: SQL Server Query - count if any rows have a certain value

    You have two „then“ after the coalesce
  2. Re: SQL Server Query - count if any rows have a certain value

    OK, my Mistake.
    Remove the LAST GROUP BY

    and EXTPRICE comes from P21, so here goes


    SELECT M1.SONumber, COALESCE(IIF(M2.CountS>0,0,M3.EXTPRICE), M4.SumPrice, 'Ooops') AS Result
    FROM Jobs AS...
  3. Re: SQL Server Query - count if any rows have a certain value

    OK, i've cleaned up my code a bit

    I'm assuming EXTPRICE and ITEM are a Columns of Jobs.
    If it's somewhere else, do tell.


    -- zvoni's way:
    SELECT M1.SONumber, IIF(M2.CountS>0,0,M3.EXTPRICE)...
  4. Re: SQL Server Query - count if any rows have a certain value

    That‘s the part i don‘t understand:
    in which table is disposition now? In jobs or in this P21?

    edit: ah, ok, got it.
    just qualify disposition with p21
    ….. p21.disposition inside the subquery
    ...
  5. Re: SQL Server Query - count if any rows have a certain value

    Ok, missed that.
  6. Re: SQL Server Query - count if any rows have a certain value

    Have you tried my solution?
    adding the sum of EXTPRICE in my query is not black magic

    btw: your query doesn‘t correspond with your task.
    “if there is a line with S in disposition return 0...
  7. Re: SQL Server Query - count if any rows have a certain value

    [/B]
    Agreed. Missed that one (SQlite doesn't complain about such stuff).


    Agreed. But as you said: Table_Schema would explain it.
    As i understood it, there can be only one row with...
  8. Re: SQL Server Query - count if any rows have a certain value

    eh... No.... EQ_Port is in Column ITEM
  9. Re: SQL Server Query - count if any rows have a certain value

    Tested in SQLite.
    Syntax might differ to SQL-Server



    SELECT M1.SONumber, IIF(M2.CountS>0,0,M3.EXTPRICE) AS Result FROM tbl_mock AS M1
    LEFT JOIN
    (SELECT SONumber, COUNT(disposition) AS...
  10. Re: Open with OLE from VB6 Shell (or ShellExecute)

    i wouldn't know how OLE comes into this.

    1) what's the exact error message of this program?
    2) Have you checked if this program needs a "qualifier" for the file? --> in a shell: MyNonVB6Programm...
  11. Replies
    5
    Views
    159

    Re: Make CommonDialog filename non-editable

    Couldn't he provide the "planned" Filename, say, in the Caption of the Dialog?
  12. Replies
    3,322
    Views
    410,715

    Re: What song are you listening to right now?

    https://youtu.be/1S1fISh-pag
  13. Replies
    48
    Views
    792

    Re: Let's form an IT-Band....

    I think this one takes the cake……

    https://youtu.be/1S1fISh-pag
  14. Re: Check if same app runs on other PC in local network

    http://www.solidautomation.com/bryon/Using_UDP_and_Winsock_in_Visual_Basic_6.htm
  15. Replies
    6
    Views
    347

    Re: LOOPING dir and sub dir

    Somewhere deep in here i had a solution for this.... would have to search it
  16. Replies
    2
    Views
    219

    Re: An incredible bug in vb6 Int function!

    Just tested it. Cannot confirm.

    OTOH, if you want to remove the last digit, making sure no rounding whatsoever happens, use Integer division



    Dim g As Long
    g = 39838669
    g = g \ 10...
  17. Replies
    16
    Views
    520

    Re: [RESOLVED] Update table with CTE;

    Queries…… Selects, Updates, Inserts, Deletes?
    With/without Transaction?
    I’d analyze it closely before making any assumptions
  18. Replies
    48
    Views
    792

    Re: Let's form an IT-Band....

    Raspberry Pie (Don McLean)
    Losing my connection (REM)
    Begin End (Linking SPARCs)
  19. Replies
    16
    Views
    520

    Re: Update table with CTE;

    I don't think it has to do with/without CTE
    More with: Those are distinct commands sent to the Database, and the Database has to execute them separately (each command has to be executed for itself)....
  20. Replies
    48
    Views
    792

    Re: Let's form an IT-Band....

    The Evil that is GoTo (Iron Maiden)
  21. Replies
    16
    Views
    520

    Re: Update table with CTE;

    This is not making any sense.
    are you finishing the command to start the transaction with a semicolon?


    begin transaction;
    TheBigUpdateStatement;
    Commit transaction;

    check the semicolons
  22. Replies
    16
    Views
    520

    Re: Update table with CTE;

    I asked for the whole Statement as a SELECT, because if the SELECT doesn't work, you have an error somewhere else (which i haven't spotted then).
    If the Statement doesn't work, a Transaction will...
  23. Replies
    16
    Views
    520

    Re: Update table with CTE;

    Since when should this work in any DBMS?

    And to your initial Question: Is the UPDATE working as a SELECT? As in returning desired results?

    Transformed to a SELECT (and cleaned up formatting),...
  24. Replies
    16
    Views
    520

    Re: Update table with CTE;

    btw: Is it just me, or is this Timecheck not ISO-compliant?
    i was under the impression that ISO-Format is including dashs
    would have expected


    Table_A.TransC_dtmDateTime between '2022-11-21...
  25. Replies
    48
    Views
    792

    Re: Let's form an IT-Band....

    Stream On (Aerosmith)
    Empty ROMs (Gary Moore)
    RAMa RAMa Ping Dongle (Rocky C# & The Replays)
  26. Replies
    16
    Views
    520

    Re: Update table with CTE;

    The first line of the last WHERE-clause: there is a blank missing after your timecheck and the AND

    btw: such an UPDATE is „translatable“ into a SELECT.
    Would rather do this first checking if...
  27. Replies
    16
    Views
    520

    Re: Update table with CTE;

    Properly formatted.
    Spot the mistake



    WITH PAY_TICK AS
    (select
    TransT_lgnNumber,
    sum(t.TransT_curValueEach) as total_T
    from tblTrans_Ticket T
  28. Replies
    48
    Views
    792

    Re: Let's form an IT-Band....

    Album: "The Rock-Era"

    Boulevard of broken Streams (ScreenDay)
    Highway to Shell (AC/DC)
    Hell's Shells (AC/DC)
    Mac in Black (AC/DC)
    Love Bytes (Def Leppard)
    C# dressed Man (ZZ Flop)
    Defender...
  29. Replies
    48
    Views
    792

    Re: Let's form an IT-Band....

    Where the Streams Have No Video-Frames (U2) - Alternative lyrics
  30. Replies
    48
    Views
    792

    Re: Let's form an IT-Band....

    I'm cracking a rib here......
    ROTFLMAO
  31. Replies
    48
    Views
    792

    Re: Let's form an IT-Band....

    btw: I don't take any responsibility/blame, if the next time you listen to any of those songs, you suddenly sing ...errr..... "alternative" lyrics along
    :D:D:p:bigyello:

    Just caught myself...
  32. Replies
    48
    Views
    792

    Re: Let's form an IT-Band....

    The Power-Ballad of the Century:
    I'm still looping you (Scorpions)
  33. Replies
    29
    Views
    1,064

    Re: vb6 CRUD in Text File

    If he‘s using Textfiles (why not a Database?), why in blazes isn‘t he using one of those gazillion CSV-Classes/Parsers you can find on the net?

    EDIT: or use ADO (or was it DAO?) with Textdriver.
  34. Re: How do I address C variables that use an typedef array in an array?

    Damn! That‘s one of those „50:50“ things i can never remember.
  35. Replies
    48
    Views
    792

    Re: Let's form an IT-Band....

    Shaggy,
    you just give me an idea….

    jmp (for my loop) (The Pointer Sisters)
  36. Replies
    48
    Views
    792

    Re: Let's form an IT-Band....

    LOOOOOOLLLL
    more like „The Firewall - A tribute to Ping Flops“
  37. Re: Excel: Create ranges for date and blank cells

    Since you say "Loop" i take it it's vba.
    If you're alread in a loop, what's wrong with checking the cells in Column A if they're empty/blank?
    Some speed up might be gained with


    Public...
  38. Replies
    48
    Views
    792

    Re: Let's form an IT-Band....

    Writers of a Worm (The BackDoors)
    You defined me as an unsigned Long (AC/DC)
    No Fun of MIME (Genesis)
    I don't wanna miss a Ping (Aerosmith)
  39. Re: How do I address C variables that use an typedef array in an array?

    Speaking in VB6 this would be:
    Dim Myvar(0 To 9, 0 To 1) As Long
    So y would be first dimension, x the second
  40. Replies
    48
    Views
    792

    Re: Let's form an IT-Band....

    No, you‘re not.
    the more the merrier
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width