SQL statement to EXPORT /CREATE the table , field-names and size to a file in Pervasive

Many times i need to create a copy from a table in the same database to a new table
Instead of creating by hand , copying  fieldnames,size ,  can I create a file
wich contains these names, in some create 'new' table call
BIAPROAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mirtheilSoftware DeveloperCommented:
What version of Pervasive are you using?  There is not, as far as I know, a way of programmatically getting a SQL statement to create a table.  
If you are using a recent version, you can use DTI or DTO to get the field and index information and use that to create a new table.  Take a look at the dtoTable object.
0
BIAPROAuthor Commented:
PERVASIEV SQL 2000
0
BIAPROAuthor Commented:
Dear Mark,

don' t understand the issue, just did give a responde, will delete my qst,
regards Jack
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

BIAPROAuthor Commented:
I've requested that this question be deleted for the following reason:

due to response off  mark
0
BIAPROAuthor Commented:
Not to delete
0
Mark WillsTopic AdvisorCommented:
Pervasive SQL 2000... Hmmm...

Have you looked at the butil command line utility ?

Should be in your online documentation (or download from : http://www.novell.com/documentation/nw6p/pdfdoc/usrguide.pdf )

There are options for copy and clone and save (and more)

You can also search the Tools on the Pervasive Community site : http://cs.pervasive.com/files/folders/tools/default.aspx

Otherwise you might have to go for a more robust solution via commercial software such as: razorsql or goldstarsoftware to name just a couple. They offer trial, but the full software costs.

Apologies about any prior confusion, and trust that's all cleared up (thanks Modalot).
0
Bill BachPresident and Btrieve GuruCommented:
As I indicated in my deleted post, Mark Wills is correct -- Pervasive.SQL 2000i has no built-in feature to do what you are looking for. If you upgrade to Pervasive PSQL v9 or higher, you can use the simple SQL statement:  SELECT * INTO NewTable FROM OldTable;
Otherwise, you will need to look for an outside (I.e. Third party) tool to do this.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BIAPROAuthor Commented:
Hi Bill,  ok, no problem on the server runs V10,  workstation has 2000i, so con run on
server console.
i needed just the SQL syntax, this will do
regards Jack
0
Mark WillsTopic AdvisorCommented:
You have V10 ? Why didn't you say so earlier ?

Select into doesn't copy indexes, and if using temp tables, must not already exist...

There's a couple of other constraints as well - might want to check that V10 manual...

Pleased to see Bill was able to give you the answer. Happy days.
0
BIAPROAuthor Commented:
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.