Executable SQL from export file? show=y Regular expressions?

Executable SQL from export file? show=y Regular expressions?

Post by Jerr » Wed, 10 Jan 2001 00:52:07



Hi!

I don't know much about regular expression so I hope you can help me out
with this.
I have a db with about 1000 objects in it. I need to make a small test
database out of it. The problem is that the minimum extent size is 1mb
and thats way to large for this db.

When importing using show=y I get a file with SQL that needs a lot of
editing just to be able to run it in ie SQL Plus.
Ie very line starts and end with " .
The lines are chopped at equal lengthes so some(all?) lines look like
this
    "COLUMN1 VARCHAR"
    "2(10) NOT NULL EN"
    "ABLE............"

So those of you that have done this before how did you do it?
Do you have a script using SED or similar programs?

Any help greatly appreciated!

Regards
Jerra

Oracle 8.0.5
Solaris 2.6

 
 
 

Executable SQL from export file? show=y Regular expressions?

Post by Brian Peaslan » Wed, 10 Jan 2001 22:55:11


To edit this file, I've always used the 'vi' editor on Unix platforms.
But the concepts are the same no matter which editor you use.

  First, use the global search and replace to get rid of the double
quotes.
     in 'vi', use   :g/"/s///g
  Then you'll have to join the lines where a newline character was
added.
     in 'vi', use shift-j

HTH,
Brian


> Hi!

> I don't know much about regular expression so I hope you can help me out
> with this.
> I have a db with about 1000 objects in it. I need to make a small test
> database out of it. The problem is that the minimum extent size is 1mb
> and thats way to large for this db.

> When importing using show=y I get a file with SQL that needs a lot of
> editing just to be able to run it in ie SQL Plus.
> Ie very line starts and end with " .
> The lines are chopped at equal lengthes so some(all?) lines look like
> this
>     "COLUMN1 VARCHAR"
>     "2(10) NOT NULL EN"
>     "ABLE............"

> So those of you that have done this before how did you do it?
> Do you have a script using SED or similar programs?

> Any help greatly appreciated!

> Regards
> Jerra

> Oracle 8.0.5
> Solaris 2.6

--
========================================
Brian Peasland
Raytheons Systems at
  USGS EROS Data Center
These opinions are my own and do not
necessarily reflect the opinions of my
company!
========================================

 
 
 

1. Free/open source XP for using regular expressions in T-SQL

Hi everyone,

I've written an extended stored procedure that will allow
the use of regular expressions in T-SQL. It's both free
and open source, so if you're interested, please take a
look at http://www.codeproject.com/database/xp_pcre.asp.

This is a follow-up to my previous XP, xp_regex, which
uses the .NET Framework. xp_pcre does not require the .NET
Framework, so if the fact that you had to install .NET was
prohibitative, you should definitely take a look at
xp_pcre.

If you have any questions, please contact me at

Thanks!

2. no servers

3. Regular expression in T-SQL

4. Paradox 4.1 Printer Setup Script files.

5. how to evaluate regular expressions from SQL Server 2000

6. Oracle8i linux Installer problem

7. SQL Parsing Regular Expression?

8. Regular Expression and MS-SQL

9. Regular expressions in T-SQL

10. SQL Regular Expression Question

11. Select files showing up in executable directory??

12. pl/sql - pattern matching / regular expressions