I need to conect two different query in one table
Basically treating each query as an individual column.
Error is
Msg 512, Level 16, State 1, Line 1
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
SELECT
(select sifra as cdr1
from popis_repromaterijal_roba as c with (nolock)
) AS Column1,
(select naziv as cdr2
from popis_repromaterijal_roba as c with (nolock)
) AS Column2,
(select sum(kolicina) as cdr3
from popis_repromaterijal_roba as c with (nolock)
) AS Column3,
(select sifra as success1
from mp_racun_roba as d with (nolock)
) AS Column4,
(select roba as success2
from mp_racun_roba as d with (nolock)
) AS Column5,
(select sum(kolicina) as success3
from mp_racun_roba as d with (nolock)
) AS Column6
Goran BibicPosted Jul 17, 2023, 9:54 AM
Code is ok, need update
Last column succes 3 need to be sum joined table, RESULT SUCCES 2 IS KAFA,KAFA,... NEED TO BE JUST 1 KAFA WTH SUCCES 3 SUMM
Amit MohantyPosted Jul 14, 2023, 8:13 AM