Forum Replies Created

Viewing 15 posts - 4,246 through 4,260 (of 7,496 total)

  • RE: Are the posted questions getting worse?

    .... a diaper issue, so to say :w00t:

  • RE: Scope: The drastic caveat with Logon Triggers.

    Thank you for the comments.

    Fortunately it didn't take me that much time to figure out the issue :Whistling:

    I'm always using my version of sp_who to see what's going on...

  • RE: Backup using Device

    ps (12/14/2008)


    ...

    My questions are:-

    1. how to control the number of backup sets that can be written in a file using the device i created above( in above example 2 backups...

  • RE: Database Mail

    Off course the @recipients parameter still needed modification ...

    while @@fetch_status = 0

    begin

    Set @emailrecepients = @ops_manager_email + ';' + @it_manager_email

    Declare @TheQuery varchar(1000)

    Set @TheQuery = 'Select refno , ben_name, amount ,...

  • RE: How to convert detail data into columns?

    Here's a "dynamic" solution.

    Primitive, but effective

    It requests your data for all children with a total of 5

    but it includes twins, triplets, ...

    If you have 3 children and then are...

  • RE: Database Mail

    As you'll see I've commented the send_dbmail , you must un-comment it.

    Test it first.

    drop table branch_info

    go

    create table branch_info

    (

    br_code ...

  • RE: Database Mail

    s_kaswani (12/10/2008)


    Dear when i execute i got this error

    (5 row(s) affected)

    Msg 137, Level 15, State 2, Line 14

    Must declare the scalar variable "@ops_manager_email".

    Msg 137, Level 15, State 2, Line 17

    Must...

  • RE: Database Mail

    Simplest is to concatenate both columns in your query to a format your targetusage needs (dbmail)

    Declare @email_recepients varchar(225)

    declare @email_body nvarchar(max)

    declare mail_merge2 cursor for select DISTINCT @ops_manager_email + ';'+ @it_manager_email,email_body from...

  • RE: Database Mail

    So your goal is to only send one email per recepient ?

    In that case, alter your cursor :

    declare mail_merge cursor for select DISTINCT supervisor_email,email_body from mail_merge

  • RE: How to Create and Start SQL Server Trace Automatically

    easyest way is to use sql server profiler.

    Create your trace with all filters (db) you want and script it.

    Then launch it in a startup job or procedure.

  • RE: Database Mail

    Change your dbmail-query !

    Declare @TheQuery varchar(1000)

    Set @TheQuery = 'Select * from dbo.mail_merge where supervisor_email = ''' + @supervisor_email + ''' '

    execute msdb.dbo.sp_send_dbmail

    @profile_name = 'Scn',

    @recipients = @supervisor_email,

    @subject = 'SCN...

  • RE: Log an error message/message to Event Viewer without the error number , severity and state

    No, not using raiserror.

    Other options ?

    - alter the monitoring software

    - write your own xp ( :sick: ) to log the message you want. :sick:

  • RE: SQL fn (convert(.......,............,) as xxx

    From Books Online 😉

    If you specify only the last two digits of the year, values less than or equal to the last two digits of the value of the two...

  • RE: FK relation error

    there can be more than one child table for any parent table..

  • RE: VERY SLOW query

    First of all I would start using the correct datatype to query.

    Use a datetime variable to query your dates.

    You can do that changing the functions inputparameters to a single date...

Viewing 15 posts - 4,246 through 4,260 (of 7,496 total)