Re: blank lines in create table script

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Tue, 3 Dec 2019 11:42:24 -0500
Message-ID: <e75c1680-5a9d-2fc8-1f9d-520e2fdf53cd_at_gmail.com>



I can't find notepad++:

root_at_umajor:/home/mgogala# apt install notepad++ Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package notepad+
E: Couldn't find any package by regex 'notepad+' root_at_umajor:/home/mgogala#

However, there is another free editor which does have regular expressions, without any additional configuration. It's freely available on https://www.vim.org.

On 12/3/19 11:20 AM, Rich J wrote:
>
> Off the top of my head, the free Notepad++ editor has a RegEx replace
> where you could replace:
>
> ^$\n\
>
> (including a single space at the end)...with:
>
> \
>
> (including a single space at the end), making sure the "Regular
> Expression" box is checked in the Replace dialogue (standard <CTRL-H>
> to replace in the editor).
>
> The "^$" says to match lines where the end of the line immediately
> follows the beginning, i.e. a truly blank line.
>
> The "\n" will match the newline.  It may need to be "\r" or "\n\r" or
> "\r\n", depending on the actual new line characters existing in the
> file you're editing.
>
> The "\ " matches a single space, so the the blank line between the DDL
> and the COMMIT is preserved.
>
>
> Just one idea......
>
> Rich
>
>
> On 2019/12/03 09:50, Howard Latham wrote:
>
>> Funny one this - I've got a load of scripts from a supplier with
>> create table commands. They error as there's a blank line in front of
>> constraint clauses. Is there a way of making them work-
>> without editing the whole lot?
>> Don't really want to edit delivered product scripts.
>> Oracle  18c Redhat 7.
>
>

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217


--
http://www.freelists.org/webpage/oracle-l
Received on Tue Dec 03 2019 - 17:42:24 CET

Original text of this message