Problem with Cust Num

Another way to show say it is CustCnt.ShipToNum <= ""


for each Customer no-lock , each CustCnt no-lock where CustCnt.ShipToNum <= '""' And CustCnt.ConNum = Customer.PrimBCon and (Customer.Company = CustCnt.Company and Customer.CustNum = CustCnt.CustNum ).

--- In vantage@yahoogroups.com, Chris Thompson <chriselectrix@...> wrote:
>
> Is that assumeing ShorChar = 1?
>
> I see what it is doing but I couldnt think of a way around it.
>
> Is your code basically only going to show shiptonum = 0?
>
> Thanks,
>
>
>
> ________________________________
> From: Kirstin Brandt <kirstin.brandt@...>
> To: vantage@yahoogroups.com
> Sent: Tuesday, 28 August 2012, 15:52
> Subject: [Vantage] Re: Problem with Cust Num
>
>
> ÂÂ
> Bob is probably a ship-to contact with the same contact ID as the primary billing contact. Try this (assuming you aren't using shorchar01 for anything else):
>
> for each Customer no-lock , each CustCnt no-lock outer-join where (Customer.Company = CustCnt.Company and Customer.CustNum = CustCnt.CustNum and Customer.ShortChar01 = CustCnt.ShipToNum and Customer.PrimBCon = CustCnt.ConNum ).
>
> --- In vantage@yahoogroups.com, Chris Thompson <chriselectrix@> wrote:
> >
> > Hi All
> >
> > I have encountered a problem with CustNum field.
> >
> > I am trying to create a BAQ which will give me all of the contact names marked as 'Primary Bill To'.
> >
> > So, I thought this would be easy ...
> >
> > CUSTOMER <<< Join Company, CustNum, PrimBCon <<<< CustCnt
> >
> >
> > for each Customer no-lock , each CustCnt no-lock outer-join where (Customer.Company = CustCnt.Company and Customer.CustNum = CustCnt.CustNum and Customer.PrimBCon = CustCnt.ConNum ).
> >
> >
> > However, when I have checked, I have found some contacts have the same CustNum as another contact working for a different company, so some Customers are showing as having 2 primary billing contacts (which isnt possible) and only one of them actually works for the company in question.
> >
> >
> > Here is an example ...
> >
> > Customer      CustNum(Customer)      PrimBCon      ConNum      CustNum(CustCnt)      Name
> >
> > A               30000                        1                 1         30000                   Ted
> > A                   30000                               1                      1           30000                         Bob
> >
> >
> > Bob doesnt actually work for company A.
> >
> > Does anyone else have this same problem?
> >
> > Is there a fix for this?
> >
> > Is there a work around? I am thinking along the lines of an additional TableRelation between Customer and CustCnt, but I cant find one.
> >
> > Any help would be greatly appreciated.
> >
> > Thanks,
> >
> >
> >
> > CHRIS
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
> [Non-text portions of this message have been removed]
>
Hi All

I have encountered a problem with CustNum field.

I am trying to create a BAQ which will give me all of the contact names marked as 'Primary Bill To'.

So, I thought this would be easy ...

CUSTOMER <<< Join Company, CustNum, PrimBCon <<<< CustCnt


for each Customer no-lock , each CustCnt no-lock outer-join where (Customer.Company = CustCnt.Company and Customer.CustNum = CustCnt.CustNum and Customer.PrimBCon = CustCnt.ConNum ).


However, when I have checked, I have found some contacts have the same CustNum as another contact working for a different company, so some Customers are showing as having 2 primary billing contacts (which isnt possible) and only one of them actually works for the company in question.


Here is an example ...

Customer      CustNum(Customer)      PrimBCon      ConNum      CustNum(CustCnt)      Name

AÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â 30000Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1Â Â Â Â Â Â Â Â Â 30000Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Ted
AÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 30000Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1Â Â Â Â Â Â Â Â Â Â Â 30000Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Bob


Bob doesnt actually work for company A.

Does anyone else have this same problem?

Is there a fix for this?

Is there a work around? I am thinking along the lines of an additional TableRelation between Customer and CustCnt, but I cant find one.

Any help would be greatly appreciated.

Thanks,



CHRIS


[Non-text portions of this message have been removed]
It won't solve the problem with the same CustNum, but don't you have to join the ship to field as well?

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Chris Thompson
Sent: August-28-12 4:15 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Problem with Cust Num



Hi All

I have encountered a problem with CustNum field.

I am trying to create a BAQ which will give me all of the contact names marked as 'Primary Bill To'.

So, I thought this would be easy ...

CUSTOMER <<< Join Company, CustNum, PrimBCon <<<< CustCnt

for each Customer no-lock , each CustCnt no-lock outer-join where (Customer.Company = CustCnt.Company and Customer.CustNum = CustCnt.CustNum and Customer.PrimBCon = CustCnt.ConNum ).

However, when I have checked, I have found some contacts have the same CustNum as another contact working for a different company, so some Customers are showing as having 2 primary billing contacts (which isnt possible) and only one of them actually works for the company in question.

Here is an example ...

Customer CustNum(Customer) PrimBCon ConNum CustNum(CustCnt) Name

A 30000 1 1 30000 Ted
A 30000 1 1 30000 Bob

Bob doesnt actually work for company A.

Does anyone else have this same problem?

Is there a fix for this?

Is there a work around? I am thinking along the lines of an additional TableRelation between Customer and CustCnt, but I cant find one.

Any help would be greatly appreciated.

Thanks,

CHRIS

[Non-text portions of this message have been removed]



[Non-text portions of this message have been removed]
Bob is probably a ship-to contact with the same contact ID as the primary billing contact. Try this (assuming you aren't using shorchar01 for anything else):

for each Customer no-lock , each CustCnt no-lock outer-join where (Customer.Company = CustCnt.Company and Customer.CustNum = CustCnt.CustNum and Customer.ShortChar01 = CustCnt.ShipToNum and Customer.PrimBCon = CustCnt.ConNum ).


--- In vantage@yahoogroups.com, Chris Thompson <chriselectrix@...> wrote:
>
> Hi All
>
> I have encountered a problem with CustNum field.
>
> I am trying to create a BAQ which will give me all of the contact names marked as 'Primary Bill To'.
>
> So, I thought this would be easy ...
>
> CUSTOMER <<< Join Company, CustNum, PrimBCon <<<< CustCnt
>
>
> for each Customer no-lock , each CustCnt no-lock outer-join where (Customer.Company = CustCnt.Company and Customer.CustNum = CustCnt.CustNum and Customer.PrimBCon = CustCnt.ConNum ).
>
>
> However, when I have checked, I have found some contacts have the same CustNum as another contact working for a different company, so some Customers are showing as having 2 primary billing contacts (which isnt possible) and only one of them actually works for the company in question.
>
>
> Here is an example ...
>
> Customer      CustNum(Customer)      PrimBCon      ConNum      CustNum(CustCnt)      Name
>
> AÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â 30000Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1Â Â Â Â Â Â Â Â Â 30000Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Ted
> AÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 30000Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1Â Â Â Â Â Â Â Â Â Â Â 30000Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Bob
>
>
> Bob doesnt actually work for company A.
>
> Does anyone else have this same problem?
>
> Is there a fix for this?
>
> Is there a work around? I am thinking along the lines of an additional TableRelation between Customer and CustCnt, but I cant find one.
>
> Any help would be greatly appreciated.
>
> Thanks,
>
>
>
> CHRIS
>
>
> [Non-text portions of this message have been removed]
>
Is that assumeing ShorChar = 1?

I see what it is doing but I couldnt think of a way around it.

Is your code basically only going to show shiptonum = 0?

Thanks,



________________________________
From: Kirstin Brandt <kirstin.brandt@...>
To: vantage@yahoogroups.com
Sent: Tuesday, 28 August 2012, 15:52
Subject: [Vantage] Re: Problem with Cust Num


Â
Bob is probably a ship-to contact with the same contact ID as the primary billing contact. Try this (assuming you aren't using shorchar01 for anything else):

for each Customer no-lock , each CustCnt no-lock outer-join where (Customer.Company = CustCnt.Company and Customer.CustNum = CustCnt.CustNum and Customer.ShortChar01 = CustCnt.ShipToNum and Customer.PrimBCon = CustCnt.ConNum ).

--- In vantage@yahoogroups.com, Chris Thompson <chriselectrix@...> wrote:
>
> Hi All
>
> I have encountered a problem with CustNum field.
>
> I am trying to create a BAQ which will give me all of the contact names marked as 'Primary Bill To'.
>
> So, I thought this would be easy ...
>
> CUSTOMER <<< Join Company, CustNum, PrimBCon <<<< CustCnt
>
>
> for each Customer no-lock , each CustCnt no-lock outer-join where (Customer.Company = CustCnt.Company and Customer.CustNum = CustCnt.CustNum and Customer.PrimBCon = CustCnt.ConNum ).
>
>
> However, when I have checked, I have found some contacts have the same CustNum as another contact working for a different company, so some Customers are showing as having 2 primary billing contacts (which isnt possible) and only one of them actually works for the company in question.
>
>
> Here is an example ...
>
> Customer      CustNum(Customer)      PrimBCon      ConNum      CustNum(CustCnt)      Name
>
> AÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â 30000Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1Â Â Â Â Â Â Â Â Â 30000Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Ted
> AÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 30000Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1Â Â Â Â Â Â Â Â Â Â Â 30000Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Bob
>
>
> Bob doesnt actually work for company A.
>
> Does anyone else have this same problem?
>
> Is there a fix for this?
>
> Is there a work around? I am thinking along the lines of an additional TableRelation between Customer and CustCnt, but I cant find one.
>
> Any help would be greatly appreciated.
>
> Thanks,
>
>
>
> CHRIS
>
>
> [Non-text portions of this message have been removed]
>




[Non-text portions of this message have been removed]
Assuming shortchar01 = "", shiptonum is a misnomer, it's actually a character field. This will only pick customer contacts with a null ship to field, which leaves your regular customer contacts, including the primary billing.

--- In vantage@yahoogroups.com, Chris Thompson <chriselectrix@...> wrote:
>
> Is that assumeing ShorChar = 1?
>
> I see what it is doing but I couldnt think of a way around it.
>
> Is your code basically only going to show shiptonum = 0?
>
> Thanks,
>
>
>
> ________________________________
> From: Kirstin Brandt <kirstin.brandt@...>
> To: vantage@yahoogroups.com
> Sent: Tuesday, 28 August 2012, 15:52
> Subject: [Vantage] Re: Problem with Cust Num
>
>
> ÂÂ
> Bob is probably a ship-to contact with the same contact ID as the primary billing contact. Try this (assuming you aren't using shorchar01 for anything else):
>
> for each Customer no-lock , each CustCnt no-lock outer-join where (Customer.Company = CustCnt.Company and Customer.CustNum = CustCnt.CustNum and Customer.ShortChar01 = CustCnt.ShipToNum and Customer.PrimBCon = CustCnt.ConNum ).
>
> --- In vantage@yahoogroups.com, Chris Thompson <chriselectrix@> wrote:
> >
> > Hi All
> >
> > I have encountered a problem with CustNum field.
> >
> > I am trying to create a BAQ which will give me all of the contact names marked as 'Primary Bill To'.
> >
> > So, I thought this would be easy ...
> >
> > CUSTOMER <<< Join Company, CustNum, PrimBCon <<<< CustCnt
> >
> >
> > for each Customer no-lock , each CustCnt no-lock outer-join where (Customer.Company = CustCnt.Company and Customer.CustNum = CustCnt.CustNum and Customer.PrimBCon = CustCnt.ConNum ).
> >
> >
> > However, when I have checked, I have found some contacts have the same CustNum as another contact working for a different company, so some Customers are showing as having 2 primary billing contacts (which isnt possible) and only one of them actually works for the company in question.
> >
> >
> > Here is an example ...
> >
> > Customer      CustNum(Customer)      PrimBCon      ConNum      CustNum(CustCnt)      Name
> >
> > A               30000                        1                 1         30000                   Ted
> > A                   30000                               1                      1           30000                         Bob
> >
> >
> > Bob doesnt actually work for company A.
> >
> > Does anyone else have this same problem?
> >
> > Is there a fix for this?
> >
> > Is there a work around? I am thinking along the lines of an additional TableRelation between Customer and CustCnt, but I cant find one.
> >
> > Any help would be greatly appreciated.
> >
> > Thanks,
> >
> >
> >
> > CHRIS
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
> [Non-text portions of this message have been removed]
>