Forum Replies Created

Viewing 10 posts - 1 through 10 (of 10 total)

  • RE: Query Sum

    thanks so much

  • RE: Query join

    Jan Van der Eecken (3/31/2013)


    Great to hear you got it working. But please remember next time around you ask a question to please provide us with enough info to actually...

  • RE: Query join

    Now working, thank you.

    SELECT Coalesce( sGIG, 'Tot' ) as sGIG, Sum(Number) as Num

    FROM (

    SELECT LEFT (idDGIG, 2) AS sGIG, COUNT(idDGIG) AS NUMBER

    FROM TABLE_LONG

    WHERE

    ...

  • RE: Query join

    Lynn Pettis (3/28/2013)


    Start with something like this:

    select

    idDGIG,

    count(idDGIG) as Number

    FROM (

    SELECT

    LEFT (idDGIG, 2) AS idDGIG,

    ...

  • RE: Query join

    mrivero1961 (3/28/2013)


    Sean Lange (3/28/2013)


    This is MySql. If you want to join multiple queries together you probably need to use UNION.

    I really can't tell from what you have posted what the...

  • RE: Query join

    Sean Lange (3/28/2013)


    This is MySql. If you want to join multiple queries together you probably need to use UNION.

    I really can't tell from what you have posted what the actual...

  • RE: Query join

    Sean Lange (3/28/2013)


    mrivero1961 (3/28/2013)


    Thank you for help.

    I've modified the query, but the output not change:

    SELECT

    DATE_START,

    COALESCE (idDGIG, 'Tot') AS sGIG,

    `NUMBER`

    FROM

    (

    SELECT

    CA.DATE_START AS DATE_START,

    LEFT (CA.idDGIG, 2) AS sGIG,

    COUNT(CA.idDGIG) + COUNT(A.EVENT) AS NUMBER

    FROM

    TABLE_LONG...

  • RE: Query join

    Thank you for help.

    I've modified the query, but the output not change:

    SELECT

    DATE_START,

    COALESCE (idDGIG, 'Tot') AS sGIG,

    `NUMBER`

    FROM

    (

    SELECT

    CA.DATE_START AS DATE_START,

    LEFT (CA.idDGIG, 2) AS sGIG,

    COUNT(CA.idDGIG) + COUNT(A.EVENT) AS NUMBER

    FROM

    TABLE_LONG CA

    JOIN TABLE_SHORT A...

  • RE: table `forums` where register threads

    Kingston Dhasian (2/20/2013)


    This should help

    WHERE a.connected = 0 AND ( dt.connected IS NOT NULL OR b.id IS NULL )

    Thank you very much, now working!!! 😀

    SELECT

    A.ID,

    A.connected,

    B.id,

    B.connected,

    A.datum,

    B.datum_update,

    A.title,

    A.author,

    B.message,

    B.last_replies

    FROM

    forums a

    LEFT OUTER JOIN forums b...

  • RE: table `forums` where register threads

    Kingston Dhasian (2/20/2013)


    change your WHERE Clause like below

    WHERE A.connected = 0 AND dt.connected IS NOT NULL

    thank you for help, but the output is incorrect:

    SELECT

    A.ID,

    A.connected,

    B.id,

    B.connected,

    A.datum,

    B.datum_update,

    A.title,

    A.author,

    B.message,

    B.last_replies

    FROM

    forums a

    LEFT OUTER JOIN forums...

Viewing 10 posts - 1 through 10 (of 10 total)