Hi Devin,
   Please have the to_date function when passing the value to l_shipdate.

select
        "l_returnflag",
        "l_linestatus",
        sum("l_quantity") as sum_qty,
        sum("l_extendedprice") as sum_base_price,
        sum("l_extendedprice" * (1 - "l_discount")) as sum_disc_price,
        sum("l_extendedprice" * (1 - "l_discount") * (1 + "l_tax")) as
sum_charge,
        avg("l_quantity") as avg_qty,
        avg("l_extendedprice") as avg_price,
        avg("l_discount") as avg_disc,
        count(*) as count_order
from
        LINEITEM
where
        "l_shipdate" <= *to_date('1998-09-02 12:12:12')*
group by
        "l_returnflag"
order by
        "l_returnflag",
        "l_linestatus";

Regards
Ravi


On Fri, Feb 7, 2014 at 8:53 PM, Devin Pinkston
<[email protected]>wrote:

>  Hello,
>
>
>
> I am trying to run the following query, but I keep hitting "ERROR 602
> (42P00) Syntax error.  Missing "EOF" at line 15, column 28".  Line 15 is
> the where clause l_shipdate <=.  The l_shipdate column is a DATE type.
>
>
>
> The Query:
>
>
>
> select
>         "l_returnflag",
>         "l_linestatus",
>         sum("l_quantity") as sum_qty,
>         sum("l_extendedprice") as sum_base_price,
>         sum("l_extendedprice" * (1 - "l_discount")) as sum_disc_price,
>         sum("l_extendedprice" * (1 - "l_discount") * (1 + "l_tax")) as
> sum_charge,
>         avg("l_quantity") as avg_qty,
>         avg("l_extendedprice") as avg_price,
>         avg("l_discount") as avg_disc,
>         count(*) as count_order
> from
>         LINEITEM
> where
>         "l_shipdate" <= 1998-09-02 12:12:12
> group by
>         "l_returnflag"
> order by
>         "l_returnflag",
>         "l_linestatus";
>
>
>
> Is there a general reason why this is happening?
>
>
>
> Thanks
>
> The information contained in this transmission may contain privileged and
> confidential information.
> It is intended only for the use of the person(s) named above.
> If you are not the intended recipient, you are hereby notified that any
> review, dissemination, distribution or duplication of this communication is
> strictly prohibited.
> If you are not the intended recipient, please contact the sender by reply
> e-mail and destroy all copies of the original message.
> Technica Corporation does not represent this e-mail to be free from any
> virus, fault or defect and it is therefore the responsibility of the
> recipient to first scan it for viruses, faults and defects.
> To reply to our e-mail administrator directly, please send an e-mail to
> [email protected]. Thank you.
>
  • Query EOF Devin Pinkston
    • Re: Query EOF Ravi Kiran

Reply via email to