| Author |
Topic  |
|
|
lostgolfballs
Starting Member
USA
5 Posts |
Posted - 10/08/2012 : 16:32:08
|
Hi,
We have an old OSQL script that is not working on the computers. I did some research and found out the command will work if it's converted to SQLCMD.
Since I'm not a SQL programmer, how can i convert the OSQL to SQLCMD script?
The original command line is
osql -Q "USE (DB Name) EXEC sp_importFedExData" -S(Db Path) -Usa -P(DB name) |
|
|
tkizer
Almighty SQL Goddess
USA
35007 Posts |
|
|
lostgolfballs
Starting Member
USA
5 Posts |
|
|
tkizer
Almighty SQL Goddess
USA
35007 Posts |
|
|
lostgolfballs
Starting Member
USA
5 Posts |
|
|
xhostx
Constraint Violating Yak Guru
USA
261 Posts |
Posted - 10/09/2012 : 11:47:52
|
I would go first to SQL server Query Analyzer and run that sp. if it succeed than you will be looking at changing your parameters of isql/osql/sqlcmd.
Also, look at what version of MS SQLserver you are running because that could be a cause too.
-------------------------- Joins are what RDBMS's do for a living |
 |
|
|
lostgolfballs
Starting Member
USA
5 Posts |
Posted - 10/09/2012 : 12:05:55
|
quote: Originally posted by xhostx
I would go first to SQL server Query Analyzer and run that sp. if it succeed than you will be looking at changing your parameters of isql/osql/sqlcmd.
Also, look at what version of MS SQLserver you are running because that could be a cause too.
-------------------------- Joins are what RDBMS's do for a living
|
 |
|
|
lostgolfballs
Starting Member
USA
5 Posts |
Posted - 10/09/2012 : 12:07:09
|
accident on the last post... this is what i got from the analyzer. Msg 102, Level 15, State 1, Line 2 Incorrect syntax near 'Q'.
quote: Originally posted by lostgolfballs
quote: Originally posted by xhostx
I would go first to SQL server Query Analyzer and run that sp. if it succeed than you will be looking at changing your parameters of isql/osql/sqlcmd.
Also, look at what version of MS SQLserver you are running because that could be a cause too.
-------------------------- Joins are what RDBMS's do for a living
|
 |
|
|
xhostx
Constraint Violating Yak Guru
USA
261 Posts |
Posted - 10/09/2012 : 13:43:27
|
you only need to execute the following on SQL analyzer:
"USE (DB Name) EXEC sp_importFedExData
-------------------------- Joins are what RDBMS's do for a living |
 |
|
| |
Topic  |
|