cancel
Showing results for 
Search instead for 
Did you mean: 

same cardname in diff cardtype

former_member209725
Participant
0 Kudos

Dear Experts,

I was needed a query in which I can find same Cardname from two diff Cardtype ('Customers' and 'Vendors').

Any suggestion will be highly appreciated.

Regards,

Ravi

View Entire Topic
former_member197621
Active Contributor
0 Kudos

Hi,

Try this below query and let me know your feedback,


select cardcode,cardname,Balance,CardType from ocrd G1

where CardName in  (select CardName from OCRD where CardName = g1.CardName and CardType = 'C')

and CardType = 'S'

union all

select cardcode,cardname,Balance,CardType from ocrd G1

where CardName in  (select CardName from OCRD where CardName = g1.CardName and CardType = 'S')

and CardType = 'C'

former_member209725
Participant
0 Kudos

Hi Prasanna,

Solved.

Thanx .