Forum Replies Created

Viewing 15 posts - 286 through 300 (of 526 total)

  • RE: Sql Update

    You would need to add a column like Last_Updated and then create a trigger to update the column whenever something was inserted/updated on the table.



    ----------------
    Jim P.

    A little bit of this and a little byte of that can cause bloatware.

  • RE: Need to append a character onto end of data in a column

    Okay - to cover every realm of possibility :

    UPDATE TableName
    SET SupplyName = LTRIM(RTRIM(SupplyName)) + '@'
    WHERE RIGHT(SupplyName,1)  '@'
    AND LEN(SupplyName) < 32

    Now,



    ----------------
    Jim P.

    A little bit of this and a little byte of that can cause bloatware.

  • RE: Need to append a character onto end of data in a column

    Good point. I just took the obvious.



    ----------------
    Jim P.

    A little bit of this and a little byte of that can cause bloatware.

  • RE: DataType Change in Large Table

    I know, but we could probably assume that the original FK relationship was done progromatically instead of constraint/referential.

    Just wanted her to check for the obvious.



    ----------------
    Jim P.

    A little bit of this and a little byte of that can cause bloatware.

  • RE: attach all the datababses

    sa24,

    Must be an easier way (move logs)

    Just wanted to pass on that I modified you script and posted it here to almost fully automate the moving of log and...



    ----------------
    Jim P.

    A little bit of this and a little byte of that can cause bloatware.

  • RE: Must be an easier way (move logs)

    It took me a day or two work through what sa24 posted, and somehow my sysaltfiles didn't agree with the sysfiiles.

    But it made my life easier, and sounds like it...



    ----------------
    Jim P.

    A little bit of this and a little byte of that can cause bloatware.

  • RE: DataType Change in Large Table

    The way I would do it:

    First off

    SELECT FKCol

    FROM TableName

    where ISNUMERIC(FKCol) =0

    To make sure that the all data in the column is a valid numeric number.

    ALTER TABLE TableName

    Drop constraint FK_CONSTRAINT_NAME

    GO

    ALTER...



    ----------------
    Jim P.

    A little bit of this and a little byte of that can cause bloatware.

  • RE: Finding all occurenses of a field in a databaes

    Try:

    SELECT *

    FROM INFORMATION_SCHEMA.COLUMNS

    WHERE COLUMN_NAME = 'first_name'

    or with wildcards

    SELECT *

    FROM INFORMATION_SCHEMA.COLUMNS

    WHERE COLUMN_NAME LIKE '%first%'

    will find every occurence of the word "first" in the database if you are set to a case...



    ----------------
    Jim P.

    A little bit of this and a little byte of that can cause bloatware.

  • RE: Need to append a character onto end of data in a column

    For a one time run:

    UPDATE TableName
    SET Target = Source + '@'

    For multiple runs:

    UPDATE TableName
    SET Target = Source + '@'
    WHERE RIGHT(Target,1)  '@'

    That way you only are touching the new records.



    ----------------
    Jim P.

    A little bit of this and a little byte of that can cause bloatware.

  • RE: Why a tran log size jump?

    Sorry I took so long to get back on this.....

    I can't do the intregity checks prior because we have to have the DBs available to users until 7:00PM EST. So...



    ----------------
    Jim P.

    A little bit of this and a little byte of that can cause bloatware.

  • RE: DB Attach-Detach problem

    MS KB articles:

    PRB: Error message 823 may indicate hardware problems or system problems

    and

    PRB: Additional SQL Server Diagnostics Added to Detect Unreported I/O Problems

    They both suggest hardware problems...



    ----------------
    Jim P.

    A little bit of this and a little byte of that can cause bloatware.

  • RE: Must be an easier way (move logs)

    I went through this with 20 DBs a few weeks ago. The following script is adapted from attach all the datababses.

    if exists (SELECT * from dbo.sysobjects...



    ----------------
    Jim P.

    A little bit of this and a little byte of that can cause bloatware.

  • RE: Unable to Edit/Delete Job

    Just throwing out an idea.....

    Can you restart the SQL Server Agent and then try to delete it?

    Just a random thought.



    ----------------
    Jim P.

    A little bit of this and a little byte of that can cause bloatware.

  • RE: restore backup versus detach / attach move

    means that the db will no longer exist on the test server (which is fine)

    Just a point, if you copy instead of move, you can just re-attach the DB to...



    ----------------
    Jim P.

    A little bit of this and a little byte of that can cause bloatware.

  • RE: Connecting to the Sql server using NT authentication

    Another thing to check is DNS resolution, in both the ODBC call and and the client level.

    From a cmd line ping %ServerName% - does it successfully resolve?

    If not "ipconfig /flushdns"...



    ----------------
    Jim P.

    A little bit of this and a little byte of that can cause bloatware.

Viewing 15 posts - 286 through 300 (of 526 total)