Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004

    Question Unanswered: SQL Input Data and Retrieve?(Oracle)

    Hi there I need to create a script to highlighting any bookings recorded for a given date by entering the date from the keyboard.

    So far I've come up with the code below but I'm still unsure on how to get it work , any suggestions?

    SELECT Name, Phonenumber, Date_of_Arrival
    TO_CHAR('Date_of_Arrival, Date) "Input any Date:"
    From booking
    Order by Date_of_Arrival;


  2. #2
    Join Date
    Jan 2004
    Croatia, Europe
    Provided Answers: 5
    SELECT Name, Phonenumber, Date_of_Arrival
    FROM booking
    WHERE Date_of_Arrival = '&Input_any_date'
    ORDER BY Date_of_Arrival;

    Parameter "Input_any_date" should be entered in default date format. If you'd like to change it, change it to (for example)
    WHERE Date_of_Arrival = TO_DATE('&Input_any_date', '')

    By the way, "ORDER BY date_of_arrival" doesn't have much sense here as this query returns data for just one date.

Posting Permissions

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