September 24th, 2013, 06:46 AM
Insert data into a table with function
I am trying to insert data in to a table.
when I run the select statement the data result is correct.
but when i try to insert into a table it adds null.
see sql statement
'insert into nwSTKDETtemp ( SEASON, STYLECODE, COLOUR,
QTY1, QTY2, QTY3)
select SEASON, STYLECODE, COLOUR, sum(qTY1), sum(qTY2), sum(qTY3) from nwstkdet
group by season,stylecode,colour'
i am using firebird 1.55
I would suspect that you have a null record somewhere. The easiest way to omit null is to add it to the where clause or else a having clause (having season is not null)