Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, = or when the subquery is used as an expression

$
0
0

Hi i am trying to fetch the data in three tables by using their version colums.

HERE IS MY CODE:

INSERT INTO [dbo].tblCALPLA(ACCOUNT,DATASRC,VERSION)

SELECT ACCOUNT,DATASRC,VERSION FROM [dbo].TBLFACT

WHERE VERSION=(SELECT ID FROM [dbo].VERSION)

UNION

SELECT ACCOUNT,DATASRC,VERSION FROM [dbo].TBLFACT1

WHERE VERSION=(SELECT ID FROM [dbo].VERSION)

UNION

SELECT ACCOUNT,DATASRC,VERSION FROM [dbo].TBLFACT2

WHERE VERSION=(SELECT ID FROM [dbo].VERSION)


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>