I have 2 tables in a large SQL Database and i need to query across them and I am struggling TBH. Here are the parameters:
Table 1 - Live Policies
Table 2 - Email Addresses
Common Pivot = Client number which is present in both tables.
From Table 1 i need to retrieve the following fields:
Client Number
Ref Number
Name
Postcode
Inception date
Policy Type (= 'PC')
Select Client, Ptype, Ref, Incep, [Name], Postcode from [Live
Policies] where Ptype = 'PC'
This works fine.
From Table 2 i need to retrieve:
Webaddr
My question is how do i return the email address for the required records from the second table by referencing the client number? (client number is the same for all records) The second part of the statement is where i'm getting stuck.. I'm aware of the JOIN statement but if i try this i just get nowhere.. Help most appreciated!