Viewing 15 posts - 57,811 through 57,825 (of 59,054 total)
No need for a function if you want to permanently correct the data...
UPDATE yourtable
SET phonenumbercol = REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
phonenumbercol
,',','')
,'-','')
,'.','')
,'(','')
,')','')
August 16, 2006 at 9:53 pm
Are you suggesting that RAC is better than Reporting Services (which is free, by the way)?
August 16, 2006 at 9:17 pm
Don't ya just love Microsoft? Fixes for their fixes!! Thanks for the tip, Daniel and welcome to SQLServerCentral.com.
August 16, 2006 at 8:12 pm
My DBA is the one who set it up so I'm not sure... but I'll find out...
August 16, 2006 at 8:01 pm
Yep... you can do that... like you said though, the automagic century-cutoff should do the trick but even that can be wrong if these dates are DOB's.
The slashes were an...
August 16, 2006 at 6:46 am
Oh yeah... almost forgot... if you want to see the code the script above generates, just change the "EXEC" to a "PRINT".
August 15, 2006 at 11:11 pm
Great code one and all. I've got a slightly different idea and it's pretty flexible for making other reports, as well. It also includes columnar and row totals as well...
August 15, 2006 at 11:02 pm
Nicely done... I'm just a bit squemish about relying on what the default datetime formats have been set to... also, if you replace @String with a column name in the...
August 15, 2006 at 8:14 pm
Why do you have trailing spaces and what is it that you're trying to do? Are you trying to find entries that have trailing spaces to eliminate the trailing spaces...
August 15, 2006 at 7:57 pm
Obviously, I've not tested this... but it should work...
UPDATE u1
SET InstantASP_UserID = u2.UserID
FROM MyDB1.dbo.Users u1,
MyDB2.dbo.InstantASP_Users u2,
dbo.aspnet_Membership a
WHERE a.UserId = u1.UserID
AND u2.EmailAddress...
August 15, 2006 at 7:26 pm
Having been in the telecommunications world for about 11 years, lemme just say...
DON'T COMBINE THE NPA AND NXX COLUMNS!!!!!!!! You will hate yourself so bad in the future for more...
August 15, 2006 at 7:20 pm
Stop looking at tables for this... use the built in functions...
IF OBJECT_ID('databasename.ownername.objectname') IS NOT NULL
DROP objecttype ownername.objectname
August 15, 2006 at 7:15 pm
Are you using the ENTERPRISE edition of SQL Server? If not, you must be using the STANDARD edition and that would be the reason why...
August 15, 2006 at 7:11 pm
Deadlocks ARE "critical errors"!!!
Deadlocks are lost data (an excessive waits) and are a key measure to the health of an SQL based system. Perhaps most companies have executives that are simply...
August 15, 2006 at 7:51 am
You bet, John... thank you kindly for the feedback.
August 15, 2006 at 7:36 am
Viewing 15 posts - 57,811 through 57,825 (of 59,054 total)