Help
Is OSQL compatible with 2005??
I am getting very messed up output in my file when I run OSQL on 2005... lots of blank lines and dashed lines.
If I run on 2000, it's fine...
what's the problem?
Thanks
So, here is the workaround:
create table myTable(name varchar(20))
insert into myTable values ('Sue')
insert into myTable values ('Joe')
insert into myTable values (null)
insert into myTable values ('Meg')
insert into myTable values ('Ryan')
DECLARE @myVar VARCHAR(100)
SELECT
@myVar =...
I'm sorry that isn't true... the problem is not multiple rows in the table not being able to be stored in the variable... it's the TEMP table
I can do the select into the variable just fine with a regular table, and the @output formats the multiple rows beautifully... that what this is doing...
Hi,
I am running the following stmts.
insert into #tmp EXEC @result = master..xp_cmdshell @cmd
SELECT @output = IsNull(@output + char(10) + result, result)
FROM #tmp
PRINT @output -- this is NULL!!
SELECT * from #tmp -- this returns ROWS!!
END
I don't understand this... I believe it...
Hi
I need to select into a variable:
insert into #tmp EXEC @result = master..xp_cmdshell @cmd
IF (@result <> 0) -- return value from xp_cmdshell, 0 = success, 1 = failure
BEGIN
SELECT @output = result FROM #tmp
But @output is empty... but #tmp is not.
Help, how can I capture row data...
Thanks for the info :-)
Have one more question, this is for 2005.
When I query the sysjobs table using "select * from sysjobs"
there is no originating_server column, only an originating_server_id column and it's "0" for all jobs.
Doing a little poking around:
(select distinct...
one more thing, though...
while I can do this manually, I'm just wondering if there's a better way... can't help but wonder if I can automate this... afterall, it may be difficult to keep track of what's changed with many different developers, it would be very easy to overlook something...
thanks
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.