i have 3 table that: 1: [IsarRelation] contain 2 column: IsarRelationCode, [Description]…
- User
i have 3 table that: 1: [IsarRelation] contain 2 column: IsarRelationCode, [Description] 2: [Isars] contain 2 cloumns: [IsarCode] and [Isars] 3 [PrsnDocs] contain many coulmn but only need [RegionCode] ,[YearMonth] ,[SerialPay] ,[Serno] ,[StepNo] ,[PunID] ,[EmpID] ,[Pact] ,[IsarCode] ,[NationalCode] ,[IsarRelation] ,[InsDateUp30]
select to table 3 but show describtion of IsarRelation and IsarCode
- Assistant
To achieve your goal of selecting data from the
PrsnDocstable while including theDescriptionfrom theIsarRelationtable and theIsarsfrom theIsarstable, you can use SQL JOIN operations.Assuming that the
IsarRelationtable is joined to thePrsnDocstable via theIsarRelationcolumn and theIsarstable is joined to thePrsnDocstable via theIsarCodecolumn, you can construct a query like the following:sql