Forum Replies Created

Viewing 15 posts - 4,081 through 4,095 (of 8,731 total)

  • RE: UPDATE Multiple columns in a CTE

    Do you mean something like this?

    CREATE TABLE CharsTest(

    myvarchar varchar(10),

    myNvarchar nvarchar(10),

    myLvarchar varchar(max));

    SELECT *...

  • RE: Comparing and splitting data

    Check the following, try to understand it, follow the links and read the articles. Post any questions that you might have.

    CREATE TABLE #Table1 (

    ID INT IDENTITY(1,1),...

  • RE: need help with sql query, please help!

    Can you post DDL, sample data and expected results? You can read how to do it in the link on my signature.

    It doesn't seem like a difficult task, but I'm...

  • RE: Today's Random Word!

    Ed Wagner (9/29/2015)


    djj (9/29/2015)


    Ed Wagner (9/29/2015)


    SQLRNNR (9/28/2015)


    DonlSimpson (9/28/2015)


    Ed Wagner (9/28/2015)


    whereisSQL? (9/28/2015)


    djj (9/28/2015)


    Ed Wagner (9/28/2015)


    anthony.green (9/28/2015)


    ZZartin (9/28/2015)


    Leaf

    Heap

    Cluster

    Single

    Engaged

    Active

    Passive

    Node

    Tree

    Family

    History

    Channel

  • RE: UPDATE Multiple columns in a CTE

    Can you update data from multiple tables in the same UPDATE statement, by joining those tables in a CTE ?

    No, you can't.

    From BOL

    Updatable Views

    You can modify the data of an...

  • RE: Wildcard Searches

    standardbluecaboose (9/29/2015)


    Thanks for the quick reply.

    The WHERE ' ' + Name + ' ' LIKE '%[^A-Za-z]Richard[^A-Za-z]%'; is insane in a bad way. I have no suggestions for how to make...

  • RE: Wildcard Searches

    jose.pla (9/29/2015)


    Hi Luis,

    If possible a sequel of this article could be a performance comparison between LIKE and PATINDEX, and maybe also include CONTAINS.

    ...

  • RE: Wildcard Searches

    Alan.B (9/29/2015)


    Great article Luis! Informative, to the point. I picked up a couple things.

    Interesting technique using REPLICATE, I would add that I like to use CHAR() more...

  • RE: Wildcard Searches

    standardbluecaboose (9/29/2015)


    3 comments:

    SELECT *

    FROM dbo.LIKETest

    WHERE ' ' + Name + ' ' LIKE '%[^A-Za-z]Richard[^A-Za-z]%';

    That is insane.

    I'm not sure if this is good or bad.

    '[1-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]'

    TIL 9000-19-39 is a valid...

  • RE: Wildcard Searches

    peter.row (9/29/2015)


    It would be interesting to see some performance information with some large data to see how this performs.

    I'd always thought that a lot of these kinds of operations would...

  • RE: Wildcard Searches

    Michael G (9/29/2015)


    Hi,

    Thanks for the article. I decided to try your email wildcard like search on our email list with a small tweak.

    Not all email address end with .com or...

  • RE: parameters

    Because in the string for sp_executesql, you're calling the sp as

    EXEC R01OrderForm @Region, @District, @Dealer, @ProductSegment, @ReportPeriod, @LoginLevel

    That code will assign the values to the parameters in the order...

  • RE: SELECT question, for multiple condition

    You could go for something like this:

    WITH CTE AS (

    SELECT '100' PAT_ID, 1200 PLAN_ID, 'ALPHA' PLAN_NAME UNION

    SELECT '100' PAT_ID, 1300 PLAN_ID, 'BRAVO' PLAN_NAME UNION

    SELECT '200' PAT_ID, 1200 PLAN_ID, 'ALPHA' PLAN_NAME...

  • RE: How to avoid using scalar User Defined Functions?

    Kim Crosser (9/28/2015)


    The real question is whether the UDFs are causing any performance problems. 10x sounds horrible, but in your system does that result in a query that runs...

  • RE: Is there a COALESCE() function in SSRS? Please help.

    I'm not sure if it's included in a recent version, but usually this is what it works.

    =iif(isNothing(Fields!FV1.Value), Fields!FV2.Value, Fields!FV1.Value)

Viewing 15 posts - 4,081 through 4,095 (of 8,731 total)