You are viewing our Forum Archives. To view or take place in current topics click here.
Database help SQL
Posted:

Database help SQLPosted:

logan111logan
  • New Member
Status: Offline
Joined: Apr 05, 20167Year Member
Posts: 18
Reputation Power: 0
Status: Offline
Joined: Apr 05, 20167Year Member
Posts: 18
Reputation Power: 0
I need some database help anyone any good at it

im running a SELECT JOIN and it keeps returning more than it should
#2. Posted:
Scizor
  • Summer 2023
Status: Offline
Joined: May 23, 201112Year Member
Posts: 2,665
Reputation Power: 33797
Motto: This Film Is Dedicated To The Brave Mujahideen Fighters Of Afghanistan
Motto: This Film Is Dedicated To The Brave Mujahideen Fighters Of Afghanistan
Status: Offline
Joined: May 23, 201112Year Member
Posts: 2,665
Reputation Power: 33797
Motto: This Film Is Dedicated To The Brave Mujahideen Fighters Of Afghanistan
What's the script/code you're running?

you can use the [code] tag for inserting code in an easy to read form.
#3. Posted:
logan111logan
  • New Member
Status: Offline
Joined: Apr 05, 20167Year Member
Posts: 18
Reputation Power: 0
Status: Offline
Joined: Apr 05, 20167Year Member
Posts: 18
Reputation Power: 0
SELECT DISTINCT ORDERS.order_id, ORDERS.order_date, ORDERS.specialty_notes,PRODUCTS.product_id, PRODUCTS.product_name,
PRODUCTS.product_description, PRODUCTS.unit_price,QUANTITY.quantity, GUESTS.guest_id, GUESTS.last_name, GUESTS.first_name,
GUESTS.middle_initial, GUESTS.street_address,GUESTS.apt, GUESTS.home_phone, GUESTS.cell_phone,GUESTS.email
  FROM ORDERS
  JOIN GUESTS ON ORDERS.guest_id
  JOIN QUANTITY ON ORDERS.order_id
  JOIN PRODUCTS ON QUANTITY.product_id
 
#4. Posted:
logan111logan
  • New Member
Status: Offline
Joined: Apr 05, 20167Year Member
Posts: 18
Reputation Power: 0
Status: Offline
Joined: Apr 05, 20167Year Member
Posts: 18
Reputation Power: 0
i can't post my schema because the TECH game wont let me post the rest of the code
#5. Posted:
Scizor
  • Winter 2022
Status: Offline
Joined: May 23, 201112Year Member
Posts: 2,665
Reputation Power: 33797
Motto: This Film Is Dedicated To The Brave Mujahideen Fighters Of Afghanistan
Motto: This Film Is Dedicated To The Brave Mujahideen Fighters Of Afghanistan
Status: Offline
Joined: May 23, 201112Year Member
Posts: 2,665
Reputation Power: 33797
Motto: This Film Is Dedicated To The Brave Mujahideen Fighters Of Afghanistan
I'm guessing this is just in a test database for learning right?

Can you post the output of your script?
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.