Need help in unix regular expressions

Hi All,
I'm new to shell scripting. Please help me in achieving this
I am trying to a find regular expression that need to pick a file with begin with the below format and mask variable is called in xml file.
currently the script accepts:
mask="CLIENT_ID+'_ADHSUITE_IN_'+date2str(now,'MMddyy','US/Eastern')+'.txt'"
But it should accept in the below format
2595_ADHSUITE_IN_ANNWEL_030309_2009-02-10_15-12-46-000_648.TXT715.outpgp_out
where CLIENT_ID=2595. How to place wild card character '*' in the below to accept file in the above format. here is what i made changes.
mask="CLIENT_ID+'_ADHSUITE_IN_'*+date2str(now,'MMddyy','US/Eastern')*+'.TXT'*+'.outpgp_out'"
Please help.
Thanks

I believe your statement is being passed over twice:
First Pass: (This is done by something like javascript)
CLIENT_ID+'_ADHSUITE_IN_'+'.*'+date2str(now,'MMddyy','US/Eastern')+'.*'+'.TXT'+'.*'+'.outpgp_out'In this pass the variables and functions that are enclosed in literals are processed:
(1) CLIENT_ID is replaced by 2595 or whatever is current value is:
(2) date2str(now,'MMddyy','US/Eastern') gets replaced by 040609 (if the current time now is 4th april 2009).
So at the end of this first pass we have a string:
2595_ADHSUITE_IN_.\*040609.\*.TXT.*.outpgp_outThis string at the end of the first pass is a Posix basic regular expression. (ref: [http://en.wikipedia.org/wiki/Regular_expression] ) accessed at time of post).
This is the string I put in the Regular Expression text box on [http://www.fileformat.info/tool/regex.htm]
and it matches "2595_ADHSUITE_IN_ANNWEL_040609_2009-01-27_17-02-28-000_631.TXT715.outpgp_out" for me (though I prefer my egrep test).
I hope this is somewhat clearer. Remember I have very little information about your system/application and I make big guesses.
NB: (I should thank Frits earlier for pointing my sloppiness between wildcards (for eg unix shell filename expansion) and regular expressions).
For the second pass this used to compared other strings to see

Similar Messages

  • Need help in writing regular expressions involving \w

    Hi,
    Here is my requirement .
    I have a string : GTA - 12AB TRA - 12AB
    I need a regex that represent above string.
    GTA - Constant - This wont change
    12AB - This will be \w (alphanumeric)
    Here I cannot have TRA within this 4 characters.
    The question is :
    How can I write an expression which says it can be a word(the positions where I have 12AB in example) but not TRA in sequence.
    Is this doable?
    Thanks in advance.

    Use lookarounds: [http://www.regular-expressions.info/lookaround.html]
    The regex:
    (?!.?TRA).{4}matches any 4 characters (except line breaks) that does not contain 'TRA'.

  • Need help starting with regular expressions

    Hi,
    looked through the tutorials, and some stuff online and still having trouble.
    I've done a fair amount of modifying xml files with perl, and want to do the same thing with java.
    I'm writing this at work, and we don't have the 1.5 jdk installed, so I can't use the Pattern and Match objects.
    Here's some code I wrote:
    package pack1;
    import java.io.BufferedReader;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    public class PlantTest {
          * @param args
          * @throws Exception
         public static void main(String[] args) throws Exception {
              // get file to read from
              java.io.File infile = new java.io.File("plant.xml");
              FileReader infileReader = new FileReader(infile);
              BufferedReader bInfile = new BufferedReader(infileReader);
              //get basic file info
              System.out.println("does the file exist? " + infile.exists());
              System.out.println("file is located at: " + infile.getAbsolutePath());
              System.out.println("file was last modified: " + new java.util.Date(infile.lastModified()));
              // create a pattern
              String match = "<COMMON>";
              String line = bInfile.readLine();
              while (line != null){
                   //System.out.println(bInfile.readLine());
                   if (line.matches(match)){
                        System.out.println("match made: " + line);
              bInfile.close();
              infileReader.close();
    }I want the "match" object to be the equivalent of this in perl:
    (I realize I don't have the output set up in the code above, I was going to add it later, for now I just want to make the match and print something on the console)
         m/<COMMON>([^<]+)</COMMON>/i;
         $common = $1;
         print HTML "<p>Common Name: $common\n";here's a snippet of xml:
         <PLANT>
              <COMMON>Bloodroot</COMMON>
              <BOTANICAL>Sanguinaria canadensis</BOTANICAL>
              <ZONE>4</ZONE>
              <LIGHT>Mostly Shady</LIGHT>
              <PRICE>$2.44</PRICE>
              <AVAILABILITY>031599</AVAILABILITY>
         </PLANT>(I cribbed that xml from the w3c site)
    thanks in advance,
    bp
    Message was edited by:
    badperson

    ouch. 1.3.1...
    That's here at work, I'm kind of nervous about
    downloading another jdk, will there be a conflict?Google for Jakarta ORO regex. It is about the same speed as Java regex and works well with JDK1.3.1 .

  • Help with Understanding Regular Expressions

    Hello Folks,
    I need some help in understanding the Regular Expressions.
    -- This returns the Expected string from the Source String. ", Redwood Shores,"
    SELECT
      REGEXP_SUBSTR('500 Oracle Parkway, Redwood Shores, CA,aa',
                    ',[^,]+,', 1, 1) "REGEXPR_SUBSTR"
      FROM DUAL;
    REGEXPR_SUBSTR
    , Redwood Shores,
    However, when the query is changed to find the Second Occurrence of the Pattern, it does not match any. IMV, it should return ", CA,"
    SELECT
      REGEXP_SUBSTR('500 Oracle Parkway, Redwood Shores, CA,aa',
                    ',[^,]+,', 1, *2*) "REGEXPR_SUBSTR"
      FROM DUAL;
    REGEXPR_SUBSTR
    NULLCan somebody help me in understanding Why Second Query not returning ", CA,"?
    I did search this forum and found link to thread "https://forums.oracle.com/forums/thread.jspa?threadID=2400143" for basic tutorials.
    Regards,
    P.

    PurveshK wrote:
    Can somebody help me in understanding Why Second Query not returning ", CA,"?With your query...
    SELECT
      REGEXP_SUBSTR('500 Oracle Parkway, Redwood Shores, CA,aa',
                    ',[^,]+,', 1, *2*) "REGEXPR_SUBSTR"
      FROM DUAL;You are looking for patterns of "comma followed by 1 or more non-comma chrs followed by a comma."
    So, let's manually pattern match that...
    '500 Oracle Parkway, Redwood Shores, CA,aa'
                       ^               ^
                       |               |
                               |
                               |
                      Here to here is the
                      first occurence.So the second occurance will start searching for the same pattern AFTER the first occurence.
    '500 Oracle Parkway, Redwood Shores, CA,aa'
                                        ^
                                        |
    i.e. the search for the second occurence starts heretherefore the first "," from that point is...
    '500 Oracle Parkway, Redwood Shores, CA,aa'
                                           ^
                                           |
                                          hereand there is nothing there matching the pattern you are looking for because it only has the
    "comma follwed by 1 or more non-comma chrs"... but it doesn't have the "followed by a comma"
    ...so there is no second occurence,

  • Urgent help regarding Java regular expressions.

    hello everyone,
    I am trying to parse a html file which contains
    dyn.Img("http://www.boston.com/news/nation/articles/2007/06/21/bill_clinton_takes_bigger_campaign_role&h=306&w=410&sz=13&hl=en&start=43","","QFo9lqKeMR7uzM:","http://cache.boston.com/resize/bonzai-fba/AP_Photo/2007/06/21/1182410228_1931/410w.jpg","125","93","\x3cb\x3eBill Clinton\x3c/b\x3e takes bigger campaign \x3cb\x3e...\x3c/b\x3e","","","410 x 306 - 13k","jpg","www.boston.com","","","http://tbn0.google.com/images","1")
    the given above function many times. I have to fetch the whole functions into an array. So i have to write a regular expression which recognises the whole above string.
    Can anyone please help me.
    Thank you,
    chaitanya

    well if this is all you want
    http://cache.boston.com/resize/bonzai-fba/AP_Photo/2007/06/21/1182410228_1931/410w.jpg
    You can always substring it like chuck said
    ***BUT all the images would have to be .jpg for this to work***
    back = we.indexOf(".jpg");
    int x = 0;
    while (back < web.lastIndexOf(".jpg"))
                    back = web.indexOf("http",back+1);
                    picture[x] = web.substring(front, back);
                    x++;
                    front = back;
                  }       Might not be the best code but it worked with a website i had to parse
    Message was edited by:
    mark07

  • Need to remove Commas REgular Expressions?

    How can I use java to remove commas from a number.
    1,000 string
    need it to be
    1000
    can I pass it through some sort of regular expression?

    I was attempting to do it with regular expressions to learn how to do them better.
    Thanks for your good comment.
    nupevic

  • Help with java regular expressions

    Hi all ,
    i am going to match a patternstring against an input string and print the result here is my code:
         import java.util.regex.*;
         import java.util.*;
         public class Main {
              private static final String CASE_INSENSITIVE = null;
              public static void main(String[] args)
              CharSequence inputStr = "i have 5 years FMCG saLEs exp on java/j2ee and i worked on java and j2ee and 2 projects on telecom java j2ee domain with your  with saLEs maNAger experience of java j2ee and c# having very good  on c++ exposure in JAVA"
             String patternStr = "\"java j2ee\" and \"c#\"";
              StringTokenizer st = new StringTokenizer(patternStr,"\",OR");
             Matcher matcher=null;
              while(st.hasMoreTokens()){
                   String s=st.nextToken();
                   Pattern pattern = Pattern.compile(s,Pattern.CASE_INSENSITIVE);
               matcher = pattern.matcher(inputStr);
               while (matcher.find()) {
                  String result = matcher.group();
                 if(!result.equalsIgnoreCase(" "))
                             System.out.println("result:"+result);
         when i compile this code i am getting the expected result...ie
    result:java j2ee
    result:java j2ee
    result: and
    result: and
    result: and
    result: and
    result: and
    result: and
    result:c#
    but when i replace String patternStr = "\"java j2ee\" and \"c#\""; with
    String patternStr = "\"java j2ee\" and \"c++\""; i am just getting c in the result instead of c++ ie i am getting result :
    result:java j2ee
    result:java j2ee
    result: and
    result: and
    result: and
    result: and
    result: and
    result: and
    result:C
    result:c
    result:c
    result:c
    result:c
    result:c
    result:c
    In the last lines i should get result:c++ instead of result: c
    Any ideas please
    Thanks

    In the last lines i should get result:c++ instead of result: cThe regular expression parser considers the plus sign '+' a special
    character; it means: one or more times the previous regular expression.
    So 'c++' means one or more 'c's on or more times. Obviously you don't
    want that, you want a literal '+' plus sign. You can do that by prepending
    the '+' with a backslash '\'. Unfortunately, the javac compiler considers
    a backslash a special character and therefore you have to 'escape'
    the backslash also, by adding another backslash. The result looks
    like this:"c\\+\\+"kind regards,
    Jos

  • Little help with this regular expression ?

    Greetings all,
    My string is like "P: A104, P105, K106" and I tried to split it using following regular expression ,but seems even though it returns 'true' as matched, it does not split the string.
    Finally what I want is String is array like {"P:","A104","P105","K106"}
    What seems to be the problem with my regular expression?
           String PAT1="[a-zA-Z]:\\s([a-zA-Z]\\d{1,}([,]\\s)?)*";
         String inp="P: A104, P105, K106";
         Pattern p=Pattern.compile(PAT1);
         System.out.println(p.matcher(inp).matches());
         String strs[]=inp.split(PAT1);
         for(String s:strs){
              System.out.println("part  "+s);
         }

    pankajjaiswal10 wrote:
    You can also use split(":|,")No, that will remove the colon and leave the whitespace intact. My understanding is that the OP wants to keep the colon and remove the commas and whitespace. I would use this: String[] strs = inp.split(",?\\s+");

  • Need PL/SQL - Oracle Regular Expressions help

    Hi all,
    I have to create script some schema in oracle database to update our SVN. And after create DDL scrip need to do some modification (Ex: add columns). Example as follows,
    After create table DDL original scripts as follows,
    --table format 1
    CREATE TABLE "USER"."TABLE1"
            "COLUMN1"   NUMBER,
            "COLUMN2"   NUMBER,
            "COLUMN3"   NUMBER,
            "COLUMN4"   VARCHAR2(20 BYTE),
            PRIMARY KEY ("COLUMN1") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "T1" ENABLE
        PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
            INITIAL 35651584 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
        TABLESPACE "T1" ;
    CREATE INDEX "USER"."TABLE1_COLUMN2" ON "USER"."TABLE1"
            "COLUMN2"
        PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
            INITIAL 196608 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
        TABLESPACE "T1" ;
    CREATE INDEX "USER"."TABLE1_COLUMN3" ON "SPIDERP4"."TABLE1"
            "COLUMN3"
        PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
            INITIAL 458752 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
        TABLESPACE "T1" ;
    --table format 2
    CREATE TABLE "USER"."TABLE2"
            "COLUMN1"  NUMBER,
            "COLUMN2"  NUMBER,
            "COLUMN3"  NUMBER,
            "COLUMN4"  VARCHAR2(20 BYTE)
        PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
            INITIAL 35651584 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
        TABLESPACE "T1" ;
    CREATE INDEX "USER"."TABLE2_COLUMN1" ON "USER"."TABLE2"
            "COLUMN1"
        PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
            INITIAL 196608 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
        TABLESPACE "T1" ;
    CREATE INDEX "USER"."TABLE2_COLUMN2" ON "SPIDERP4"."TABLE2"
            "COLUMN2"
        PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
            INITIAL 458752 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
        TABLESPACE "T1" ;
    I need to include following amendment to above table scripts (expecting results),
    --1
    CREATE TABLE "USER"."TABLE1"
            "COLUMN1"   NUMBER,
            "COLUMN2"   NUMBER,
            "COLUMN3"   NUMBER,
            "COLUMN4"   VARCHAR2(20 BYTE),
            _*"COLUMN5"   NUMBER(3,0) DEFAULT 0,*_
            PRIMARY KEY ("COLUMN1") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "T1" ENABLE
        PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
            INITIAL 35651584 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
        TABLESPACE "T1" ;
    CREATE INDEX "USER"."TABLE1_COLUMN2" ON "USER"."TABLE1"
            "COLUMN2"
        PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
            INITIAL 196608 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
        TABLESPACE "T1" ;
    CREATE INDEX "USER"."TABLE1_COLUMN3" ON "SPIDERP4"."TABLE1"
            "COLUMN3"
        PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
            INITIAL 458752 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
        TABLESPACE "T1" ;
    --2
    CREATE TABLE "USER"."TABLE2"
            "COLUMN1"  NUMBER,
            "COLUMN2"  NUMBER,
            "COLUMN3"  NUMBER,
            "COLUMN4"  VARCHAR2(20 BYTE),
            _*"COLUMN5"  NUMBER(3,0) DEFAULT 0*_
        PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
            INITIAL 35651584 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
        TABLESPACE "T1" ;
    CREATE INDEX "USER"."TABLE2_COLUMN1" ON "USER"."TABLE2"
            "COLUMN1"
        PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
            INITIAL 196608 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
        TABLESPACE "T1" ;
    CREATE INDEX "USER"."TABLE2_COLUMN2" ON "SPIDERP4"."TABLE2"
            "COLUMN2"
        PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
            INITIAL 458752 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
        TABLESPACE "T1" ;
    /Note:
    I need solution apart from these conditions,
    1)Table cannot be modify before create DDL (DDL creating using this method “dbms_metadata.get_ddl” ).
    2)This is automated processes manual modification cannot be allow.
    3)We cannot hard-coded any Dynamic Values because above create DDL table just for explain my question.(**note : “PCTFREE” ,” PRIMARY KEY”, “),”.... above values can be hard-coded**)
    Thanks
    Tharindu Dhaneenja
    Edited by: Dhaneenja on Mar 14, 2011 11:16 PM
    Edited by: Dhaneenja on Mar 14, 2011 11:17 PM
    Edited by: BluShadow on 15-Mar-2011 09:08
    Added {noformat}{noformat} tags                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    not very safe code to do what you are looking for...
    =================test data========================
    SET ECHO ON FEED OFF LIN 2000 PAGES 9999  LONG 1000000 LONGC 1000 TRIMS ON;
    EXEC DBMS_METADATA.SET_TRANSFORM_PARAM( DBMS_METADATA.SESSION_TRANSFORM,'SQLTERMINATOR',TRUE);
    DROP USER u CASCADE;
    GRANT DBA TO u IDENTIFIED BY u;
    CREATE TABLE u.t1
       c1   NUMBER,
       c2   NUMBER,
       c3   NUMBER,
       c4   NUMBER,
       PRIMARY KEY (c1)
    CREATE TABLE u.t2
       c1   NUMBER,
       c2   NUMBER,
       c3   NUMBER,
       c4   NUMBER
    CREATE TABLE u.t3
       c1   NUMBER NOT NULL,
       c2   NUMBER,
       c3   NUMBER
    CREATE TABLE u.t4 (c1 NUMBER    REFERENCES u.t1);
    CREATE TABLE u.t5 (c1 NUMBER UNIQUE);
    CREATE TABLE u.t6 (c1 NUMBER CHECK (c1 > 0));
    CREATE TABLE u.t7 (c1 NUMBER NOT NULL);=================query========================
    SELECT CASE
              WHEN (SELECT COUNT (*)
                      FROM dba_tab_columns tc
                     WHERE tc.owner = o.owner AND tc.table_name = o.object_name) >
                      0
              THEN
                 SUBSTR (
                    DBMS_METADATA.get_ddl (object_type, object_name, owner),
                    1,
                    INSTR (
                       DBMS_METADATA.get_ddl (object_type, object_name, owner),
                       CHR (10),
                       1,
                       2
                       + (SELECT COUNT (*)
                            FROM dba_tab_columns tc
                           WHERE tc.owner = o.owner
                                 AND tc.table_name = o.object_name)))
                 || CASE
                       WHEN (SELECT COUNT (*)
                               FROM sys.obj$ so,
                                    sys.cdef$ scd,
                                    sys.con$ sc,
                                    sys.user$ su
                              WHERE     su.user# = so.owner#
                                    AND so.obj# = scd.obj#
                                    AND scd.con# = sc.con#
                                    AND so.obj# = scd.obj#
                                    AND scd.type# != 7
                                    AND so.name = o.object_name
                                    AND su.name = o.owner) = 0
                       THEN
                          ',column5 number(3,0) default 0'
                       ELSE
                          'column5 number(3,0) default 0,'
                    END
                 || SUBSTR (
                       DBMS_METADATA.get_ddl (object_type, object_name, owner),
                       INSTR (
                          DBMS_METADATA.get_ddl (object_type, object_name, owner),
                          CHR (10),
                          1,
                          2
                          + (SELECT COUNT (*)
                               FROM dba_tab_columns tc
                              WHERE tc.owner = o.owner
                                    AND tc.table_name = o.object_name)))
              ELSE
                 DBMS_METADATA.get_ddl (object_type, object_name, owner)
           END
              t
      FROM dba_objects o
    WHERE owner = 'U';=================output========================
      CREATE TABLE "U"."T1"
       (    "C1" NUMBER,
            "C2" NUMBER,
            "C3" NUMBER,
            "C4" NUMBER,
    column5 number(3,0) default 0,
             PRIMARY KEY ("C1")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
      TABLESPACE "USERS"  ENABLE
       ) SEGMENT CREATION DEFERRED
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      TABLESPACE "USERS" ;
      CREATE UNIQUE INDEX "U"."SYS_C0025504" ON "U"."T1" ("C1")
      PCTFREE 10 INITRANS 2 MAXTRANS 255
      TABLESPACE "USERS" ;
      CREATE TABLE "U"."T3"
       (    "C1" NUMBER NOT NULL ENABLE,
            "C2" NUMBER,
            "C3" NUMBER
    ,column5 number(3,0) default 0
       ) SEGMENT CREATION DEFERRED
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      TABLESPACE "USERS" ;
      CREATE TABLE "U"."T4"
       (    "C1" NUMBER,
    column5 number(3,0) default 0,
             FOREIGN KEY ("C1")
              REFERENCES "U"."T1" ("C1") ENABLE
       ) SEGMENT CREATION DEFERRED
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      TABLESPACE "USERS" ;
      CREATE TABLE "U"."T2"
       (    "C1" NUMBER,
            "C2" NUMBER,
            "C3" NUMBER,
            "C4" NUMBER
    ,column5 number(3,0) default 0
       ) SEGMENT CREATION DEFERRED
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      TABLESPACE "USERS" ;
      CREATE TABLE "U"."T5"
       (    "C1" NUMBER,
    column5 number(3,0) default 0,
             UNIQUE ("C1")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
      TABLESPACE "USERS"  ENABLE
       ) SEGMENT CREATION DEFERRED
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      TABLESPACE "USERS" ;
      CREATE UNIQUE INDEX "U"."SYS_C0025507" ON "U"."T5" ("C1")
      PCTFREE 10 INITRANS 2 MAXTRANS 255
      TABLESPACE "USERS" ;
      CREATE TABLE "U"."T6"
       (    "C1" NUMBER,
    column5 number(3,0) default 0,
             CHECK (c1 > 0) ENABLE
       ) SEGMENT CREATION DEFERRED
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      TABLESPACE "USERS" ;
      CREATE TABLE "U"."T7"
       (    "C1" NUMBER NOT NULL ENABLE
    ,column5 number(3,0) default 0
       ) SEGMENT CREATION DEFERRED
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      TABLESPACE "USERS" ;

  • Need help Adding Elements By Expressions for AS/400

    I just got BI Publisher installed and am having trouble finding the correct manuals to use for creating SQL's and Expressions. I am using an AS/400 and JD Edwards. I can create a Data Set and formula fields and can show all of it in a report. What I can not figure out is how to do an If Then Else statement for a coulmn. I have gone into Add Element by Expression and can not get it to accept anything. I need an expression that says 'IF ZPTAX = 'A' then Gross01 else 0.
    ZPTAX is Tax Type and I only want to show the Gross if it is Tax Type A.
    The file is F06136.
    What would be the correct formula here and what manuals are available to help figure these out.
    Thanks for any help you can provide.
    Rick

    I am using Data model editor. I am trying to build a report. I can bring fields into the report and put them in columns with no problems. Where I am having difficulties is I need to be able to put conditions on each column. I have 5 different Pay Codes with gross amounts. The way the report works now is to put the gross for all pay codes in one column. I need to have 5 columns. One for each pay code.
    I am trying to reproduce reports from Crystal. In Crystal I can create a formula field that says: If Pay Code = '40' then Gross Pay Else 0. Then another formula field: If PayCode = '100' Then Gross Pay Else 0. I can do this for each Pay Code and then use these for my columns.
    Thanks,
    Rick

  • Need help with pass/fail expression​.

    I've got an array of strings parameter called Parameters.CAN_Switch_Channel_Name[0] (equal to a string) which gets passed into a subsequence.  During run time when this subsequence gets called, a new parameter gets created which gets named the string which is passed in through Parameters.CAN_Switch_Channel_Name[0].  So for instance if Parameters.CAN_Switch_Channel_Name[0] is equal to CC_VS_Spd.CC_Set_Switch, then a parameter will get created at run time called: Parameters.CC_VS_Spd.CC_Set_Switch.  I want to create a pass/fail expression to check the new parameter.  I am not sure how to build the expression.  I tried:
    Parameters."Parameters.CAN_Switch_Channel_Name[0]"​  This didn't work!
    Parameters.(Parameters.CAN_Switch_Channel_Name[0])​  This didn't work either!
    I need a way of pulling out the value in Parameters.CAN_Switch_Channel_Name[0] and appending it to Parameters. to reference the parameter created at run time.
    Any ideas?

    Hi,
    I read this a few times now, and just when I think I got ......
    In your SubSequence you have a parameter which is called CAN_Switch_Channel_Name[] which is an array of strings.
    Now do you wish to change the Name of this string array from CAN_Switch_Channel_Name to CC_VS_Spd.CC_Set_Switch or is it that the contains of the array is set to eg
    CAN_Switch_Channel_Name[0] = "CAN_Switch_Channel_Name to CC_VS_Spd.CC_Set_Switch"
    and is this done in the Sequence or before the sequence ist called.
    Maybe a small example of what you are trying to achive, even if its not working may help.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • I need help on final cut express hd

    hello
    I recently upgraded from imovie to final cut express, and i have no clue how to cut out scenes that i dont want!! i'm making a mountain biking movie and theres lots of scences that turned out bad that i want to cut out please help me learn how to cut scenes!!

    Welcome to the family, glad you came.
    There is a specific forum for FCE, back up one or two forums or try Home and you will find it in the FC area. FCE is a very powerful editing platform and it doesn't work anything like iMovie did.
    Do yourself a big favor and take the time to run the tutorials. You will learn how to trim your clips and place them in the timeline with transisions. Each of your clips can be trimmed by dragging the in and out points around. It's a blast.
    You will need lots of patience as you move from iMovie into the sophistication and creative flexibility of FCE. All of that creativity requires careful attention and you must learn how to talk to the application. It's not particularly difficult, it's just that there are so many different ways to do even the most basic things.
    bogiesan

  • Need help setting up airport express as bridge (Any help is appreciated)

    Hello so before my wifi was switched I was able to use my 802.11g airport express as a wifi card for the xbox 360. I then decided to upgrade my main base station from an 802.11g base station to and airport extreme 802.11n. My problem is that my airport express cant extend the airport extreme network to my xbox anymore because they are different 802.11 versions. So can anyone help me configure this so I can get this back? Any help is appreciated.
    My Current Setup:
    Internet => Airport Extreme 802.11n => Wireless => Airport Express 802.11g (to extend network for xbox)=> Ethernet => Xbox 360
    Thanks!

    As I said, WDS is a nightmare for most users. Apple hides the settings from users to discourage use of WDS.
    I do not recommend that you do this, but have a feeling that you will do this anyway.
    I will not be able to help you sort out WDS problems.
    On AirPort Utility 5.6, click Manual Setup
    Click the Wireless tab below the icons
    Hold down the option key on your Mac while you click on the Wireless Mode selection box and the WDS settings will appear
    Apple's instructions for WDS are here:
    http://support.apple.com/kb/HT4262
    Hope this helps. Good luck.

  • I need help setting up airport express to play my Itunes music to my stereo

    Hello I am hoping someone can help me as I am at a total loss here. I have had an airport express for a few years and would stream my music to my stereo without any problems. A few months ago it would cut out every now and again but soon it got so bad it was unlistenable. I reset it many times  but to no avail.
    Now when I try to reset it by opening the airport utility it scans but does not find the airport express.
    I bought a pluglink ethernet adapter and connected it to the Airport Express  hoping I can run it through that but when I open up the airport utility it scans but still will not recognize the airport express.
    Is there some way to set this up .
    I have an IMac which has the latest operating system.
    Sincerely grateful for any help in this matter  Paul K.

    Hello blakemj. Welcome to the Apple Discussions!
    For your described network configuration, you will want to reconfigure your 802.11n AirPort Express Base Station (AXn) as a "wireless client" to the Buffalo wireless router.
    Here's how ...
    Either connect to the AX's wireless network or connect directly, using an Ethernet cable, to the Ethernet port of the AX, and then using the AirPort Utility in "Manual Setup" mode, make the following changes:
    (Note: As a third option, you can temporarily connect the AXn directly to an available LAN port on your Buffalo wireless router during setup, and then, place it at the desired location when complete.)
    AirPort > Base Station
    o Base Station Name: <rename or leave default>
    o Base Station Password: <enter desired password>
    o Verify Password: <re-enter desired password>
    o Remember this password in my keychain: (optional)
    o Set time automatically: (unchecked)
    AirPort > Wireless
    o Wireless Mode: Join a wireless network
    o Network Name: <existing Buffalo's wireless network>
    o Wireless Security: <select the encryption type of the existing wireless network>
    o Wireless Password: <enter the existing wireless network password>
    o Verify Password: <re-enter the existing wireless network password>
    Music
    o Enable AirTunes (checked)
    o iTunes Speaker Name: <enter desired speaker name>
    o iTunes Speaker Password: (optional)
    o Verify Password: (optional)
    o Click Update to write the new settings to the AX
    In iTunes:
    iTunes > Preferences... > Advanced > General
    o Look for remote speakers connected with AirTunes (checked)

Maybe you are looking for

  • Connection pool not re-establishing connections, throwing exception instead

    Hello, I've just set up a connection pool on the sun java system application server 8 for a MySQL database using the official mysql-connector/j 5.0. Everything is working great, except when the connections timeout (or i kill them all manually from th

  • Multi-Master replication problems

    Multi Master Servers consists of 2 servers. For this, the Sync function is satisfied. But I think it's some problems. If Master 2 Server is dead, only Master 1 saves updated data. Master 2 starts service again after recovery. At that time, if clients

  • The dml not giving proper value in the returning into variable

    DELETE FROM temp_records_med WHERE slno NOT IN (SELECT COLUMN_VALUE FROM TABLE (v_slno_tab)); RETURNING COUNT(slno) INTO p_retval; There are 4 rows deleted but the the the variable has got 0 in it. Why?

  • Quicktime Pro - export as mpeg-4 works in iPod Touch but not iPhone 3G

    If I use Movie to iPhone / iPhone (cellular) the quality is pretty dismal considering I use the component cable to pipe it out to HDTV. So, I tried using movie to mpeg-4 as that allows options. However, the resulting video can be transferred over to

  • PQ Salesforce objects filter logic

    Hi everyone! Is it possible to create filter logic in power query, similar to filter logic in salesforce reporting, when using the salesforce object connector? My organization has over 60k accounts and I would only like to pull a subset of those proj