how to do this query - Mailing list pgsql-sql

From Wes James
Subject how to do this query
Date
Msg-id 533df7fa1001082026h53b5d897x2fc1fa2a6f7ff6df@mail.gmail.com
Whole thread Raw
Responses Re: how to do this query
Re: how to do this query
List pgsql-sql
I have two tables:

students stu_name schols_selected

scholarships schol_name short_name

schols_selected is made up of scholarships the students have selected,
the field content will look like schol1:schol2:schol3

I need a select that does something like this

select schol_name, short_name, stu_name, schols_selected
from scholarships, students
where short_name is in schols_selected

I have tried:

where short_name like '%' || schols_selected || '%'

but i'm not sure how to include a field result in between like operators.

how do I get a list of scholarships based one which student selected
it where the selected result is a string of colon seperated options?

thx,

-wj


pgsql-sql by date:

Previous
From: Seb
Date:
Subject: Re: Fwd: conditional rule not applied
Next
From: Ian Barwick
Date:
Subject: Re: how to do this query