Let me see if I can explain this clearly...I am trying to join 2 tables,
using a field from table A to match just a part of a field in table B
(re-working of my tables and what I store will fix this, but I want to see
if it can be done in my current setup)
 
select A.event_id, to_char(A.event_date,'mm/dd/yyyy hh24:mi:ss'),
A.event_type, A.event,
B.name, B.description
from table_a A, table_b B
where B.name = "a part of A.event"
 
A.event is a long string of data, stored from a system log, which I can
parse out the name for display purposes with the following cf code:
#Ucase(ListLast(GetToken(event, 2, chr(10)), '.'))#
 
select A.event_id, to_char(A.event_date,'mm/dd/yyyy hh24:mi:ss'),
A.event_type, A.event,
B.name, B.description
from table_a A, table_b B
where upper(B.name) = '#Ucase(ListLast(GetToken(A.event, 2, chr(10)),
'.'))#'
 
The above does not work, since it does not know the value of A.event.
 
Are there any Oracle functions that can achieve this result?
If not I will just rework the table to parse out the name prior to insertion
and store it in table A to do a straight join (A.name = B.name)
 
Thanks,
Scott

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to