Results 1 to 10 of 10

Thread: [RESOLVED] Refer to single field in tables (design time)

  1. #1

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Resolved [RESOLVED] Refer to single field in tables (design time)

    Hi,

    I know to connect two or more tables at design time I need to use either:

    1 to 1
    1 to Many
    Many to Many

    However, what do I use if I just want to refer to one field in a particular table?

    Thanks,


    Nightwalker
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Refer to single field in tables (design time)

    Can you elaborate, I don't understand what you mean.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: Refer to single field in tables (design time)

    select one_field from your_table

  4. #4

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Refer to single field in tables (design time)

    Quote Originally Posted by leinad31 View Post
    select one_field from your_table
    Was that in response to me or dee-u? I have tried what you suggested in Mysql Workbench 5.2 but it only selects the whole table. I will have to double check will my lecturer tomorrow whether we are suppose to refer to the individual fields or whether he just wants us to refer to the tables.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  5. #5
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: Refer to single field in tables (design time)

    Guessing what you mean...

    select one_field from your_table where one_field = 'Something Unique'

  6. #6

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Refer to single field in tables (design time)

    This is What I mean! This was what I did about 6 years ago using File Maker Pro. How do I accomplish this using Mysql Workbench?
    Attached Images Attached Images  
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  7. #7
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: Refer to single field in tables (design time)

    However, what do I use if I just want to refer to one field in a particular table?
    I'll bite...what table, what column, what value?

  8. #8

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Refer to single field in tables (design time)

    Quote Originally Posted by TysonLPrice View Post
    I'll bite...what table, what column, what value?
    Well, if you use the diagram in the previous post as an example lets say:

    The Clients field in the Episode table retrieving the Client ID from the Clients' Table.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  9. #9
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: Refer to single field in tables (design time)

    Pretending there is a Clients field in the episode table….not tested.

    Select E.Clients from
    Clients C
    Join Episodes E on c.ClientID = e.ClientID
    Where E.Clients = ‘Something unique’

  10. #10

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Refer to single field in tables (design time)

    Quote Originally Posted by TysonLPrice View Post
    Pretending there is a Clients field in the episode table….not tested.

    Select E.Clients from
    Clients C
    Join Episodes E on c.ClientID = e.ClientID
    Where E.Clients = ‘Something unique’
    Thanks! Although, I need to know if it is possible draw the relationship in the picture using Mysql Workbench? If so how?

    Edit:

    I asked my lecturer and he said I just need to do the relationships like in the first post! Mysql handles the relationships such as those in the above picture differently to File Maker Pro.
    Last edited by Nightwalker83; Sep 10th, 2010 at 02:38 AM. Reason: Adding more!
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width