Forum Replies Created

Viewing 15 posts - 136 through 150 (of 329 total)

  • Reply To: schedule a job in CMS

    Should have mentioned no SSIS in the initial post.

    Is CMS not capable of scheduling jobs ?

  • Reply To: Joining 2 select results into a single row

    That is part of my requirement that the result should say that the job does not exist - if it does not.

    • This reply was modified 4 years, 1 month ago by  mtz676.
  • Reply To: Joining 2 select results into a single row

    They worked good. I want to know how to fix the one I attempted.

     

  • Reply To: Joining 2 select results into a single row

    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...

    • This reply was modified 4 years, 1 month ago by  mtz676.
  • Reply To: Joining 2 select results into a single row

      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...

    • This reply was modified 4 years, 1 month ago by  mtz676.
    • This reply was modified 4 years, 1 month ago by  mtz676.
  • Reply To: Joining 2 select results into a single row

    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...

  • Reply To: Joining 2 select results into a single row

    Thanks ktflash..worked like a charm !

  • Reply To: Joining 2 select results into a single row

    @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...

  • Reply To: Adding columns in case statements

    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...

    • This reply was modified 4 years, 1 month ago by  mtz676.
    • This reply was modified 4 years, 1 month ago by  mtz676.
    • This reply was modified 4 years, 1 month ago by  mtz676.
  • Reply To: case statement

    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...

  • Reply To: case statement

    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...

  • Reply To: case statement

    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...

  • Reply To: case statement

    SELECT

    name AS DBName,

    CASE name

    WHEN 'CustomerDB' THEN 'Yes'

    ELSE 'No'

    END as DBs

    FROM sys.sysdatabases

    where name='CustomerDb'

    When CustomerDB is present it prints correct as below.

    Columns: DBName  Yes/No

    CustomerDB   Yes

    I need the where clause to filter for...

    • This reply was modified 4 years, 1 month ago by  mtz676.
    • This reply was modified 4 years, 1 month ago by  mtz676.
    • This reply was modified 4 years, 1 month ago by  mtz676.
  • Reply To: Capture data changes in a table

    This should suffice for now ->capture and record data changes.

    But looks like I am stumped prior to this task.

    I built multiserver administrative servers.

    My principal server has 1 job which I...

    • This reply was modified 4 years, 1 month ago by  mtz676.
    • This reply was modified 4 years, 1 month ago by  mtz676.
    • This reply was modified 4 years, 1 month ago by  mtz676.
    • This reply was modified 4 years, 1 month ago by  mtz676.
    • This reply was modified 4 years, 1 month ago by  mtz676.
    • This reply was modified 4 years, 1 month ago by  mtz676.
  • Reply To: Pintable into cache

    Thank you but my question was can caching/pinning tables be an option to avoid fragmentation ?

Viewing 15 posts - 136 through 150 (of 329 total)