Syntaxs Failure

Hey Guys can you help me to find the failure. I’am a new developer and have much to learn.

if(_custInvoiceTrans.CustAccount == _custVendExternalItem.CustVendRelation)
{
rawData.C6 = select firstOnly externalItemId from _CustVendExternalItem join _custInvoiceTrans where _custInvoiceTrans.CustAccount == _CustVendExternalItem.CustVendRelation
&& _custInvoiceTrans.ItemId == _CustVendExternalItem.ItemId;
}

else {
rawData.C6 = “”;

}

i got it

select firstOnly externalItemId from _CustVendExternalItem join _custInvoiceTrans where _custInvoiceTrans.CustAccount == _CustVendExternalItem.CustVendRelation
&& _custInvoiceTrans.ItemId == _CustVendExternalItem.ItemId;
rawData.C6 = _CustVendExternalItem.ExternalItemId;

Hi User911,

First of all, i would like to know what does rawdata.C6 means…??

If c6 is one of the field in rawdata table buffer then :

Firstly write your select statement and thereafter populate the field with that buffer Ex:

select firstOnly externalItemId from _CustVendExternalItem join _custInvoiceTrans where _custInvoiceTrans.CustAccount == _CustVendExternalItem.CustVendRelation
&& _custInvoiceTrans.ItemId == _CustVendExternalItem.ItemId;

rawData.C6 = _CustVendExternalItem.C6 (or) _custInvoiceTrans.C6;

Something like above!!

C6 is a string field in the rawdate table you are right! thanks for responsing!