I was writing some queries on my local sql srv and am trying to translate them into tera now. the problem is with select statements inside the main query such as this -
SELECT x.cust_id,
(SELECT SUM(tot_sal_amt)
FROM table1 a
WHERE date < '1/1/2001' AND a.cust_id = x.cust_id),
(select ...)
FROM table1 x
where x.cust_id in (256,254)
GROUP BY x.cust_id
sql srv takes this ok, but tera complains about the syntax asking for something between "(" and "select"
i could use case but some of those columns are build using nested selects and i'd rather stick to select.
ideas ... greatly appreciated..thx
SELECT x.cust_id,
(SELECT SUM(tot_sal_amt)
FROM table1 a
WHERE date < '1/1/2001' AND a.cust_id = x.cust_id),
(select ...)
FROM table1 x
where x.cust_id in (256,254)
GROUP BY x.cust_id
sql srv takes this ok, but tera complains about the syntax asking for something between "(" and "select"
i could use case but some of those columns are build using nested selects and i'd rather stick to select.
ideas ... greatly appreciated..thx