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

    From Gustavo Bertazzoli@21:1/5 to All on Mon Jul 4 23:54:31 2022
    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?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Henrik Paludan-Moerk@21:1/5 to All on Tue Jul 5 04:53:54 2022
    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?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Randall@21:1/5 to hpm...@gmail.com on Tue Jul 5 08:01:04 2022
    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?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gustavo Bertazzoli@21:1/5 to Randall on Fri Jul 8 01:37:15 2022
    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!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From JShepherd@21:1/5 to All on Sun Jul 10 15:29:39 2022
    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>;

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Randall@21:1/5 to JShepherd on Sun Jul 10 13:26:34 2022
    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;

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)