Jump to content

can JOIN be done using a LIKE


nadeemshafi9

Recommended Posts

i have a JOIN that i need to make, except the writer of the db has usied an unconventional way of ralation, EG. one feild one cell contains many id's (,1,10,3,)

 

so i need to do somthing like this

 

SELECT * FROM a JOIN a.id ON b.linkids WHERE a.id LIKE % b.linkids %

 

is this even possible and can somone correct me

Link to comment
Share on other sites

i have a JOIN that i need to make, except the writer of the db has usied an unconventional way of ralation, EG. one feild one cell contains many id's (,1,10,3,)

 

so i need to do somthing like this

 

SELECT * FROM a JOIN a.id ON b.linkids WHERE a.id LIKE % b.linkids %

 

is this even possible and can somone correct me

 

How does everyone fall into this trap?  Get the "writer of the db" to normalize the database.

Link to comment
Share on other sites

i have a JOIN that i need to make, except the writer of the db has usied an unconventional way of ralation, EG. one feild one cell contains many id's (,1,10,3,)

 

so i need to do somthing like this

 

SELECT * FROM a JOIN a.id ON b.linkids WHERE a.id LIKE % b.linkids %

 

is this even possible and can somone correct me

 

How does everyone fall into this trap?  Get the "writer of the db" to normalize the database.

 

i told him but he refuses normalisation, its my job to optimise the the search engine, i know it should be normalised, there a hell load od data on the db and the search engine is sophisticated, is there aanyway we can solve this ?

 

right now all the records in the majour table are selected then all the records from the other tables are put into an array and continuously searched for each record of the big table in order to find any matches on the query in the search bar in aby tables but preserve relation ?????

Link to comment
Share on other sites

im gona try your method first, but normalisation and re programming is under way for one table and will reult in the whole thing being virtualy re writen i told him just leave it, i cant belive tehy have such a big databse with such unsafe design and compleetly no normalisation, fudge it well have to get it done, thanks for the tipsim gona try them now any more info welcome.

Link to comment
Share on other sites

im gona try your method first, but normalisation and re programming is under way for one table and will reult in the whole thing being virtualy re writen i told him just leave it, i cant belive tehy have such a big databse with such unsafe design and compleetly no normalisation, fudge it well have to get it done, thanks for the tipsim gona try them now any more info welcome.

 

You could also make a copy of this table and normalize it for the purposes of what you're trying to accomplish.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.