Forum Replies Created

Viewing 15 posts - 541 through 555 (of 2,452 total)

  • RE: Finding a substring and extracting a number associated with it

    Hi Alan..have been following your recent scripts and am suitably impressed.

    its now

    bed o'clock here and busy tomorrow...but hoping I can work through and understand your code later tomorrow.

    JLS

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Finding a substring and extracting a number associated with it

    The Dixie Flatline (7/5/2016)


    JLS: I want to try to solve your new input set when time allows.

    look fwd to the "challenge" Dixie....good fun me...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Split AlphaNumeric

    PJ_SQL (7/5/2016)


    It is not sometimes it can be

    MDL-9054-1

    Or It could be like this as well:

    TX GMS-7000

    Dear PJ

    please read the following

    https://spaghettidba.com/2015/04/24/how-to-post-a-t-sql-question-on-a-public-forum/

    and then post all possible inputs and outputs required......thanks....I have a...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Decreasing a value across multiple rows until 0

    daniel.shepherd (7/5/2016)


    J Livingston - Thank you for being patient and understanding, and also for creating my sample data for me. After reading the link you posted I see that I...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Finding a substring and extracting a number associated with it

    Black Robin (7/5/2016)


    Hello

    Not sure if I’m missing something but could you not simplify it to :

    select * into #input

    from (values (1,'There have been 5 admissions and 3 discharges since 04/14/2016.')

    ,(2,'There...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Decreasing a value across multiple rows until 0

    daniel.shepherd (7/5/2016)


    OP is my supervisor and posted this question on my behalf.

    Transaction table - MerchantID, TransAmount

    20296, 200

    20331, 90.58

    Corrections table - MerchantID, CorrectionAmount, CreatedOn

    20296, 100.00, 6/1/16

    20331, 50.00, 6/1/16

    20331, 50.00, 6/5/16

    as you...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Decreasing a value across multiple rows until 0

    daniel.shepherd (7/5/2016)


    OP is my supervisor and posted this question on my behalf.

    Transaction table - MerchantID, TransAmount

    20296, 200

    20331, 90.58

    Corrections table - MerchantID, CorrectionAmount, CreatedOn

    20296, 100.00, 6/1/16

    20331, 50.00, 6/1/16

    20331, 50.00, 6/5/16

    We already...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Decreasing a value across multiple rows until 0

    greg.senne (7/5/2016)


    Hey, I'm still here! It was a holiday weekend! Guess I should've checked in over the weekend...

    So, this procedure is being used for payment deductions. The base table holds...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Date Range overlaps

    Nomvula (7/5/2016)


    How do I go about doing that?

    you need to exclude the rows with NULLS in cte "C1"

    and then in the end select, use UNION with a select for...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Finding a substring and extracting a number associated with it

    quentin.harris (7/4/2016)


    Awesome.

    It works. Now have to get my head round it what it actually all does.

    Thank you!

    well to start with, I suggest that you run this

    SELECT i.rowid, i.TextString, s.ItemNumber,...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Finding a substring and extracting a number associated with it

    quentin.harris (7/4/2016)


    Thank you.

    What is this line you are using:

    dbo.DelimitedSplit8K?

    sorry...should have posted the link.

    its a nasty fast "splitter"

    http://www.sqlservercentral.com/articles/Tally+Table/72993/

    the DelimittedSplit8K function (code is at end of article)

    and I suggest you read...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Copy over only new records using SSIS

    Can someone please advise on how to copy only new records from table A to table B

    how are determining what the new records are in Table A?

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Finding a substring and extracting a number associated with it

    quentin.harris (7/4/2016)


    Thank you for the replies.

    I will try to adapt what has been posted to suit our sandpit environment where i have discovered that some functions are not available...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Date Range overlaps

    Nomvula (7/4/2016)


    Hi

    Can you help me again, I added some additional data. It seems whenever there's a null end date, I'm not getting those values.

    CREATE TABLE #testtable(

    ID ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Finding a substring and extracting a number associated with it

    well this is an interesting exercise....and I found it fun to have a go.

    I appreciate that that this only a "workaround" until you get some sense into the data entry...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

Viewing 15 posts - 541 through 555 (of 2,452 total)