DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: unbelieveble!!

Threaded View

  1. #6
    Join Date
    Feb 2001
    Posts
    295
    And dat_saleb (dat_venda) is a DATE datatype.
    So, the following query...

    SQL> select dat_sale, count(*)
    2 from sales
    3 where dat_inc between to_date('30/06/2003', 'DD/MM/YYYY') AND to_date('01/07/2003', 'DD/MM/YYYY')
    4 group by dat_sale
    5 /
    ... would be probably show something like this, given you are grouping by dates, unless you truncate your dates or inserts them once a day in a single routine. Is that the case? That's why I suspected it's not a date column.

    Can you just type "desc sales"? We already know the table name and the column name, knowing the datatype won't hurt you so much.

    DAT_VENDA COUNT(*)
    --------- ----------
    30-APR-03 1
    30-APR-03 1
    30-APR-03 1
    30-APR-03 1
    .
    .
    .
    30-JUN-03 1
    30-JUN-03 1
    30-JUN-03 1
    .
    .
    .
    31-JUN-03 1
    31-JUN-03 1
    31-JUN-03 1
    .
    .
    .
    What is the date_inc column, anyway?

    Don't tell me what the actual name is because I don't want you killing me after telling me.
    Steven, someday someone will kill you anyway, because of that constant bad mood.
    Last edited by adrianomp; 07-07-2003 at 05:36 PM.
    An ounce of action is worth a ton of theory.
    —Friedrich Engels

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width