Results 1 to 2 of 2
  1. #1
    Dcalladi is offline Member
    Join Date
    Oct 2011
    Rep Power

    Default SQL JOIN / UNION not sure what to do

    Hi, Everyone
    I have two tables
    Test_items with columns Id, Barcode, Name, Cost and Age_Restriction
    Stock_levels with columns Item_Id, Current_Stock, Min_Stock and Max_Stock

    I am looking for a way were i have a barcode want to find the id from the barcode and then use that id to do a join on the two tables the join is below.

    SELECT Test_items.Name, Stock_levels.Current_Stock, Stock_levels.Min_Stock, Stock_levels.Max_Stock
    FROM Test_items, Stock_levels
    WHERE Test_items.Id = Stock_levels.Item_Id

    Thanks in advance for any help :)

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: SQL JOIN / UNION not sure what to do

    Not related to Java. Ask on a SQL forum.


    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. union of two file with array
    By onurmimar in forum New To Java
    Replies: 0
    Last Post: 10-29-2011, 11:25 PM
  2. sqljdbc driver UNION querys
    By sashaxiv in forum JDBC
    Replies: 9
    Last Post: 02-24-2011, 12:37 PM
  3. union in linked list
    By IT student in forum New To Java
    Replies: 4
    Last Post: 01-02-2010, 11:34 AM
  4. Regarding Join
    By adeeb in forum JDBC
    Replies: 1
    Last Post: 06-24-2008, 07:57 PM
  5. Printing the union and instersection of two sets
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-15-2008, 07:35 PM

Tags for this Thread

Posting Permissions

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