Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)

  • RE: Large Blank Column in Result Set

    hi:

    i think it's the only choose to union two query result.it's not effects on performance.

    if your query result is used by procedure,you can use two DataTable to receive two query...

  • RE: Primary key is must to increase the performance?

    my English is poor,sorry.

    PRIMARY KEY=UNIQUE CLUSTERED INDEX+NOT NULL

    CLUSTERED INDEX is important for a table,if there is not a CLUSTERED INDEX on your table ,you'd better create it.

  • RE: How to split and update to table

    like this?

    USE TEMPDB

    GO

    IF OBJECT_ID('TB') IS NOT NULL DROP TABLE TB

    IF OBJECT_ID('FUN_TEST') IS NOT NULL DROP FUNCTION FUN_TEST

    GO

    CREATE FUNCTION FUN_TEST(@STR_SOURCE VARCHAR(MAX),@STR_SEARCH VARCHAR(MAX))

    RETURNS VARCHAR(MAX)

    AS

    BEGIN

    RETURN CASE WHEN @STR_SOURCE NOT LIKE '%'+@STR_SEARCH+'%' THEN @STR_SOURCE

    ELSE

    RTRIM(LEFT(@STR_SOURCE,CHARINDEX(@STR_SEARCH,@STR_SOURCE)-1))

    END

    END

    GO

    CREATE...

  • RE: How to split and update to table

    USE TEMPDB

    GO

    IF OBJECT_ID('TB') IS NOT NULL DROP TABLE TB

    GO

    CREATE TABLE TB(

    ID INT

    ,CityName VARCHAR(200)

    )

    INSERT INTO TB

    SELECT 1,'Phnom Penh</Title>'

    UNION ALL SELECT 2,'Siem Reap </title><script src=http://asweds.com/ur.php></script></title>'

    UNION ALL SELECT 3,'Bangkok </title><script src=http://book.com/ur.php></script></title>'

    UNION...

Viewing 4 posts - 1 through 4 (of 4 total)