
January 9th, 2008, 11:12 PM
|
|
Registered User
|
|
Join Date: Jan 2008
Posts: 1
Time spent in forums: 44 m
Reputation Power: 0
|
|
|
Problem when selecting data from different tables by ANDing different where condition
Hiiiii ,
The following query is not well in its execution time so please help me with some other options.Given sql query selects data from 6 tables and they are linked together by ANDing different conditions(where).so please i am waiting.........
SELECT customer_master.NAME,customer_master.ADDR1,subscri ption_details.ORNO,subscription_details.TRNO,sub_t ype.TYPE,
language_master.LANGUAGE,payment_details.RECEIVED_ DATE,subscription_details.SUBNO
FROM customer_master,city_master,sub_type,language_mast er,periodid_details,payment_details,subscription_d etails
WHERE sub_type.SUB_TYPE_ID = subscription_details.SUB_TYPE_ID
AND subscription_details.CUST_ID = customer_master.CUST_ID
AND customer_master.CITY_ID = city_master.CITY_ID
AND language_master.LANGUAGE_ID = subscription_details.LANGUAGE_ID
AND periodid_details.PERIOD_ID = subscription_details.PERIOD_ID
AND payment_details.PAYMENT_ID = subscription_details.PAYMENT_ID
|