Originally posted by sonaliak
The problem is when this table does not have any records, its empty then
NOT EXISTS(SELECT ProjectCode_Item_Code
FROM ProjectCode where ProjectCode_Item_Code = xx)
will not return anything
Wrong, in this case the above expression will return TRUE, so the inserts will take place.