Quantcast
Channel: Toad for Oracle
Viewing all articles
Browse latest Browse all 4009

Forum Post: RE: How do I get multiple data records from a query using variables

$
0
0
If you want Toad to export data to a delimited file, then you should be creating SQL, not PL/SQL (It's PL/SQL if it starts with DECLARE or BEGIN). You don't need to use a variable. You can just put the code that you are using to get the variable into your query. Also you don't need to select sysdate from dual. You can just specify sysdate. Try this in the editor, and use F9 to run it. select * from ABC.TRAN where ENTRYDATE = case when RTRIM(to_char(sysdate,'day')) = 'monday' then TRUNC(SYSDATE) -3 else SYSDATE -1 end; Assuming this produces a result, to export to delimited text, right-click in the grid below and choose "Export Dataset". Then you can change export format to "Delimited text" and the rest should be self explanatory.

Viewing all articles
Browse latest Browse all 4009


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>