Connecting Tech Pros Worldwide Help | Site Map

Where clause problem

Member
 
Join Date: Jul 2007
Posts: 87
#1: Sep 22 '08
Hi all
I am having trouble with a where clause see below
[code]
WHERE COMBOENTRY_IN LIKE '%' || USERENTRY_IN ||'%'
[code]
i believe that the COMBOENTRY_IN variable is not being recognised as a variable but as a String any ideas how i could get it to be recognised as a column name
debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,497
#2: Sep 22 '08

re: Where clause problem


i think USERENTRY_IN should be a variable but the COMBOENTRY_IN should be a field name in the database table.
Member
 
Join Date: Jul 2007
Posts: 87
#3: Sep 23 '08

re: Where clause problem


i understand what you are saying but what i am asking is there any way in which i can search a selected column in the database (COMBOENTRY_IN) with a string the user enters (USERENTRY_IN). Or would i have to have several different select statements within a block of if and else if statements

eg the user selects that the want to search for a username if something = USERNAME then do this elseif etc etc
Member
 
Join Date: Jul 2007
Posts: 87
#4: Sep 23 '08

re: Where clause problem


I think my problem would be solved with a dynamic pl/sql but i have no idea how? Any Ideas?
Reply