i have Join that i expect to give me 3 Records but it gives me to Records . There is a Record in Table A and in table "C" there are two records , i used a left outer Join and i only get two records instead of 3. i dont want to use a Union to do this. Below is an Example
CREATE TABLE #TABLEA
(
LIS_KEY VARCHAR(MAX) NULL,
FUNC_KEY VARCHAR(MAX) NULL
)
INSERT INTO #TABLEA
VALUES('047600055/R',NULL)
CREATE TABLE #TABLEC
(
LIS_KEY VARCHAR(MAX) NULL,
FUNC_KEY VARCHAR(MAX) NULL
)
INSERT INTO #TABLEC
VALUES('047600055/R','GEOSS001')
INSERT INTO #TABLEC
VALUES('047600055/R','GEOSS002')
SELECT * FROM #TABLEA A
left outer JOIN #TABLEC C
ON A.LIS_KEY = C.LIS_KEY
WHERE A.LIS_KEY = '047600055/R'
Thanks
Thank you for posting at Dotnetfunda
[Administrator]