SQL Query question and unload db question

SQL Query question and unload db question

Post by Mike Ossi » Wed, 28 May 2003 08:42:47



Hello,

I've already accomplished part of what I need to do by going three
sides around the barn, but wondered if there was an easier way.

What I wanted was just a list of the table names in a db.

To do that, I ran help tables *.t*, which, of course, got me _all_ the
information about each table, then did a search, cut and paste routine
on all that to get just the table names into a concise list.

Is there some syntax I missed someplace, or a query routine that would
produce just the table names in a db? What would have really been
peachy, is a routine that would have pulled out only those table names
ending in 000, 110, or 700. The table name format is something like
ttccom010110.

Second part is a question about unloaddb. We're moving a 2.0/8125
install to 2.5/whatever install. The tools that come with the front end
app are apparently Baan tools (the app was originally written in that,
several generations ago).

The typical instructions call for running a bdbpre command line routine
against the aforementioned table list, which creates a delimited file
suitable for doing a bdbpost back into the new install tables.

Are there any problems in moving directly from 2.0 to 2.5? And, is
there anything special or or more preferable about using the
unloaddb/loaddb command line arguments?

Many thanks and for those celebrating Memorial Day, hope it was good
for you.

Regards,

Mike Ossing
Rodem, Inc.
Cincinnati, OH
513-922-6140

 
 
 

SQL Query question and unload db question

Post by Shuggi » Wed, 28 May 2003 09:10:00



Quote:>Hello,

>I've already accomplished part of what I need to do by going three
>sides around the barn, but wondered if there was an easier way.

>What I wanted was just a list of the table names in a db.

>To do that, I ran help tables *.t*, which, of course, got me _all_ the
>information about each table, then did a search, cut and paste routine
>on all that to get just the table names into a concise list.

>Is there some syntax I missed someplace, or a query routine that would
>produce just the table names in a db? What would have really been
>peachy, is a routine that would have pulled out only those table names
>ending in 000, 110, or 700. The table name format is something like
>ttccom010110.

select table_name from iitables
where table_name like '%000' or
table_name like '%110' or
table_name like '%700'

Quote:>Second part is a question about unloaddb. We're moving a 2.0/8125
>install to 2.5/whatever install. The tools that come with the front end
>app are apparently Baan tools (the app was originally written in that,
>several generations ago).

>The typical instructions call for running a bdbpre command line routine
>against the aforementioned table list, which creates a delimited file
>suitable for doing a bdbpost back into the new install tables.

>Are there any problems in moving directly from 2.0 to 2.5? And, is
>there anything special or or more preferable about using the
>unloaddb/loaddb command line arguments?

unloaddb is pretty much the same except it works at the db level rather
than the application.

Although you could upgrade without doing either.

--
Shug

Zaphod's just this guy... you know?

 
 
 

SQL Query question and unload db question

Post by Karl & Betty Schend » Wed, 28 May 2003 11:26:52




> >What I wanted was just a list of the table names in a db.

>[snip]
>select table_name from iitables
>where table_name like '%000' or
>table_name like '%110' or
>table_name like '%700'

I think the table_name in iitables is CHAR, which means you have
to allow for the trailing spaces when you are doing like.
Try:
.. where table_name like '%000 %' or ...

As for the upgrade part of your question, unless you are moving the
databases I would simply upgrade in place with upgradedb.  If you must
unloaddb, use the binary (default) version if at all possible.
MK generates weird "hash" column values which don't unload well in
character (-c) mode.

bdbpre/post avoids the hash column issue by regenerating them from
scratch.  Of course they are also about a zillion times slower.

--

K/B Computer Associates       www.kbcomputer.com
Ingres, Unix, VMS             Consulting and Training

 
 
 

1. Easy SQL question - query within query?

I am using SQL-Server 7 and writing queries in the "SQL Server Query
Analyser" which is part of the package.

Let's say I write a query which totals up the year's invoices, grouped by
Account No.  I save the query to a file: "InvoiceTotals.sql".  It works
fine and gives the expected results.

Now, I want to refer to that InvoiceTotals query from another, seperate
query.  For example:

SELECT * FROM InvoiceTotals WHERE Goods > 1000

I used to be able to do this 'query-within-query' kind of thing in Access
95 just like in the above example.  But in SQL-Server I keep getting
"invalid object name - InvoiceTotals" because I can't get SQL to refer to
the stored query.

Question: How to I refer to one query within another?

Any help much appreciated!  Thanks :-)


please copy replies to the above address if possible.

2. Latest updates to VB/Access 2.0????

3. QUESTION?: DB replication options :QUESTION?

4. db question / JDBC question

5. DB-LIB question ( newbie question )

6. Memory leak question-loading/unloading forms?

7. Possible memory leak question-loading/unloading forms?

8. Gupta SQLBase to Oracle UNLOAD Question

9. SE 7: question on unload

10. High-Performance unload question