Forum Replies Created

Viewing 15 posts - 256 through 270 (of 375 total)

  • RE: Database connectivity using IP address

    What kind of router do you have this server plugged to? Can you replace it and see if this solves the problem? Maybe the network card on the server is acting...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: High ASCII Characters in data

    If I understand your request correctly then the code below might work or at least point you in the right direction

    UPDATE yourtable

    SET

    yourfield = LEFT(yourfield, PATINDEX('%[^''a-Z .,-]%', yourfield) - 1) +...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: ODBC related question

    I am afraid SQL 2000 is not HIPAA compliant. It does not natively encrypt the data.

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: How to find proc''''s users have access to that insert or update data

    Aaron,

    You have to be careful when using the schema views for scanning the SP code for specific strings. The view shows only first 4000 characters of the SP code....

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Pass Exit code from SQL Job Step

    Just use RAISERROR in the second case. This is going to force the Scheduler to end the step with a failure.

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: SQL 2000, I want to limit data in a field - how?

    You can use two INSTED OF triggers to do it.

    Using Jeff's table definition (Thanks):

    CREATE TABLE yourtable

    (

    RowNum INT IDENTITY(1,1) PRIMARY KEY,

    SomeString VARCHAR(100) NULL

    )

    CREATE TRIGGER T1

    ON yourtable

    INSTEAD OF INSERT

    AS

    INSERT INTO yourtable (SomeString)

    SELECT...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Calendar and Business Date Functions/Calculations

    I do a lot of code inspections so it helps.

    And for your second post. I often sacrifice a bit of performance (if I can) for code readability...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Calendar and Business Date Functions/Calculations

    Jeff,

    Just read your column and now I understand your reason for the extra day. And by the way I think you don't need the stripping of the time portion of...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Calendar and Business Date Functions/Calculations

    I have to do more reading of the stuff posted on this website. It would have saved me some time figuring out this function myself. My function was not as nice...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Calendar and Business Date Functions/Calculations

    Jeremy,

    I think the code works fine. 

       (DATEDIFF(dd, @StartDate, @EndDate))

      -(DATEDIFF(wk, @StartDate, @EndDate) * 2)

      -(CASE WHEN DATENAME(dw, @StartDate) = 'Sunday' THEN 1 ELSE 0 END)

      -(CASE WHEN DATENAME(dw, @EndDate) = 'Saturday'...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: How to run a stored procedure from within a stored procedure

    Is this what are you trying to do?:

    CREATE myProc

    @DisplayUnknown BIT,

    @Type CHAR(1),

    @dtDate DATETIME

    AS

    IF (@DisplayUnknown = 0)

    BEGIN

    EXEC stpSnapshotNormal @Type, @dtDate

    END

    ELSE

    BEGIN

    EXEC stpSnapshotUnknown @Type, @dtDate

    END

    Based on my coding standards I would call the SP like...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Begin/Commit Transaction question

    Because of the reasons presented above and because most SQL calls are in fact initated by a client we have implemented the transactions on the client side. So pretty much...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Update leading Zeros

    You are missing another ) before < 6

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Which is the best way to do it?

    I might have misunderstood your post so if you want to find all the tables you could use this and then build on it.

    SELECT SO.name

    FROM sysobjects SO

    INNER JOIN syscolumns...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Which is the best way to do it?

    How about this. Since you know how to do it both ways, why don't you run some tests and let us know how did they go.

    Many people will tell you...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

Viewing 15 posts - 256 through 270 (of 375 total)