Re: [sqlite] aliasing columns in views
Am Mittwoch, 17. März 2004 16:17 schrieb Puneet Kishor: [...someting about aliasing columns in views...] Send an email to [EMAIL PROTECTED] I think this will answer your question. > == > > Is there an archive of these mailing lists where I can view previous > posts? Send an email to [EMAIL PROTECTED] and [EMAIL PROTECTED] and [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [sqlite] aliasing columns in views
Andre Vehreschild wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, you're sure this command resulted not in an error. As far as I understand the documentation the VIEW keyword is mandatory when creating a view. So this should be: CREATE VIEW qry_contacts AS My apologies... that was a typo on my part in the email. Indeed, I did use CREATE VIEW qry_contacts AS... So, the problem remains... SELECT c.contact_id, c.firstname, c.lastname, (CASE WHEN (c.firstname & c.lastname) ISNULL THEN 'unnamed' ELSE (c.firstname & ' ' & c.lastname) END) AS fullname, ct.contacttype FROM contacts c LEFT JOIN contacttypes ct ON c.contact_id = ct.contact_id; Just a first guess of an other newbie... Greets, Andre - -- Andre Vehreschild -- Institute for Scientific Computing, RWTH Aachen Univ. mailto:[EMAIL PROTECTED] , phone: ++49- 241- 80- 24874 GnuPG-key available at http://www.sc.rwth-aachen.de/vehreschild -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFAWHJ8zVF62HujQtARAo8RAJ9siHv0Plf5lTwaZxi7IZQ9Ef3MtQCfaX8E W/HO6ZtyEGx0TS8XaAgKmDU= =1FCA -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [sqlite] aliasing columns in views
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, you're sure this command resulted not in an error. As far as I understand the documentation the VIEW keyword is mandatory when creating a view. So this should be: > CREATE VIEW qry_contacts AS > SELECT c.contact_id, c.firstname, c.lastname, > (CASE > WHEN > (c.firstname & c.lastname) ISNULL > THEN > 'unnamed' > ELSE > (c.firstname & ' ' & c.lastname) > END) AS fullname, > ct.contacttype > FROM contacts c LEFT JOIN contacttypes ct ON > c.contact_id = ct.contact_id; Just a first guess of an other newbie... Greets, Andre - -- Andre Vehreschild -- Institute for Scientific Computing, RWTH Aachen Univ. mailto:[EMAIL PROTECTED] , phone: ++49- 241- 80- 24874 GnuPG-key available at http://www.sc.rwth-aachen.de/vehreschild -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFAWHJ8zVF62HujQtARAo8RAJ9siHv0Plf5lTwaZxi7IZQ9Ef3MtQCfaX8E W/HO6ZtyEGx0TS8XaAgKmDU= =1FCA -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]