select and as doubt
От | Alexandre Gonçalves Jacarandá |
---|---|
Тема | select and as doubt |
Дата | |
Msg-id | 43C9C7B5.5070707@yahoo.com.br обсуждение исходный текст |
Ответы |
Re: select and as doubt
|
Список | pgsql-sql |
Hello folks!!! I've a question that could be very strange: It's possible to make an SELECT inside an AS clause ? ex.: select student_id, subject_name_id, grade as (select subject_name from subject_names) from grades; The wy is that i've a table with subject names and another with name_id and grades like: Table subject_names ( id, subject_name); Table students ( id, name); Table grades ( student_id, subject_name_id, grade) My goal is display an report that have this layout: Name | Math | Bio | English Joe Doe | 10 | 8 | 6 Mary | 8 | 6 | 5 I try to make this with crosstab, but I need that columns with suject grades are displayed automaticlly Thanks. -- __________________________ Alguns caminham pelo arco, eu caminho pela reta. Alexandre Gonçalves Jacarandá Assessor de Tecnologia de Informação Tel.: 0 ** 21 8131-2313 _______________________________________________________ Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html
В списке pgsql-sql по дате отправления: