Hi All,
I need to write a shell script in UNIX that should accept booking number as an argument and update it with value "NULL" if the transaction date is greater than 2 years. Booking number and transaction_date are the two columns of the table table_booking.
Something like this, through shell script where booking_number would be the argument to the script:
update table_booking set booking_number=" " where transaction_date > 2 years.
Please help me out with this, me being very new to shell programming.
Thanks in advance.
Something doesn't compute here.
Since the booking_number column is anyway being set to null, what's the point of passing its value as the argument ?
Or have you provided only half the information ?
tyler_durden
If you want to update in table then any way you have to connect sql and run that command so better use PL/SQL query.
I think you had given only half information.
"Something like this, through shell script where booking_number would be the argument to the script:
update table_booking set booking_number=" " where transaction_date > 2 years.
"
This query is going work independent of the value of input argument i.e booking number...
Please state the exact requirement