Re: SQL Views
Posted in 1993
->Date: Thu, 27 May 93 10:31:19 PDT ->From: Michael Gordon <maint72@saad-emh1.ARMY.MIL> ->To: informix-list@RMY.EMORY.EDU ->Subject: SQL Views -> ->Hello Informix Net: -> ->I have been working with ISQL v. 2.10 for MS-DOS for some time. -> ->I have successfully created a view using the RDSQL language format, everything ->in the informix system says the view is ok. -> ->Question: How do I now use the view to display data on the screen, query ->data, add data, update data, or delete data? -> ->The "Informix Users Manual and Reference Manual state that all these functions ->can be accomplished, BUT they do not seem to illustrate how these functions ->are performed once the view has been created. -> ->I have included the RDSQL command to create the view. -> ->database employee; -> ->create view emp_view as -> select * -> from employee -> where lname is not null -> ->with check option; -> ->What do we do with the view now? -> ->Thanks in advance to all those who can provide unsight and direction. -> -> Michael S. Gordon -> Foreman, Gyroscope Section -> Avionics Division -> -> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -> * Michael Gordon Sacramento Army Depot * -> * Foreman, Gyroscope Section Directorate For Maintenance * -> * E-Mail: maint72@saad-emh1.army.mil Attn: SDSSA-MAV-320 * -> * DSN: 839-2367 Michael S. Gordon * -> * Comm.: (916) 388-2367 Sacramento, CA 96813-5036 * -> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * At this point, you should be able to treat the view as tho' it were a table. Since this is a single table view, you can update the database thru the view. Had it been a view that included a join, then you could only select thru it, not insert, update, or delete. One final note: If you created your database with usernames, then you will need to grant appropriate privileges to users other than the creator/owner of the view. If you need additional assistance, e-mail me direct and we can continue off-net. Regards, Alan +------------------------------+---------------------------------------+ | R. Alan Popiel | Internet: alan@den.mmc.com | | Martin Marietta, LSC | ( Please note: My opinions do not ) | | P.O. Box 179, M/S 5422 | ( represent official Martin policy. ) | | Denver, Colorado 80201-0179 | Voice: 303-977-9998 | +------------------------------+---------------------------------------+