Viewing 15 posts - 61 through 75 (of 149 total)
I see you are using a third party tool to conduct your backups:
master.dbo.colt_sp_sqlmanager ''FULLDBBACKUP''
From reading your posting, it should have emailed an error...
March 20, 2008 at 2:34 pm
Another possibility is to use a union statement as follows:
SELECT DayOfWeek, SUM(NumberOfUser) AS [NumberOfUser]
FROM (SELECT UPPER(LEFT(DATENAME(dw, StartTime), 3)) AS DayOfWeek,
COUNT(DISTINCT UserID) AS NumberOfUser
FROM testUserLoginDuration
WHERE Archived = 0
GROUP BY...
March 20, 2008 at 2:16 pm
There are a couple of options that could work, but it depends on your {param2}. Could you please provide an example of {param2}?
Dave
March 20, 2008 at 1:24 pm
The error you are now getting is caused by a length value for the 3rd parameter in the SUBSTRING function that is less then 1. Try replacing the CASE...
February 27, 2008 at 9:07 am
I forgot the END statement on the CASE statement. Here is the correct SQL
INSERT INTO #a (aline)
VALUES (CASE WHEN @vcText = '0' THEN @vcText ELSE SUBSTRING(@vcText, 5, CHARINDEX(',', @vcText,...
February 27, 2008 at 8:37 am
Just one work of caution. The sql that I listed to parse the error text takes as an assumption that the error text will always start with 'MSG '.
Dave...
February 27, 2008 at 8:20 am
I am going to make some assumtions here
This is the error text returned for a bad file:
Msg 50204, Level 19, State 1, Line 0
LiteSpeed 2005 could not initialise the backup...
February 27, 2008 at 8:11 am
Could you give us a sample of the error text returned so that we can see how to parse out the error value from the text?
February 27, 2008 at 7:46 am
Try this:
DECLARE @vcText varchar(200)
EXEC @vcText = master..xp_restore_verifyonly @filename='C:\Backup\MyDB.lsb'
INSERT INTO {table} ({field})
VALUES (@vcText)
This will capture the return values from the SP. Now the question is if it returns a 1/0...
February 26, 2008 at 3:43 pm
Check out the CHARINDEX function and look for either the space or the comma or both depending on how clean you data is.
You can use the CHARINDEX function in the...
February 26, 2008 at 3:25 pm
Instead of puting the check in the where clause, why not use a case statement in the select to filter this. You will have to decide if the fullname...
February 26, 2008 at 3:21 pm
Here is how you can accomplish Prasad's first reccomendation:
CREATE Proc usp_GetTotalRecords
@iisrid int,
@iuserid int,
@sPregionCities varchar(200),
@iCampid int,
@iTotalrecord int Output
As
declare @iStart int,
@iPos int
declare @tblArray (iZip int)
IF RIGHT(@sPregionCities, 1) <> ','
SET @sPregionCities = @sPregionCities +...
October 31, 2007 at 11:32 am
Take a look at the Convert function
CONVERT(varchar(20), {datetime field}, 8)
You can also use 14 in place of the 8 to get milliseconds
Dave
January 29, 2007 at 11:30 am
This project was killed a few months ago. Put I do thank you for your recent replies. Actually, it was my boss that wanted to find out if there was...
December 29, 2006 at 9:42 am
If you are using SQL 2K or greater, you could great a user defined functions that returns a table variable.
Pass the comma delimited array to the UDF which parses it...
August 25, 2006 at 2:28 pm
Viewing 15 posts - 61 through 75 (of 149 total)