A query that compares different values

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Geir Baardsen

    A query that compares different values

    Hi!
    I might have a difficult cuestion.

    In our database we have registered different tyres with different
    dimensions from different suppliers that is both for summer and winter
    season.

    Now I have simplified the database by having a tblCategory, so that I
    can run queries with this condition. So all tyres that are for
    summerseason, will be in the category: Tyres/su-Pirelli and tyres for
    winterseason will be in the category: tyres/wi-pir and so on...

    Now I want to construcy a query that compare prices for the same
    dimension, say 175/80-13 (with the suffix H or T or whatever...) and
    have it shown in a form or maybe a report.

    I must admit - I'm blank here. This seems to be possible only in code?
    As it is for now I have made a query, limiting the choice by: Like
    "tyres/su-pir*" as a condition in the query. So I have copied this
    query, one for each sort of tyre, and the user can open each query to
    compare prices. A bit slow and "un-proffesional" I think.

    Anybody that know how I should go around?
  • Pavel Romashkin

    #2
    Re: A query that compares different values

    I would recommend against creating types that include brand in them.
    To make simple and efficient design, make your tables hold only the
    logically identical information. Thus, the type would be just Summer or
    Winter (can be done by making a IsWinter field of Yes/No type). I would
    also create separate tables for Manufacturers, Size and Options such as
    WhiteRaisedLett er and others. In fact, you can easily do this by
    splitting your existing table, even by using an Access wizard.
    Then it becomes very easy to fill in the details in a junction table
    using primary keys from all the main tables.
    However, this is all in theory. I know that once you have a database,
    you become hesitant to make changes to the design. Therefore, post here
    your table structure (tables names and field names), and people may be
    able to help you better. I am convinced that your question can be best
    answered using properly constructed queries.

    Pavel

    Geir Baardsen wrote:[color=blue]
    >
    > Hi!
    > I might have a difficult cuestion.
    >
    > In our database we have registered different tyres with different
    > dimensions from different suppliers that is both for summer and winter
    > season.
    >
    > Now I have simplified the database by having a tblCategory, so that I
    > can run queries with this condition. So all tyres that are for
    > summerseason, will be in the category: Tyres/su-Pirelli and tyres for
    > winterseason will be in the category: tyres/wi-pir and so on...
    >
    > Now I want to construcy a query that compare prices for the same
    > dimension, say 175/80-13 (with the suffix H or T or whatever...) and
    > have it shown in a form or maybe a report.
    >
    > I must admit - I'm blank here. This seems to be possible only in code?
    > As it is for now I have made a query, limiting the choice by: Like
    > "tyres/su-pir*" as a condition in the query. So I have copied this
    > query, one for each sort of tyre, and the user can open each query to
    > compare prices. A bit slow and "un-proffesional" I think.
    >
    > Anybody that know how I should go around?[/color]

    Comment

    Working...