I have the following code, which works perfectly, UNLESS I include the t0.comments field in the first select statement, which is a Memo field.
- Code: Select all
select distinct t0.rec_no, t1.new_id as hnew_id, t0.amount, t0.dolacre, t0.dolsf, t0.dolunit, t0.datesale, t0.dateenter, t0.docnumber, t0.vp, t0.taxkey, t0.internalno, t0.party_one, t0.party_two, t0.tag, t0.rectype, t0.internhist
from hist_new_01 as t0
left join paw_test_02 as t1
on t0.internalno=t1.internalno and t0.taxkey=t1.taxkey
into table hist_test_40
If I include the 'comments' field, I get the following error:
- Code: Select all
-> Operation is invalid for a Memo, Blob, General or Picture field
Am I going about this wrong? I am trying to include all fields from the 'hist_new_01' table, and any associated 'new_id' records from the 'paw_test_02' table, matching on 'internalno' and 'taxkey'.
Also, I need only the exact number of records from the 'hist_new_01' table. I tried a query using an EXISTS statement and that didn't work.
Maybe there's a better way to do this? I HAVE to have the 'comments' field in the resultant table. Any help would be appreciated!
Brian