|
Posted by Erland Sommarskog on 06/18/05 00:34
NickName (dadada@rock.com) writes:
> Did you have a chance to run the script yourself? I just tried with a
> slight twist, that is, I first compare all the procs in two identical
> dbs and fetch the mismatched ones into a temp tbl, then loop them
> through a cursor, within the cursor I used your technique, got err
> "{the long command string} is not a valid identifier", btw,
Since you did not include the twist, and also insisted on not including
the complete error message, you cannot count for much help. But apparently
you used " where you should have used '. By default " delimites identifiers,
not string literals. (But in OSQL, it's actually different to confuse.)
However, I do spot an error in Josh's suggestion: he inserts into a
table variable. That does not fly with INSERT-EXEC. Must use temp table.
> BOL has no indication as to which OSQL param is mandatory and which ones
> are optional.
It has. If you look at the syntax grapgh you will see that no option
is mandatory, but that there are four options of which you must pick
one.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
[Back to original message]
|