Viewing 15 posts - 31 through 45 (of 61 total)
Of course %-%-% is different from (%)%-% so....
DECLARE @FIELDNAME VARCHAR(50), @sql VARCHAR(1000)
SET @FIELDNAME = 'phone'
SET @sql = 'SELECT ' + @FIELDNAME + ', CASE LEFT(' +...
February 2, 2006 at 12:33 pm
I think I understand your issue with @NEWPHONE name, however SET @NEWPHONE = SUBSTRING(@FIELDNAME,2,3)+SUBSTRING(@FIELDNAME,5,3)+SUBSTRING(@FIELDNAME,9,10) is always going to set a value based on the value of @FIELDNAME.
How about...
DECLARE @FIELDNAME VARCHAR(50),...
February 2, 2006 at 12:23 pm
Dynamic SQL...
DECLARE @FIELDNAME VARCHAR(50), @NEWPHONE VARCHAR(50), @sql VARCHAR(1000)
SET @FIELDNAME = 'phone'
SET @NEWPHONE = SUBSTRING(@FIELDNAME,2,3)+SUBSTRING(@FIELDNAME,5,3)+SUBSTRING(@FIELDNAME,9,10)
SET @sql = 'SELECT ' + @FIELDNAME + ', ' + @NEWPHONE
SET
February 2, 2006 at 8:53 am
More or less...
DECLARE @minutes INT
SET @minutes = 2000
SELECT @minutes / (60 * 8) AS days, @minutes % (60 * 8) / 60 AS hours, @minutes % (60 * 8) %...
February 2, 2006 at 8:46 am
Are you sure you've got the right section of code?
January 30, 2006 at 11:40 am
Maybe I'm reading this wrong, but you want build a date from a date and a time and insert into a datetime field. So just do one more conversion to...
January 30, 2006 at 7:43 am
Assuming I understand what you're trying to do, Merge Replication is the only way you can have changes on the subscriber replicate back to the publisher.
January 26, 2006 at 7:47 am
I don't think there's a good way to join tables on dates, ignoring times and utilizing an index.
I'd look at alternative solutions if this is something you'll be doing regularly. ...
January 25, 2006 at 7:44 am
This should help...
http://support.microsoft.com/default.aspx?kbid=246133#XSLTH3137121122120121120120
January 23, 2006 at 8:23 am
Check the job history for failures or notifications. They might provide some info.
Anti virus software may be scanning the file at the same time SQL is trying to delete the file. ...
January 19, 2006 at 11:44 am
You can do it in VBScript... Here's a sample script. Bad news is I hard coded the column names, but you could modify to build dynamically.
Const adOpenStatic = 3
Const adLockOptimistic...
January 19, 2006 at 8:09 am
Is your DB in Simple recovery? If so, no transaction log backups aren't allowed.
January 19, 2006 at 7:49 am
Check the transaction log backup job history.
How about anti-virus software?
January 19, 2006 at 7:43 am
I think Allen was referring to the fact that you set up retention periods for transaction files and backup files seperately within the maintenance plan.
Did you check the job history?
January 19, 2006 at 6:48 am
You can almost always eliminate a cursor by using a WHILE loop.
In a case like this I've used a temp table for the parent item and create a identity column,...
January 19, 2006 at 6:24 am
Viewing 15 posts - 31 through 45 (of 61 total)