amfiteatro
Technical User
Hello, I'm wondering if there is anyone who might be able to assist. I'm trying to run the following query in Crystal reports, but I don't know how to complete this code in the formula editor. Does anyone know how to create a join from the same table and pull information with the same fields as shown below? I have the report pulling information from the payments table so far, but I dont know how to do the join part. Could anyone please help?
Thank you very much!!!
select *
from payments a
join
(select debit_address1, debit_city, debit_state, debit_zip
from payments
group by debit_address1, debit_city, debit_state, debit_zip
having count(*) > 1) b
on a.debit_address1 = b.debit_address1
and
a.debit_city = b.debit_city
and
a.debit_state = b.debit_state
and
a.debit_zip = b.debit_zip
Thank you very much!!!
select *
from payments a
join
(select debit_address1, debit_city, debit_state, debit_zip
from payments
group by debit_address1, debit_city, debit_state, debit_zip
having count(*) > 1) b
on a.debit_address1 = b.debit_address1
and
a.debit_city = b.debit_city
and
a.debit_state = b.debit_state
and
a.debit_zip = b.debit_zip