Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Issuing SQL query from DOS console

830394Jun 27 2012 — edited Jun 27 2012
Hi:
Me a newbie in DB and SQL developer alike.
I am using SQL Developer 3.1.07 to connect MS SQL Server on Windows 7.

I could use the Worksheet on the SQL Developer to send SQL query and retrieve the data from table(s).
Example, I send the following SQL query from SQL Developer's Worksheet, which returns data under Query Result:
<code>
SELECT * FROM DIA_CENTRAL.DBO.ITEM_EVENTS WHERE WORKCENTRE_NUM = '053376' AND SCAN_DATE_TIME > '2012-06-26 00:00:00'
</code>

Now, I would like to do the same query from DOS console.
How can I:
1. Connect the DB (is there any command line command for SQL Developer to open and connect the DB)
2. Send the SQL query from console
3. Get the returned data on console (or making a redirection so that retrieved data could be saved as .CSV or plain text file)

Edited by: atomodachi on 26-Jun-2012 10:22 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 25 2012
Added on Jun 27 2012
5 comments
541 views