Re: Ragtag SE Questions
Posted in 1999
From: mathprof@bigfoot.com
>
>I had the following 'ragtag' questions related to Informix-SE:
>
>*Informix's SE doesn't include a lowercase() procedure; how do I write
>one? Is there any place I can download several useful Informix-SE
>procedures all at once (eg, some sort of "utility pack" for
>Informix-SE)?
There should be one at http://www.iiug.org
>*I have a table where a given column is "almost" unique-- the only
>value that can be repeated is the null value. In other words, the
>table can have arbitrarily many rows with that column set to null,
>but, once those rows are removed, the column is unique for the
>remaining rows. How do I implement this?
Beats me. :-)
Don't think you can.
>*Is there anyway to implement "invisible rows" in Informix-SE? These
>are rows that wouldn't show up in SELECT statements unless
>specifically requested. For example:
>
>SELECT * FROM mytab;>
>would show the normal rows, while:
>
>SELECT * FROM mytab INCLUDE INVISIBLE;>
>would show the normal rows PLUS the invisible rows. I think something
>like this would be useful if you wanted to "delete" a row, but not
>really delete it-- ie, be able to restore it if necessary. In other
>words, something like:
>
>INVISIBLIZE FROM mytab where x<15;
>
>wouldn't actually delete the rows where x<15, it would just make them
>invisible so that they wouldn't show up in normal SELECTs.
Create a column called Invisible in your table;
Create an SP or SQL to update that column based on your criteria;
Create several views on your table: all, invisible only and visible only;
Users can now select from the views, not the base table.
>*Someone mentioned I could store "backup" copies of a given table at
>various times using "schemas". How do I do this? What I'd really like
>to do is have the table know how it looked before and after *every*
>transaction. The only way I can think of doing this right now is to
>write a TRIGGER that automatically does:
>
>UNLOAD TO '/tmp/foo.tabname' SELECT * FROM tabname>
>[and even this isn't 100% accurate], and then does some sort of 'diff'
>between this copy of '/tmp/foo.tabname' and the previously saved
>one. That way, I'd have a list of 'patches' of how I got from the
>original table to where I am today. But this seems horrendously ugly--
>there must be a better way?
Let me know when you find it! :-)
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com