Thread: help with query

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    5
    Rep Power
    0

    Question help with query


    need help retrieving data from a table:

    order_table

    order_id, method_payment (cash, cc), order_date(02-nov-02, 14-dec-02...etc)


    how do i get orders placed in first 10 days in november 2002 in which payment method was cash?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    68
    Rep Power
    11
    Please try:

    select * from order_table
    where
    trunc(order_date,'DD') >= to_date('10-2003','mm-yyyy')
    and trunc(order_date,'DD') <= to_date('10-10-2003','mm-dd-yyyy')
    and method_payment = 'cash'

    Cheers,
    Dan

IMN logo majestic logo threadwatch logo seochat tools logo