Forum Replies Created

Viewing 15 posts - 8,701 through 8,715 (of 15,381 total)

  • RE: Using pivot in sql

    vijay-367524 (4/15/2013)


    Hello,

    I have a sql table as below

    AutoIdPIDItemIdItemItemValue Date

    7560 432 1 Wbc 4 ...

  • RE: CROSS APPLY - Logical Query Processing

    It works just like the way your joins do. You can't reference a table that has not yet been joined. CROSS APPLY is really nothing more that more complex subselect.

    select...

  • RE: Update query help

    maxlezious (4/15/2013)


    Hi,

    When i run your code, on the second column actType I get '}' with all the results.

    For example:

    254}

    254}

    254}

    Is it possible for you to remove the '}'...

  • RE: Arithmetic overflow error - double join?

    With nearly 300 points I assume you have been around here awhile. Please take a few minutes and read the article at the first link in my signature. Then post...

  • RE: Dynamic SQL in stored procedure doesn't return result set; when run in SSMS I get results

    Melanie Peterson (4/15/2013)


    OK, it's Monday, brain is (more or less) refreshed and I'm posting the text of the sp, including the T-SQL that seemed to be causing the code to...

  • RE: RegEx CC

    I think we can do it like this. Basically we just use a word boundary and a simple replace. This will find any values with numbers between 13 and 16...

  • RE: Assign Validation Codes

    parikiti (4/12/2013)


    sorry for the late reply...

    Case 1:the first column can be considered as first one and also there is a time assigned when the that particular row was created like...

  • RE: SQL JOINS

    An interesting question. The duplicate ID's was certainly a nasty distraction. I managed to notice the ID issue but wonder what this question was really trying to test/teach. I think...

  • RE: Assign Validation Codes

    parikiti (4/12/2013)


    i have updated the sample scripts along with the insert statements...i was just reading guidelines for posting a question,hope that helps..

    We are getting there.

    The sample data is excellent. That...

  • RE: Assign Validation Codes

    That is somewhat more clear. What would be best at this point is to post ddl (create table scripts), sample data (insert statements) and sample output based on your sample...

  • RE: RegEx CC

    Now that you decided to go full on CLR for this you have a myriad of resources for your searches. I found this one which looks pretty good.

    http://www.regular-expressions.info/creditcard.html

    Here is another...

  • RE: Any ideas on how to accomplish this one?

    It is pretty scary!! After seeing yours I modified mine slightly to avoid the second cte which means our code is so close to the same it isn't even funny.

    ;with...

  • RE: Any ideas on how to accomplish this one?

    LOL I should have refreshed. Seems that Lowell beat me to the punch again.

  • RE: Any ideas on how to accomplish this one?

    Here is one way using DelimitedSplit8K.

    ;with split as

    (

    select AcctNum, Item

    from #Data

    cross apply dbo.DelimitedSplit8K(FuelType, ';')

    )

    , SingleVals as

    (

    select distinct * from split

    where Item > ''

    )

    select AcctNum,

    STUFF((select ';' + Item

    from SingleVals s2

    where...

  • RE: Dynamic SQL in stored procedure doesn't return result set; when run in SSMS I get results

    Melanie Peterson (4/12/2013)


    SSCrazy Eights - thanks for the warning. The input to this stored procedure, however, is done entirely through choices made in lists populated from the database. The user...

Viewing 15 posts - 8,701 through 8,715 (of 15,381 total)