Forum Replies Created

Viewing 15 posts - 421 through 435 (of 486 total)

  • RE: How to compare text columns

    Not especially efficient, but you can do

    WHERE CHARINDEX(, ) = 1

  • RE: Poor Performance Query

    Also, make sure your variable datatypes match up to your column datatypes. This has oft been reported as the cause of performance degradation between 7 and 2000.

  • RE: Help! - Removing non-alpha and spaces from a field script..

    Try this function.

    @cStripPat is the chars to remove. In your case, '%[^a-zA-Z]%'

    HTH

    P

    IF OBJECT_ID('dbo.ufn_XU_PatStrip') IS NOT NULL

    DROP FUNCTION dbo.ufn_XU_PatStrip

    GO

    CREATE FUNCTION dbo.ufn_XU_PatStrip

    (@cStringNVARCHAR(4000),

    @cStripPatNVARCHAR(4000))

    RETURNS NVARCHAR(4000)

    AS

    BEGIN

    DECLARE @nposINTEGER

    SELECT @npos = PATINDEX(@cStripPat, @cString)

    WHILE @npos...

  • RE: Sql Sever Installation

    If you can see it in programs, but not in services, likely you've only installed the client tools.

    Look for file named master.mdf on local drives. If it's there, you may...

  • RE: Difference in Query Plan

    If you check sysindexes in both DBs, you will see that they are not in fact the same -- the DB with no data will have fewer rows in sysindexes,...

  • RE: SOS - Cursor based Query taking forever

    Does something like this do what you want?

    INSERT TABLEM(ItemId, jAmount)

    SELECT t1.Item_Id, ISNULL(SUM(b.Var1), 0.00)

    FROM table1 t1

    JOIN table2 t2 ON t2.InventDimId = t1.InventDimId

    AND t2.wmsLocationId 'The Room'

    JOINbTable bON b.ItemId = t1.Item_Id

    AND b.DataAreaId...

  • RE: Alter Table

    Makes no difference where the column is physically in the table.

    Table can be Col1, Col2, Col3. You can retrieve them in any order you need/want/like.

    EM won't "re-create" an index unless...

  • RE: refresh sysdepends

    It gets out of whack pretty quick, I never depend on it (pardon the pun).

    Google sp_msdependencies to see if it can be of use to you.

  • RE: execution plan

    Appropriate indexing. If you see Bookmark Lookup in the plan, you may want to re-examine the indexes on the table.

    Clustered index scans = table scan. You already know about these.

    Stored...

  • RE: if want to get the index/constraint information from a table... where would i look?

    SELECT OBJECT_NAME(id), name

    FROM sysindexes

    WHERE OBJECT_NAME(id) NOT LIKE'sys%'

    AND indid > 0

    AND indid < 255

    ORDER BY 1, 2

    Note: table functions where the result set table has an index will also...

  • RE: Need Max Right 4 numeric values in list of alpha numeric

    Perhaps you could explain what you mean about Death by SQL? IsNumeric is a system function with a single precise purpose. In my humble estimation, pattern matching (especially with NOT,...

  • RE: Need Max Right 4 numeric values in list of alpha numeric

    IF IsNumeric(RIGHT(RTRIM('ABCDEF1234'), 4)) = 1

    print 'yay'

    else

    print 'boo'

    As already stated above, get the numbers and the letters into separate columns -- the way it's currently designed is not good, as evidenced...

  • RE: DTS, Scheduled jobs error

    Still had the old IP in SQL Client on the machine. D'Oh!

  • RE: Stored Procedure deadlock contention

    If you google SQL deadlock, you'll find a list of things to watch out for.

    Top of the list:

    1) Keep transactions as short as possible

    2) Always access tables in same order,...

Viewing 15 posts - 421 through 435 (of 486 total)