script to use lookup tables.
Hi Experts,
I have a MYSQL script which creates reports for a number of different people, but instead of hardcoding the search values into the script, I want the script to use lookup tables.
Below is the script and a sample of the proposed lookup table.
SELECT *
FROM properties
WHERE
(
postcode4char like 'ME%'
Or
postcode4char like 'DA%'
)
AND
(
PropertyDetailDescription like '%requires modernisation%'
or
KeyFeaturesContainer like '%requires modernisation%'
or
PropertyDetailDescription like '%need of modernisation%'
or
KeyFeaturesContainer like '%need of modernisation%'
)
Examples of lookup tables below
Lkup_POSTCODE TABLE
Postcode
ME%
DA%
BR1
etc
Lkup_SEARCH TABLE
searchterms
%requires modernisation%
%need of modernisation%
etc
Can we change the above query to fetch the data from lookup tables
Thanks,
Subject
Written By
Posted
script to use lookup tables.
August 28, 2014 08:25PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.