Back to the month index |
Back to the list index
|
bob basques (blammo@win.bright.net)
Tue, 7 Jan 1997 23:52:32 -0500
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: bob basques: "Re: [mSQL] perl/msql"
- Previous message: Lloyd Parkes: "Re: [mSQL] msqlimport"
- In reply to: Robert Stoeber: "[mSQL] msqlimport"
Message-Id: <v02140b02aef8d4b79b91@[208.140.3.173]> Date: Tue, 7 Jan 1997 23:52:32 -0500 From: blammo@win.bright.net (bob basques) Subject: [mSQL] Re: perl/msql>At 08:59 AM 1/7/97 -0600, Bob Basques wrote:
>>
>>Is there a way from within Perl, to tell if a Table Name exists within a
>>MSQL Database, am I stuck with using "relshow" or is there a some type
>>of SQL query that will work?
>>
>
>You could try inserting a dummy entry inside the table, then doing a
>
>SELECT * FROM table_name
>
>and seeing if $[OBJECT NAME]->numrows; is over 1 (if your using MsqlPerl..)
>
>then remember to delete the dummy entry when you're finished...
>
>--
>Warmest Regards...
I already thought of that, but I have about three hundred such tables to build.
Now that I see you scratching your head, I'll explain further. I've got a
GIS interface built using msqlperl and the table names corrospond to
geographic areas, some exist, we're still building, some don't, yet, and
some may never exist. there are also going to be many more overlays to each
of these areas in the future with names ion the format of :
NE232922_entity-type_overlay-type
The first part (NE232922) keeps track of the geographic area.
The second part (entity-type) keeps track of what to draw, using PGPLOT.
The third part (overlay-type) keeps track of which overlay, sewer,bridges,
roads, etc.
You can see how this can get complicated real quick. The reason the tables
have been split up this way is just about every database around here is set
up this way and it also significantly narrows the search before making a
query which speeds things up considerably
I could just write something to make the dummy tables/overlays and replace
them as they become available with the real data, I was just wondering if
there was a way to check whether a table existed, before making a query, or
an SQL staement that might accomplish this.
Thanks
bobb
bob basques
bob.basques@stpaul.gov, blammo@win.bright.net
City of St. Paul, Mn.
--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to "unsubscribe" to msql-list-request@bunyip.com. Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!
- Next message: bob basques: "Re: [mSQL] perl/msql"
- Previous message: Lloyd Parkes: "Re: [mSQL] msqlimport"
- In reply to: Robert Stoeber: "[mSQL] msqlimport"