Re: [GENERAL] Help needed creating a view

2012-01-27 Thread Sebastian Tennant
Quoth "David Johnston" : > A) SELECT user_id, CASE WHEN course_name = 'Maths' THEN completed ELSE false > END math_cmp, CASE WHEN course_name = 'English' THEN completed ELSE false > END AS english_cmp FROM applications > a) Expand to multiple columns and store either the default "false" or the

Re: [GENERAL] Help needed creating a view

2012-01-26 Thread salah jubeh
ubject: Re: [GENERAL] Help needed creating a view -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Sebastian Tennant Sent: Thursday, January 26, 2012 6:55 AM To: pgsql-general@postgresql.org Subject: [GENERAL] Help needed

Re: [GENERAL] Help needed creating a view

2012-01-26 Thread David Johnston
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Sebastian Tennant Sent: Thursday, January 26, 2012 6:55 AM To: pgsql-general@postgresql.org Subject: [GENERAL] Help needed creating a view Hi list, Given an 'applications'