I know how to do this in SQL:
insert into [dbo].[SAM-TEST$Constituent Category] ([Constituent No_],[Line No_],
[Category Type],[Category Code],[Spouse Related])
select No_,
LineNum = (select isnull((max([Line No_]) + 10000),10000) from [dbo].[SAM-TEST$Constituent Category]
where [Constituent No_] = [dbo].[SAM-TEST$Contact].[No_]),
'DONORSTAT', '', 0
from [dbo].[SAM-TEST$Contact]
where [No_] NOT IN (SELECT [Constituent No_] from [dbo].[SAM-TEST$Constituent Category]
where [Category Type] = 'DONORSTAT');
But how do I do a "NOT IN" in C/SIDE? I know how to apply FILTERs and SETRANGEs and such, but what is the best way to select where a value is NOT IN a list selected from the same table?
Thanks!
#-o
0
Answers
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Do you mean this?
RIS Plus, LLC
I increment the "line No." because i doesn't know his Primary key structure. And in his SQL query he also increment (intended or not intended)
RIS Plus, LLC
-Keaton
=D>
RIS Plus, LLC
Please and welcome