Viewing 15 posts - 151 through 165 (of 348 total)
Thanks for the answer..I had it working using table variables in my script and it worked fine.
October 29, 2020 at 6:41 am
Please refer to the code from @ktflash.
I had the code working I broke the existing code to return only 1 value(row/column) and that made it work with the outer select...
October 29, 2020 at 6:39 am
Thanks.
If a 3rd party tool takes db backups(full,diff,log) will that information be captured inside sql tables ?
October 27, 2020 at 6:18 pm
Should have mentioned no SSIS in the initial post.
Is CMS not capable of scheduling jobs ?
October 27, 2020 at 5:22 pm
That is part of my requirement that the result should say that the job does not exist - if it does not.
October 23, 2020 at 5:48 am
They worked good. I want to know how to fix the one I attempted.
October 22, 2020 at 2:09 pm
Error:Msg 116, Level 16, State 1, Line 26
Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.
select
(select @@servername) as...
October 22, 2020 at 11:40 am
wrong code posted.let me post it back
@ktflash
wrong code posted.let me post it back
we have a MYDB database.If that database exist only then...
October 22, 2020 at 9:50 am
the issue still persists..
I am trying to do an
select
(select...),
(select...exists...)
Those inner selects if they have an EXISTS it is throwing an error:Only one expression can be specified in the select list...
October 21, 2020 at 11:47 am
Thanks ktflash..worked like a charm !
October 21, 2020 at 8:57 am
@ktflash..thanks but...your code returns well when the job exists but....
you code returns nothing if the job does not exist.
My requirement is if the job does not exist it should return...
October 21, 2020 at 6:08 am
Thanks.
I need the job and its status if the job exists
If the job does not exist it needs to print out the
JobName under name column and Does not exists under...
October 20, 2020 at 5:12 pm
SELECT CASE
WHEN EXISTS ( SELECT name,enabled FROM msdb.dbo.sysjobs
WHERE name = 'Myjob' )
THEN 'Exists'
ELSE 'Does not exist'
END as 'SQL Job'
How do I add the enabled column to the output here?
If job...
October 19, 2020 at 12:43 pm
SELECT CASE
WHEN EXISTS ( SELECT name,enabled FROM msdb.dbo.sysjobs
WHERE name = 'MyJob )
THEN 'Exists'
ELSE 'Does not Exists'
END as 'SQL Job'
How do I add an additional column Job Status to the output...
October 19, 2020 at 12:10 pm
In this below query only if CustomerDB is present then the sql statements for columns JobAPresentAbsent, JobBPresentAbsent should execute if not under these columns JobAPresentAbsent, JobBPresentAbsent I should print CustomerDB...
October 19, 2020 at 9:36 am
Viewing 15 posts - 151 through 165 (of 348 total)