Viewing 15 posts - 646 through 660 (of 789 total)
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)
...
July 4, 2003 at 10:42 pm
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...
July 4, 2003 at 10:35 pm
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)...
July 4, 2003 at 2:54 pm
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...
July 4, 2003 at 8:01 am
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...
July 4, 2003 at 7:44 am
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,...
July 4, 2003 at 7:30 am
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? ...
July 4, 2003 at 1:34 am
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.
July 3, 2003 at 10:44 pm
Joe, Try:
SELECT CONTACT_ID ,
[YTD AMOUNT] = AMOUNT,
[PRIOR YEAR AMOUNT] = (SELECT AMOUNT
...
July 3, 2003 at 10:41 pm
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...
July 3, 2003 at 9:46 pm
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...
July 3, 2003 at 6:02 pm
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...
July 3, 2003 at 5:15 pm
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...
July 3, 2003 at 6:33 am
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 +...
July 3, 2003 at 6:17 am
Viewing 15 posts - 646 through 660 (of 789 total)