Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Join based on string parse

Status
Not open for further replies.

justTryingToCode

Programmer
Nov 14, 2006
13
US
I have used MS SQL for many years and I am new to Oracle syntax and functions. I have taken over some stuff that has some less than desireable field structures Oracle. That being said maybe one of you experts can help me out and save me a tremendous amount of research time.

One of my tables has a field that contains a comma delimited number list i.e. '1,4,5,6,7,9' in a Clob field no less. I need to join this to a reference table to convert those Ids to their respective names. Is there any direct way to do this? Any best practice I should follow or look up.

Thank you all in advance for looking at this...

 
Yes,

you must strip those magic numbers out of the clob and into separate fields (as many as it takes. Obviously, since they may or may not be essential as part of the clob they have to remain in the clob too.

You can't create referential integrity against a CLOB field, so don't waste your time trying. You need to find out the real-world meaning of those numbers, verify that the system contains suitable parent keys, and then add the columns needed to the CLOB-containing table.

This would be much easier if you could post create table statements and some sample data. Any chance thereof?

Regards

T
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top