MySQL Structure

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rbudnikas
    New Member
    • Jan 2007
    • 2

    #1

    MySQL Structure

    I am new to DB's and have a problem. I think i am missing a principal method which is creating a problem. I am using a Store location DB which is loading into VB. The basic structure is as follows.
    StoreID(Primary ), StorIdent(Holds Store Identifier ie.CDN01), Name(Store Name)
    Address, City, PC, Country, Phone.

    In my programming on formload I am loading City into ComboBox 1. If I look at city as an example in combo box 1 there are let's say 3 toronto's, 2 bramptons. They correspond to the city's in the Store Location DB. I just want toronto to show once and brampton to show once. As they drill down they will select store name in a secondary combo box. Again the same store name shows up multiple times because the same name is in the db with different locations. Is this a problem with the way the db is designed.

    Hope someone can explain

    Thanks

    Robert
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Use the SELECT DISTINCT col_name FROM ..etc...in your query.

    Ronald :cool:

    Comment

    Working...