Issuing SQL query from DOS console
830394Jun 27 2012 — edited Jun 27 2012Hi:
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