Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Alan Learner
Starting Member
4 Posts |
Posted - 2013-09-11 : 06:40:07
|
I am debugging some code that builds a SQL command which runs successfully.However at the end of the query it looks as if the results of the query are written to a text file.The full query is belowecho SELECT DATE,DATETABLE,DATE,APPDATE FROM CTD_ADF WHERE DATE IN (20130911) > sql.txt && sql -h-1 -i sql.txt && del sql.txtI assume the " > sql.text " is basically saying create and write the results to a text file called sql.text?And, at the end " && del sql.txt " deletes the sql.text file at the end of execution?But what does the " && sql -h-1 -i sql.txt " commands do / mean?I've tried researching the -h-1 -i commands but so far have not managed to find an answer. |
|
LoztInSpace
Aged Yak Warrior
940 Posts |
Posted - 2013-09-11 : 07:37:29
|
it's executing your file using the "sql" program.The flags will be specific to whatever program that is. Try sql -? and see what it says. |
|
|
Alan Learner
Starting Member
4 Posts |
Posted - 2013-09-11 : 07:46:47
|
Ok, thank you i will try using the -?. |
|
|
|
|
|