• Please provide ready to use sample data including your expected result as described in the first link in my signature.

    If possible, in your price table separate the number of days and the "direction" in two separate columns to and change the [NumberOfDays] column to the appropriate data type (e.g. INTEGER).

    Furthermore, please describe how to handle multiple results, e.g. what should the result set look like if you'd add the following row to your item table:

    Paper US New York 7

    Since your Price table would query for <10 days, you'll have two matching rows.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]