Forum Replies Created

Viewing 15 posts - 646 through 660 (of 789 total)

  • RE: the update() function in a trigger

    The INSERT of NULL will cause UPDATE() to be true for that column, regardless of whether the NULL is explicitly supplied or implicit (by omitting it from the values list)

    ...

  • RE: Is there a timeout on jobs?

    Should not be a problem. I've often run procedures that run continuously (eg. procedures that check for blocking and take appropriate action). Such procedures have usually included a...

  • RE: How to convert Character to date

    SQL Books Online has all the convert functions. In the dd.mm.yyyy case a "104" tells CONVERT that it's a "German" style date with a 4-digit year.

    select convert(datetime, '27.02.2003', 104)...

  • RE: How to convert Character to date

    If you want to convert a dd/mm/yyyy string to a datetime value use something like:

    select convert(datetime, '27/02/2003', 103)

    or

    select convert(datetime, BillingDate, 103)

    The "103" tells the CONVERT function that the...

  • RE: Email notification in MSDE

    You need to join msdb..sysjobhistory with msdb..sysjobs and look at sysjobhistory.run_status for step 0. Steps 1 onwards apply to the individual job steps whereas step 0 pertains to the...

  • RE: getting a value from sql server into dos variable

    It works ok for me. I can only suggest to break it down into components. ie. Does the OSQL command by itself return expected results? If so,...

  • RE: Creating a Test Database

    Detaching and reattaching files sounds very disruptive to your production users. I would go with an option that has little or no disruption.

    Do you do your backup/copy/restore manually? ...

  • RE: Assign Database Roles

    In EM, expand the database and the users, right-click on the user, select properties and then just check each role that you want assigned.

  • RE: Correlated Subquery - Please Help

    Joe, Try:

    SELECT CONTACT_ID ,

    [YTD AMOUNT] = AMOUNT,

    [PRIOR YEAR AMOUNT] = (SELECT AMOUNT

    ...

  • RE: SQL 2000 and NT 4 Server

    Any more infomation, such as address and DLL?

  • RE: Email notification in MSDE

    Provided you SQL Server can see an SMTP mail server, you could have a scheduled job that runs regularly checking for recently failed jobs. Results, if any, can be...

  • RE: getting a value from sql server into dos variable

    Somewhat convoluted, but here's one way:

    FOR /F "tokens=1-2" %i IN ('osql -E -Q"select 'SET DBNAME=' + db_name(2)"') DO @IF /I %i EQU SET SET %j

    echo %DBNAME%

    The OSQL Query "select 'SET...

  • RE: Multiple-Devices for Full Backups

    Shas3's "disk to tape" point is important. I can't emphasise enough the need to get those backups off the server and onto another medium or another (possibly remote) server.

    It...

  • RE: RAISERROR

    Don't use a severity level of 18 if you don't want the job step to "fail". To record successful completion whilst still using RAISERROR, try a severity level of...

  • RE: Dynamic sql (sp_executesql)

    You were almost there.

    Try the following:

    declare @strSQL nvarchar(500)

    declare @dbname sysname

    declare @tablename sysname

    declare @icount int

    set @dbname = 'Pubs'

    set @tablename = 'Employee'

    SET @strSQL ='select @icount = COUNT(*) FROM ' + @DBName +...

Viewing 15 posts - 646 through 660 (of 789 total)