NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
URL (Score:1)
life is too short
Re:URL (Score:2)
It still has work a fair amount of work that it needs and it's specific to Oracle, but if you want to see the core of it (fair warning, it's a sloppy hack):
Then it's a simple matter of writing shell utilities around it. I call the above program qsql, so my desc and tabs (table names) utilities are:
and
You can also write simple select statements from the command line with my sel utility:
Implemented with:
Again, everything is very specific to Oracle and it's not rocket science, but it's very, very useful to me. Note that the desc utility will only describe tables, not views. That can be confusing if you don't know what you're looking for isn't a real table.
Reply to This
Parent
Re:URL (Score:1)
This doesn't need to be Oracle specific if you use the 'table_info' method. In fact, you're calling 'column_info' in a deprecated style (though in past docs, I can only tell that the style was once valid for 'table_info'). Since the 'table_info' and 'column_info' methods allow wildcards for the table name, you could do all the tricky parts with just those methods.
Yeah, there is a bit of slop in that you pass the table name to the desc_tables_and_exit function, but use the captured m
Re:URL (Score:1)
Re:URL (Score:2)
Well, that bit of dreck can easily be explained away by the fact that I was busy doing a refactor I later abandoned and when I posted here I noticed I was using $1 so I tried to fix that on the fly and failed miserably :)
Re:URL (Score:2)
Ack. I hit submit instead of preview. Sigh.
I was trying to thank you for the information, but I didn't get that far :)