|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Prompting in SQL Plus
I want to do a prompt for a date for a table update I am doing but am not sure of the syntax.
Update Table.name SET STATUS = 'O' where STATUS = 'C' and IDS_REQUEST_DATE <= '01-JAN-02' This update will be used multiple times so I wanted to go ahead and just have it aske for a date instaead of having to update the core file each time. Any suggestions would be muxh appreciated. Thanks |
|
#2
|
|||
|
|||
|
Use bind variable, this can be defined by preceding & of any variable in your SQL statement.
Update Table.name SET STATUS = 'O' where STATUS = 'C' and IDS_REQUEST_DATE <= '&r_date' |
|
#3
|
|||
|
|||
|
Worked great. Thanks.
|
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Prompting in SQL Plus |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|