From: | msi77 <msi77(at)yandex(dot)ru> |
---|---|
To: | Wes James <comptekki(at)gmail(dot)com>,pgsql-sql(at)postgresql(dot)org |
Subject: | Re: how to do this query |
Date: | 2010-01-09 11:36:34 |
Message-ID: | 8071263036994@webmail102.yandex.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
How about
schols_selected like '%' || short_name || '%'
> 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
> --
> Sent via pgsql-sql mailing list (pgsql-sql(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>
Здесь спама нет http://mail.yandex.ru/nospam/sign
From | Date | Subject | |
---|---|---|---|
Next Message | msi77 | 2010-01-09 22:52:00 | Re: how to do this query |
Previous Message | Ian Barwick | 2010-01-09 09:07:28 | Re: how to do this query |