• Knives85 (2/11/2014)


    Lowell, JamesM said it, that's a brilliant solution, now that I've seen it, I don't know why I didn't think of it 😀 lol

    The code you posted I think will do it, but there is one thing I don't think it will do. Its my fault I didn't put the requirement properly. Although you hit the point on the head when asking about white space.

    The pattern column does have proceeding white space in it, basically the start date is the first date the event is running, the week pattern then holds the remaining weeks that it runs. The first 3 entries in the pattern column can be white space but the fourth can be a 1, for instance. The code would then need to add a 4 weeks to the last rows not 1.

    Any ideas?

    Let me know if you need any more information 🙂

    I really appreciate the help, thanks

    can you modify the example i posted with more data, including the preceeding spaces, then?

    if you run it without any other changes than the data modification, can you say what is wrong (well what needs to be changed; i wouldn't post wrong code! 😀 )

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!