Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

SQL query problem

Explorer ,
Apr 15, 2010 Apr 15, 2010

Using my query below, is there a way where the servicearea and location is the same it is only shown once?

SELECT     *
FROM        medicaldevices, location, servicearea
WHERE
medicaldevices.devicelocation=location.locationid
and
medicaldevices.deviceservice=servicearea.serviceareaid

Thanks guys

TOPICS
Database access
436
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 15, 2010 Apr 15, 2010

instead of select *, select just the fields you intend to use.

Also, use select distinct

Translate
LEGEND ,
Apr 15, 2010 Apr 15, 2010
LATEST

instead of select *, select just the fields you intend to use.

Also, use select distinct

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources