Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7557929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:15:38+00:00 2026-05-30T12:15:38+00:00

I have two table and I should write a select query which join this

  • 0

I have two table and I should write a select query which join this two table but I do not know what is conditional join between this two tables?

Can some body say what is?

TABLE ParameterRegistration
(
    RegistrationTime DATETIME,
    PatiNo VARCHAR(12),
    Source VARCHAR(64),
    Code VARCHAR(64),
    NameOfCodingSystem VARCHAR(64) NULL,
    Name VARCHAR(64),
    ValueType CHAR(2) NULL,
    NumericValue INT NULL,
    StringValue VARCHAR(64) NULL,
    TextValue TEXT NULL,
    Unit VARCHAR(64) NULL,
    UnitCode VARCHAR(64) NULL,
    UnitCodingSystem VARCHAR(64) NULL,
    Remark VARCHAR(255) NULL,
    CreateDate DATETIME,
    CreateUserId T_USER_ID
)

and

TABLE External
(
    ModDate DATETIME,
    ModUserId VARCHAR(12),
    UbMem VARCHAR(64),
    Code VARCHAR(64),
    Name VARCHAR(64),
    Service VARCHAR(64),
    NameOfCodingSystem VARCHAR(64) NULL,

)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T12:15:40+00:00Added an answer on May 30, 2026 at 12:15 pm

    When joining tables you have to join on fields that are related. Since you did not provide a lot of information it looks like you have 3 fields that possibly could be joined on.

    • NameOfCodingSystem VARCHAR(64)
    • Name VARCHAR(64)
    • Code VARCHAR(64)

    So you could technically write your query one of these ways:

    SELECT *
    FROM ParameterRegistration P
    INNER JOIN External E -- or LEFT JOIN, etc
    ON P.NameOfCodingSystem = E.NameOfCodingSystem 
    

    OR

    SELECT *
    FROM ParameterRegistration P
    INNER JOIN External E -- or LEFT JOIN, etc
    ON P.Name = E.Name 
    

    OR

    SELECT *
    FROM ParameterRegistration P
    INNER JOIN External E -- or LEFT JOIN, etc
    ON P.Code = E.Code 
    

    OR you can join on all of the fields at the same time

    SELECT *
    FROM ParameterRegistration P
    INNER JOIN External E -- or LEFT JOIN, etc
    ON P.NameOfCodingSystem = E.NameOfCodingSystem  AND
    P.Name = E.Name AND
    P.Code = E.Code 
    

    My suggestion would be to study up on JOINs. Here are some resources but there are plenty on the internet:

    • A Visual Explanation of Joins
    • SQL Joins
    • Joins
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This should be so simple, but I'm drawing a blank. I have two tables.
This is a complex one. But I have a table which has a DATETIME
i have been asked to write a query which in should rank customers base
I have two table like this table_CN (_id, name, phone, favorite, title) table_EN (_id,
I have two table emptable1(empid,status) emptable2(empid,week) i want to select all the empid whose
I need to write a select query for a network diagram. There are two
I have three tables like this CREATE TABLE `money`.`categories` ( `ID` bigint(20) unsigned NOT
I have two tables that should be joined together by a foreign key relationship,
I have two tables: Table 1: ID, PersonCode, Name, Table 2: ID, Table1ID, Location,
Say I have a database called Poll and have these two table structures. poll

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.