Ah great!

I was studying your database, and I did come to the point where I could see 
that I will need to do a 
join between customer and user_services.  However, I was toying with an INNER 
JOIN.  Lack of concept 
on my part.

Now maybe you can toss it into the web interface >; )  Our marketing guys would 
love it so that they 
can generate a list of primary contact email addresses to send fliers too.  
Sometimes snail mail 
addresses are used too.  We usually just try and get such data out by hand.

Thank you so much!

-Kreg




Paul Yasi wrote:
> Any of these kinds of queries are possible, though you need to know
> about SQL JOIN's to get them done.  Here are some examples:
> 
> To query a city with a specific service, you need to know the specific
> service ID:
> 
> SELECT *
> FROM customer
> LEFT JOIN user_services ON user_services.account_number =
> customer.account_number
> WHERE customer.city LIKE '%Kansas City%'
> AND user_services.master_service_id =3
> 
> If you wanted to query everyone with a service category you would join
> the master_service table to the query:
> 
> SELECT *
> FROM customer
> LEFT JOIN user_services ON user_services.account_number =
> customer.account_number
> LEFT JOIN master_services ON master_services.id =
> user_services.master_service_id
> WHERE customer.city LIKE '%Kansas City%'
> AND master_services.category = "dsl"
> 
> Paul
> 
> On 5/14/07, kreg <[EMAIL PROTECTED]> wrote:
>> All of our users in the database have a primary contact email address.
>>
>> I am trying to get a list of all contact email addresses matching their City 
>> and certain added Services.
>>
>> For example:
>> I would like a list of email addresses so that I can send an email to all 
>> customers who live in
>> Kansas City and have DSL service for an announcement.
>>
>> -Kreg
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Citrusdb-users mailing list
>> Citrusdb-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/citrusdb-users
>>
> 
> 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Citrusdb-users mailing list
Citrusdb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/citrusdb-users

Reply via email to