Forum Replies Created

Viewing 15 posts - 57,811 through 57,825 (of 59,054 total)

  • RE: Validating Phone Numbers

    No need for a function if you want to permanently correct the data...

     UPDATE yourtable

        SET phonenumbercol = REPLACE(

                             REPLACE(

                             REPLACE(

                             REPLACE(

                             REPLACE(

                             phonenumbercol

                             ,',','')

                             ,'-','')

                             ,'.','')

                             ,'(','')

                             ,')','')

  • RE: crosstab

    Are you suggesting that RAC is better than Reporting Services (which is free, by the way)?

  • RE: SQL 2000 only addressing 8 GB of avail 16 GB memory...why?

    Don't ya just love Microsoft?  Fixes for their fixes!!  Thanks for the tip, Daniel and welcome to SQLServerCentral.com.

  • RE: Monthly Metric Report

    My DBA is the one who set it up so I'm not sure... but I'll find out...

  • RE: Convert Varchar to datetime

    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...

  • RE: Pivot Report

    Oh yeah... almost forgot... if you want to see the code the script above generates, just change the "EXEC" to a "PRINT". 

  • RE: Pivot Report

    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...

  • RE: Convert Varchar to datetime

    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...

  • RE: ''''SMITH'''' does NOT equal ''''SMITH ''''

    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...

  • RE: Update statement referencing another database from same server

    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...

  • RE: Combine two columns into one?

    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...

  • RE: Checking if a Table Exists

    Stop looking at tables for this... use the built in functions...

    IF OBJECT_ID('databasename.ownername.objectname') IS NOT NULL

    DROP objecttype ownername.objectname

  • RE: SQL 2000 only addressing 8 GB of avail 16 GB memory...why?

    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...

  • RE: Monthly Metric Report

    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...

  • RE: Can I do this using a ''''self-join''''? Please Help.

    You bet, John... thank you kindly for the feedback.

Viewing 15 posts - 57,811 through 57,825 (of 59,054 total)