0
Could help me identify the mistake:
SELECT Failed. 3669: More than one value was returned by a subquery.
SELECT
(SELECT ID_FUNC
FROM P_ISIDB.TB_DIM_FUNCIONARIO
INNER JOIN P_ISIDB.TB_STG_VNDA
ON P_ISIDB.TB_STG_VNDA.COD_FUNC = P_ISIDB.TB_DIM_FUNCIONARIO.COD_FUNC)
,(SELECT ID_PROD
FROM P_ISIDB.TB_DIM_PRODUTO
INNER JOIN P_ISIDB.TB_STG_VNDA
ON P_ISIDB.TB_STG_VNDA.COD_PROD = P_ISIDB.TB_DIM_PRODUTO.COD_PROD)
,DATA_VENDA AS DT_VNDA
,STG_VNDA.VALOR_VENDA
,STG_VNDA.IMPOSTO
,STG_VNDA.QTD_ITENS
,(STG_VNDA.VALOR_VENDA - ((STG_VNDA.VALOR_VENDA * STG_VNDA.IMPOSTO) / 100))
AS VL_LDQA
,CASE
WHEN
(STG_VNDA.QTD_ITENS = '' OR
STG_VNDA.QTD_ITENS = 0)
THEN 0
ELSE
(STG_VNDA.VALOR_VENDA / STG_VNDA.QTD_ITENS)
END AS VL_UNITARIO
FROM P_ISIDB.TB_STG_VNDA STG_VNDA
(SELECT ID_FUNC
FROM P_ISIDB.TB_DIM_FUNCIONARIO 
INNER JOIN P_ISIDB.TB_STG_VNDA
ON P_ISIDB.TB_STG_VNDA.COD_FUNC = P_ISIDB.TB_DIM_FUNCIONARIO.COD_FUNC)
– rLinhares
(SELECT ID_PROD
FROM P_ISIDB.TB_DIM_PRODUTO
INNER JOIN P_ISIDB.TB_STG_VNDA
ON P_ISIDB.TB_STG_VNDA.COD_PROD = P_ISIDB.TB_DIM_PRODUTO.COD_PROD)
– rLinhares
Where is the
WHERE
insubqueries
?– Sorack