On 03/11/08 21:56, Wang, Sheng (Controllers, Controllers) wrote:
>   HI, Tony,
> Thank you very much for your answers, it is very helpful.
> I only have one thing that I cannot run sucessfully.
>
> For the below question,
>
>
>> CREATE TABLE "HCDCNV"."ADDR_AGREEMENT" ("AGREEMENT_ID" NUMBER,
>> "AGREEMENT_CODE" VARCHAR2(64) NOT NULL ENABLE, "AGREEMENT_EFF" DATE
>> NOT NULL ENABLE, "CRTN_DT_TMSTMP" DATE NOT NULL ENABLE, "IS_VALID"
>> VARCHAR2(1) NOT NULL ENABLE, "CRTN_LGN_ID" VARCHAR2(20) NOT NULL
>> ENABLE, "MDFD_DT_TMSTMP" DATE NOT NULL ENABLE, "MDFD_LGN_ID"
>> VARCHAR2(20) NOT NULL ENABLE) PCTFREE 10 PCTUSED 80 INITRANS 1
>> MAXTRANS 255 STORAGE(INITIAL 1048576 FREELISTS 1 FREELIST GROUPS 1)
>> TABLESPACE "CONVTABLES" LOGGING NOCOMPRESS ;
>>
>> so how can I extract only those 'CREATE TABLE....' clause till ';'
>> from this file and save it to a new file, say '2.sql'
>
>
>
> I try to use
> g/^CREATE TABLE/,/;/ w!>>  create_table_ddl.sql
>
> Vim shows:
> E486: Pattern not found: ^CREATE TABLE
>
> Anything I need to change for syntax?
>
> Thanks a lot

Well, you seemed to imply that CREATE TABLE would come at the start of a 
long line ended by a semicolon. So what went wrong? You tell me. Was it 
not at the start of a line? Were there more than one space between 
CREATE and TABLE? Were there tabs either before or between? Was it 
something else? I believe that the commands which I gave you, which were 
not what you showed above, would have worked on any number of "long 
lines" all ended by a semicolon, in order to extract those that began 
with "CREATE TABLE". Now you tell me the exact details, or better, 
follow the help links in my previous post and find out what you did wrong.


Best regards,
Tony.
-- 
Jenkinson's Law:
        It won't work.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to