Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!titan!drack From: drack@titan.tsd.arlut.utexas.edu (Dave Rackley) Newsgroups: comp.databases Subject: Re: Need help with INGRES SQL copy to/from file Message-ID: Date: 28 Aug 90 19:46:34 GMT References: <11104@spool.cs.wisc.edu> Sender: news@titan.tsd.arlut.utexas.edu Organization: Applied Research Laboratories, University of Texas at Austin. Lines: 41 In-reply-to: beverly@ai.cs.wisc.edu's message of 28 Aug 90 16:56:25 GMT In article <11104@spool.cs.wisc.edu> beverly@ai.cs.wisc.edu (Beverly Seavey (-Kung)) writes: > Iam trying to transfer the contents of one table to another > using "copy from" and "copy into". > The SQL statement: > copy table atomlook3 (atomnumb=c0,comma=d1, > aaname=c0,comma=d1, > atomname=c0, comma=d1, > nucleus = c0) > into 'DSK$USER12:[NMRDB]pd.out' > results in a nicely formatted file with one line for > each record in the table atomlook3. If I then try to > transfer the file's contents > into a new table: [Stuff deleted] A different approach would be: create table newtable as select * from oldtable This will create a 'copy' of your old table, and it will allow additional SQL clauses. You can still use your copy syntax for outputting reports! Hope this helps ;-) -- +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+ | David Rackley | | | Applied Research Laboratories | "Say what? Use what? ... | | P.O. Box 8029 | ...I'd rather kiss a fat man on the lips!" | | Austin, TX. 78713-8029 | | +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+ | DISCLAIMER? I don't know anything 'bout any ol' disclaimer! | +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+