Ask a Question related to Coldfusion Database Access, Design and Development.
-
artists_envy #1
Query of Queries?
I have a table named therapists with a field named modalities which contains a
comma delimited list of id #s. I need to loop through a list of modality id #s
and return results for each id #. Explanation - I need to find the
therapist(s) whose modality field contains the modality id in the list i am
looping through. Does that make sense?... In other words i need to search a
table for therapists who offer a certain modality (the therapists modalities
are stored as a comma delimited list in a field). Please help!
artists_envy Guest
-
Need Help with Query of Queries
I have the query "almost" there but I'm not sure exactly how to accomplish this. I need all recrods meeting the criteria from the AppliedLicense... -
Query of Queries
I think that we're using 5 on both environments (not checked that though - they shouldn't be different anyway)... It seems that i've fixed it...... -
2 queries to 1 query
Hello, Can somebody help me to combine these two queries into one query. <cfquery datasource="#DATAS#" name="getMainNav"> SELECT * FROM... -
Query of Queries in 7.0
I am running MX 6.1 and was wondering of the QofQ problem still exists (in the new version, 7.0) where CF tries to guess at the column datatype... -
Query of Queries on query New type query
In CF5 we have a page that creates a query, using queryNew and querySetCell and the like, we then used dbtype="query" and gave it's name so we could... -
klutzoid #2
Re: Query of Queries?
how about:
select *
from therapists
where modalities like '%1234567%'
klutzoid Guest
-
zoeski80 #3
Re: Query of Queries?
Hi Andrew
You can do the query like klutzoid suggested first but then I think you'll
need to loop through the query results to make sure that the ID isn't a subset
of another ID.
eg.
therapist modality: 12345,67890
if you're searching for ID = 345 it will find this therapist but they don't
really have that modalidy ID in this list (it is just a subset of modality
12345)
If you are able to modify the DB a better way would be to have a separate
TherapistModality table which therapist_id and modality_id columns
SELECT therapist_id
FROM therapistModality
WHERE modality_id = #id#
(the database would be better normalised then too)
Zoe
zoeski80 Guest
-
artists_envy #4
Re: Query of Queries?
Thanks to both of you for the help. I had previously used an access DB with a
modalitiesofferred table which held the therapist's id number and the modality
id number(one record for each of the therapist's modalities). I thought
perhaps that i could find a better way to approach this but, it seems that the
best/easiest way is to go back and use the same DB structure(i am using ms sql
now). Thanks again for your help. Andy
artists_envy Guest



Reply With Quote

