• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

SQL 2008 help

Joined
Feb 21, 2008
Messages
6,862 (1.16/day)
Location
S.E. Virginia
System Name Barb's Domain
Processor i9 10850k 5.1GHz all cores
Motherboard MSI MPG Z490 GAMING EDGE WIFI
Cooling Deep Cool Assassin III
Memory 2*16gig Corsair LPX DDR4 3200
Video Card(s) RTX 4080 FE
Storage 500gb Samsung 980 Pro M2 SSD, 500GB WD Blue SATA SSD, 2TB Seagate Hybrid SSHD
Display(s) Dell - S3222DGM 32" 2k Curved/ASUS VP28UQG 28" 4K (ran at 2k), Sanyo 75" 4k TV
Case SilverStone Fortress FT04
Audio Device(s) Bose Companion II speakers, Corsair - HS70 PRO headphones
Power Supply Corsair RM850x (2021)
Mouse Logitech G502
Keyboard Logitech Orion Spectrum G910
VR HMD Oculus Quest 2
Software Windows 10 Pro 64 bit
Benchmark Scores https://www.3dmark.com/spy/34962882
I'm having a problem and I hope someone can offer some help. Let me start by saying I'm not looking for someone to do my work for me. I'm looking for someone to help me understand what I'm doing and how to do it.

Ok, what I'm trying to do is retrieve data from two tables in one query. I'm on step 1 in the assignment details on the left side of the picture. I have the code to pull the info, but I can't figure out how to join the results into on table. When I type in the JOIN command, it's always dark gray, unlike the SELECT, and ORDER BY, which are blue. Is this a problem? Also, even though I have the primary key in my customer table and foreign key in my Orders table set to CustomerID, and they are associated with eachother, I keep getting the error in the picture. Can someone please help me with what I'm doing wrong here? I don't want you to do it for me, just explain what I'm doing wrong.

 
Joined
Feb 21, 2008
Messages
6,862 (1.16/day)
Location
S.E. Virginia
System Name Barb's Domain
Processor i9 10850k 5.1GHz all cores
Motherboard MSI MPG Z490 GAMING EDGE WIFI
Cooling Deep Cool Assassin III
Memory 2*16gig Corsair LPX DDR4 3200
Video Card(s) RTX 4080 FE
Storage 500gb Samsung 980 Pro M2 SSD, 500GB WD Blue SATA SSD, 2TB Seagate Hybrid SSHD
Display(s) Dell - S3222DGM 32" 2k Curved/ASUS VP28UQG 28" 4K (ran at 2k), Sanyo 75" 4k TV
Case SilverStone Fortress FT04
Audio Device(s) Bose Companion II speakers, Corsair - HS70 PRO headphones
Power Supply Corsair RM850x (2021)
Mouse Logitech G502
Keyboard Logitech Orion Spectrum G910
VR HMD Oculus Quest 2
Software Windows 10 Pro 64 bit
Benchmark Scores https://www.3dmark.com/spy/34962882
ok, I figured out why I was getting that error, but the results are still coming up as two separate tables as seen here-


Please, someone explain to me what I'm doing wrong with my JOIN statement
 
Joined
Feb 21, 2008
Messages
6,862 (1.16/day)
Location
S.E. Virginia
System Name Barb's Domain
Processor i9 10850k 5.1GHz all cores
Motherboard MSI MPG Z490 GAMING EDGE WIFI
Cooling Deep Cool Assassin III
Memory 2*16gig Corsair LPX DDR4 3200
Video Card(s) RTX 4080 FE
Storage 500gb Samsung 980 Pro M2 SSD, 500GB WD Blue SATA SSD, 2TB Seagate Hybrid SSHD
Display(s) Dell - S3222DGM 32" 2k Curved/ASUS VP28UQG 28" 4K (ran at 2k), Sanyo 75" 4k TV
Case SilverStone Fortress FT04
Audio Device(s) Bose Companion II speakers, Corsair - HS70 PRO headphones
Power Supply Corsair RM850x (2021)
Mouse Logitech G502
Keyboard Logitech Orion Spectrum G910
VR HMD Oculus Quest 2
Software Windows 10 Pro 64 bit
Benchmark Scores https://www.3dmark.com/spy/34962882
Well I figured it out. Seems I was going about it wrong, this is the proper code with the right results-

 
Top