• SQL/MP - ERROR from SQL [-3074]

    From Gustavo Bertazzoli@guberta@gmail.com to comp.sys.tandem on Mon Jul 4 23:54:31 2022
    From Newsgroup: comp.sys.tandem

    Hi guys,

    It's my first message here but I hope that someone can help me.

    I'm doing a simple SQL with count, but I'm always getting an error and I don't know why.

    Here is the query:
    select
    count(ID)
    from table1
    where
    IDstate not in ("release", "finished")
    and dateformat(TIMESTAMP year to FRACTION(6), DEFAULT) >
    dateformat(DATETIME "2022-07-05:00:00:00.000000" year to FRACTION(6), DEFAULT)
    group by sequenceGroup
    browse access;

    here is the error:
    ...select count(ID) from table1...
    ^
    *** ERROR from SQL [-3074]: You cannot specify COUNT when ALL is specified.

    I didn't specified as ALL but maybe I don't. Can someone please help me?
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Henrik Paludan-Moerk@hpm.con@gmail.com to comp.sys.tandem on Tue Jul 5 04:53:54 2022
    From Newsgroup: comp.sys.tandem

    please try to puy Select Count (*)
    instead of count(id)? your sql looks fine to me.

    //Henrik P



    tirsdag den 5. juli 2022 kl. 08.54.32 UTC+2 skrev gub...@gmail.com:
    Hi guys,

    It's my first message here but I hope that someone can help me.

    I'm doing a simple SQL with count, but I'm always getting an error and I don't know why.

    Here is the query:
    select
    count(ID)
    from table1
    where
    IDstate not in ("release", "finished")
    and dateformat(TIMESTAMP year to FRACTION(6), DEFAULT) >
    dateformat(DATETIME "2022-07-05:00:00:00.000000" year to FRACTION(6), DEFAULT)
    group by sequenceGroup
    browse access;

    here is the error:
    ...select count(ID) from table1...
    ^
    *** ERROR from SQL [-3074]: You cannot specify COUNT when ALL is specified.

    I didn't specified as ALL but maybe I don't. Can someone please help me?
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Randall@rsbecker@nexbridge.com to comp.sys.tandem on Tue Jul 5 08:01:04 2022
    From Newsgroup: comp.sys.tandem

    On Tuesday, July 5, 2022 at 7:53:55 a.m. UTC-4, hpm...@gmail.com wrote:
    please try to puy Select Count (*)
    instead of count(id)? your sql looks fine to me.

    //Henrik P
    tirsdag den 5. juli 2022 kl. 08.54.32 UTC+2 skrev gub...@gmail.com:
    Hi guys,

    It's my first message here but I hope that someone can help me.

    I'm doing a simple SQL with count, but I'm always getting an error and I don't know why.

    Here is the query:
    select
    count(ID)
    from table1
    where
    IDstate not in ("release", "finished")
    and dateformat(TIMESTAMP year to FRACTION(6), DEFAULT) > dateformat(DATETIME "2022-07-05:00:00:00.000000" year to FRACTION(6), DEFAULT)
    group by sequenceGroup
    browse access;

    here is the error:
    ...select count(ID) from table1...
    ^
    *** ERROR from SQL [-3074]: You cannot specify COUNT when ALL is specified.

    I didn't specified as ALL but maybe I don't. Can someone please help me?

    What are you trying to do? Count the number of unique IDs? Count the instances of each unique ID? Count the number of matching records?
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Gustavo Bertazzoli@guberta@gmail.com to comp.sys.tandem on Fri Jul 8 01:37:15 2022
    From Newsgroup: comp.sys.tandem

    On Tuesday, 5 July 2022 at 23:01:06 UTC+8, Randall wrote:
    On Tuesday, July 5, 2022 at 7:53:55 a.m. UTC-4, hpm...@gmail.com wrote:
    please try to puy Select Count (*)
    instead of count(id)? your sql looks fine to me.

    //Henrik P
    tirsdag den 5. juli 2022 kl. 08.54.32 UTC+2 skrev gub...@gmail.com:
    Hi guys,

    It's my first message here but I hope that someone can help me.

    I'm doing a simple SQL with count, but I'm always getting an error and I don't know why.

    Here is the query:
    select
    count(ID)
    from table1
    where
    IDstate not in ("release", "finished")
    and dateformat(TIMESTAMP year to FRACTION(6), DEFAULT) > dateformat(DATETIME "2022-07-05:00:00:00.000000" year to FRACTION(6), DEFAULT)
    group by sequenceGroup
    browse access;

    here is the error:
    ...select count(ID) from table1...
    ^
    *** ERROR from SQL [-3074]: You cannot specify COUNT when ALL is specified.

    I didn't specified as ALL but maybe I don't. Can someone please help me?
    What are you trying to do? Count the number of unique IDs? Count the instances of each unique ID? Count the number of matching records?

    Hi guys,

    yes, I'm trying to count the amount of IDs per sequenceGroup. But I already saw that I forgot the sequenceGroup in the select part.
    Thanks for the fast answer colleagues. I actually in the end, extracted to excel and did my countings directly on excel.

    Have a nice weekend!
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From invalid@invalid@nowhere.com (JShepherd) to comp.sys.tandem on Sun Jul 10 15:29:39 2022
    From Newsgroup: comp.sys.tandem

    In article <7cf20fd5-d35a-4282-a536-efbec3b84b7an@googlegroups.com>, guberta@gmail.com says...

    On Tuesday, 5 July 2022 at 23:01:06 UTC+8, Randall wrote:
    On Tuesday, July 5, 2022 at 7:53:55 a.m. UTC-4, hpm...@gmail.com wrote:
    please try to puy Select Count (*)
    instead of count(id)? your sql looks fine to me.

    //Henrik P
    tirsdag den 5. juli 2022 kl. 08.54.32 UTC+2 skrev gub...@gmail.com:
    Hi guys,

    It's my first message here but I hope that someone can help me.

    I'm doing a simple SQL with count, but I'm always getting an error and I d
    on't know why.

    Here is the query:
    select
    count(ID)
    from table1
    where
    IDstate not in ("release", "finished")
    and dateformat(TIMESTAMP year to FRACTION(6), DEFAULT) >
    dateformat(DATETIME "2022-07-05:00:00:00.000000" year to FRACTION(6), DEFA
    ULT)
    group by sequenceGroup
    browse access;

    here is the error:
    ...select count(ID) from table1...
    ^
    *** ERROR from SQL [-3074]: You cannot specify COUNT when ALL is specified
    .

    I didn't specified as ALL but maybe I don't. Can someone please help me?
    What are you trying to do? Count the number of unique IDs? Count the instances
    of each unique ID? Count the number of matching records?

    Hi guys,

    yes, I'm trying to count the amount of IDs per sequenceGroup. But I already saw
    that I forgot the sequenceGroup in the select part.
    Thanks for the fast answer colleagues. I actually in the end, extracted to excel
    and did my countings directly on excel.

    Have a nice weekend!

    maybe try

    select count(distinct id) from table1
    where <predicate>;



    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Randall@rsbecker@nexbridge.com to comp.sys.tandem on Sun Jul 10 13:26:34 2022
    From Newsgroup: comp.sys.tandem

    On Sunday, July 10, 2022 at 11:29:41 a.m. UTC-4, JShepherd wrote:
    In article <7cf20fd5-d35a-4282...@googlegroups.com>,
    gub...@gmail.com says...

    On Tuesday, 5 July 2022 at 23:01:06 UTC+8, Randall wrote:
    On Tuesday, July 5, 2022 at 7:53:55 a.m. UTC-4, hpm...@gmail.com wrote: >> > please try to puy Select Count (*)
    instead of count(id)? your sql looks fine to me.

    //Henrik P
    tirsdag den 5. juli 2022 kl. 08.54.32 UTC+2 skrev gub...@gmail.com:
    Hi guys,

    It's my first message here but I hope that someone can help me.

    I'm doing a simple SQL with count, but I'm always getting an error and
    I d
    on't know why.

    Here is the query:
    select
    count(ID)
    from table1
    where
    IDstate not in ("release", "finished")
    and dateformat(TIMESTAMP year to FRACTION(6), DEFAULT) >
    dateformat(DATETIME "2022-07-05:00:00:00.000000" year to FRACTION(6), DEFA
    ULT)
    group by sequenceGroup
    browse access;

    here is the error:
    ...select count(ID) from table1...
    ^
    *** ERROR from SQL [-3074]: You cannot specify COUNT when ALL is specified
    .

    I didn't specified as ALL but maybe I don't. Can someone please help me?
    What are you trying to do? Count the number of unique IDs? Count the instances
    of each unique ID? Count the number of matching records?

    Hi guys,

    yes, I'm trying to count the amount of IDs per sequenceGroup. But I already saw
    that I forgot the sequenceGroup in the select part.
    Thanks for the fast answer colleagues. I actually in the end, extracted to excel
    and did my countings directly on excel.

    Have a nice weekend!
    maybe try

    select count(distinct id) from table1
    where <predicate>;

    select id, count(1) from table1
    where <predicate>
    group by id;
    --- Synchronet 3.21d-Linux NewsLink 1.2