Trying to write a query to pull Email

Morganhelp

New Member
Joined
Jul 14, 2011
Messages
5
I have a Query where im trying to modify to pull email1. Can you help me figure this out
SELECT core.[Entity ID], rel.[Rel ID], pref.[Pref ID], core.[First Name], core.[Last Name], core.[Team Name], core.[Work Trading Name], core.[Work Trading Name ID], core.Email1, core.Email2, core.Email3, core.[Country (Phone 1)], core.[Area (Phone 1)], core.[Number (Phone 1)], core.[Ext (Phone 1)], core.[Country (Phone 2)], core.[Area (Phone 2)], core.[Number (Phone 2)], core.[Ext (Phone 2)], core.[Country (Phone 3)], core.[Area (Phone 3)], core.[Number (Phone 3)], core.[Ext (Phone 3)], core.[Country (Fax 1)], core.[Area (Fax 1)], core.[Number (Fax 1)], core.[Country (Fax 2)], core.[Area (Fax 2)], core.[Number (Fax 2)], core.[Country (Fax 3)], core.[Area (Fax 3)], core.[Number (Fax 3)], core.[Suite / Floor / Apt (Primary)], core.[Address 1 (Primary)], core.[Address 2 (Primary)], core.[Address 3 (Primary)], core.[City / Town (Primary)], core.[Postal / Zip Code (Primary)], core.[Country (Primary)], core.[Suite / Floor / Apt (Alternative)], core.[Address 1 (Alternative)], core.[Address 2 (Alternative)], core.[Address 3 (Alternative)], core.[City / Town (Alternative)], core.[Postal / Zip Code (Alternative)], core.[Country (Alternative)], rel.TN, rel.[TN ID], rel.TNL, rel.[TNL ID], rel.[Sub-Account], rel.[Functional Role], rel.[Role Type], rel.[Relationship Type], pref.Division, pref.[Coverage Team], pref.Group, pref.Office, pref.Currency, pref.[Transaction Type], pref.[Destination Method], pref.Password, pref.Notes, pref.Result
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
I think the code you listed is incomplete, because there are no FROM or JOIN statements.

However... the basic structure of a query is
SELECT...
FROM... [INNER JOIN ... ON... ]
WHERE...
ORDER BY... ;

If you're building it by hand you'll need to insert a WHERE clause along the lines of:
Code:
WHERE core.Email1 LIKE '*Quinnipiac.com'

If you are using the query builder put LIKE '*Quinnipiac.com' in the Criteria row below the Email1 field.

If you would like to turn it into a parameter, so you can query contacts from different domains, make the criteria LIKE '*' & [Enter the email domain]
You will be prompted to enter a domain when you run the query.

Denis
 
Upvote 0
I think the code you listed is incomplete, because there are no FROM or JOIN statements.

However... the basic structure of a query is
SELECT...
FROM... [INNER JOIN ... ON... ]
WHERE...
ORDER BY... ;

If you're building it by hand you'll need to insert a WHERE clause along the lines of:
Code:
WHERE core.Email1 LIKE '*Quinnipiac.com'

If you are using the query builder put LIKE '*Quinnipiac.com' in the Criteria row below the Email1 field.

If you would like to turn it into a parameter, so you can query contacts from different domains, make the criteria LIKE '*' & [Enter the email domain]
You will be prompted to enter a domain when you run the query.

Denis
Thank you for the help that will work
 
Upvote 0

Forum statistics

Threads
1,224,557
Messages
6,179,508
Members
452,918
Latest member
Davion615

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top