T SQL에 익숙하지 않아 일반적인 열 값에 따라 조합해야하는 두 가지 쿼리가 있습니다. 두 쿼리가 모두 제대로 작동합니다.SQL 쿼리 결합하기
첫 번째 쿼리가
SELECT t_senderTable.nameFull AS "senderName", t_recieverTable.recieverName AS "recieverName"
FROM ((dbo.t_senderTable AS t_senderTable
INNER JOIN t_senderTable AS t_senderTable ON (t_senderTable.Kd = mapTable.senderID))
INNER JOIN t_recieverTable AS t_recieverTabler ON (recieverTable.Id = mapTable.recieverID)
두 번째 쿼리가
SELECT t_license AS "License", t_coName AS "Company Name"
FROM (dbo.t_license AS t_license
INNER JOIN dbo. t_coName ON (t_coName.id = t_license.senderID))
WHERE
(
t_license.check < '2')
입니다 기본적으로 나는 결합하는 데 필요한 두 개의 쿼리, 센더를 사용하여 두 개의 쿼리에 공통입니다 것을 내가 SENDERNAME의 출력 결과를 얻을 수 있도록, recieverName 및 coName senderID는 일대 다 많은 관계입니다. 이 게시물에서 아이디어를 얻었으나 작동하지 않습니다. Combining SQL Server Queries 아이디어가 있습니까? 감사
: 나는 당신을 위해 무엇을 요구하는 것은 생각합니다. – ioscode