Re: Version problem
Posted in 2000
From: NDSTURNERBUND@t-online.de (Dirk Emmermacher)
>
>Obnoxio The Clown wrote:
> >
> > From: NDSTURNERBUND@t-online.de (Dirk Emmermacher)
> > >
> > >P.S. to the clown: To rescue my data I write a small report that made a
> > >sql-script. When dbexport doesn't work its a easy method to data in
> > >ascii files!
> >
> > You're confusing me...?
>
>I don't want confuse you! Here are the report that will do this work:
>
>database
>ntb3
>end
>
>output
>left margin 0
>right margin 200
>top margin 0
>bottom margin 0
>page length 10000
>report to "/prog/NTB_DB/EXP_DATA.sql"
>end
>
>select tabname,tabtype from systables
>where tabtype = "T"
>and tabname not matches "sys*"
>order by tabname
>end>
>format
>on every row
>print "unload to /NTB3/ntb3/",tabname clipped,".dat delimiter "#""
>print "select * from ",tabname,";"
>end
>
>--------
>After this you can run the sql-statement . I had generated a second
>report that load the data. It works!
Oh. What's wrong with
dbaccess dbname <<!
OUTPUT TO PIPE "cat | dbaccess dbname" WITHOUT HEADINGS
SELECT "UNLOAD TO /NTB3/ntb3/" || tabname CLIPPED ||
".dat DELIMITER "#",
"SELECT * FROM " || tabname CLIPPED || ";"
FROM systables
WHERE tabtype = "T"
AND tabid > 100
ORDER BY tabname
!
??? Seems to save the cost of the Informix-SQL license....
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com