Regex pattern, filter delimiter in sql code

Hi,
The problem I'm having is that the regex pattern below is not catching the beginning "go" and ending "go" of a string.
"(?iu)[(?<=\\s)]\\bgo\\b(?=\\s)"
The idea is catching the "whole word", in this case the word is "go" so if the word is at the beginning of the string or at the end, i still want to include it.
So, for example:
"go select * from table1 go" -> should catch 2 "go"s but catches 0
"go go# select * from table1 --go go" -> should also catch 2 "go"s but catches 0
"go go select * from table1 go go" -> should catch 4 "go"s but catches 2
I have the "[(?<=\\s)]" and the "(?=\\s)" so that the word "go" when next to a special character is not included, for example "--go".
The problem is that this also negates the beginning and ending of the string.
Code to test example: It should split at 1st, 2nd and last "go", but only splits at the 2nd "go".
String s = "go go select * from table1 --go go";
String delimiter = "go";
String[] queries = s.split("(?iu)[(?<=\\s)]\\b" + delimiter + "\\b(?=\\s)");
for (int i = 0; i < queries.length; i++) {
     System.out.println(queries[i]);
I really need to fix this but I'm not having much success.
Any help will be appreciated, thanks in advance.

Yes,
I prefer this one: Regex Powertoy (interactive regular expressions)
It's not 100% perfect, but you can see with my example and this online tester that the 1st "go" is not matched. And this is a problem for me.
I want to eliminate the special characters like "#go" or "-go" but i don't want to eliminate the end and start of string.

Similar Messages

  • Change filter sql code to a business name

    All,
    one of my filters is an advanced sql code "Term"."Term Code" = VALUEOF(NQ_SESSION.CSA_Analysis_Term)
    when i add the filter to the report (Add Filter) the user does not understand the above code,
    and I am unable to find a way to add a name to make it more meaningful to the users.
    have anyone experimented with this
    thanks

    Hi Kishore,
    I changed it in the prompt now and I set the Server Variable to NQ_SESSION.CSA_Analysis_Term
    however I am experiencing another issue. If the value from the prompt is the default value from the server then I see this filter in my filter header
    "Term Code Desc is equal to NQ_SESSION.CSA_Analysis_Term"
    if I select a another value from the dropdown box then I see this
    Term Code Desc is equal to (2010 Fall) which is exactly what I am looking for.
    the filter in the report is setup as "Term Code Desc is prompted"
    Thanks

  • Can I have a PL/SQL code for LOV

    Hi,
    I apologize for this dumb question. I have been so out of touch with dev (almost 8 years). Plus new to pl/sql.
    I am creating a status report application. On the dashboard, I currently have some metrics (horizontal charts). I wanted to expose these metrics based on filter.
    I had created 2 filters. The first one will identify the type (Week, Month, Qtr or Year) and the 2nd filter would be based on the type. For e.g. if I select Month as type, the 2nd filter should show May-12, April-12 etc. Once I select the 2nd filter, I should use them to show the appropriate metrics. The metric that I currently have would show all the projects that users have worked on during the week/month/qtr or year (depending on the 1st and 2nd filter).
    On the dashboard region, I added a condition to check if the value for both 1st and 2nd filter is not null. This allows me to show the dashboard only if the 2 filters have been selected.
    For the 2nd filter, I need to write a PL/SQL code to show the LOV.
    I am assuming that the pl/sql would return a SQL query. The SQL query will be based on week, month etc. Is that right?
    Thanks
    balaji
    Edited by: user644868 on May 17, 2012 11:29 AM

    rbalaji2026 wrote:
    For the 2nd filter, I need to write a PL/SQL code to show the LOV. Doesn't appear necessary. With filter 2 cascading from filter 1, why not:
    select
            /* Week query */
    from
    where
    and     :p1_filter_1 = 'WEEK'       
    union all
    select
            /* Month query */
    from
    where
    and     :p1_filter_1 = 'MONTH'       
    union all
    select
            /* Quarter query */
    from
    where
    and     :p1_filter_1 = 'QUARTER'       
    union all
    select
            /* Year query */
    from
    where
    and     :p1_filter_1 = 'YEAR'       

  • Key Pattern Filter

    Hi,
    I use naming conventions for the keys, and would like to query based on a pattern in the key. e.g. all keys that start with "x"
    I'm using Strings for my keys. How do I write a filter to do this?
    I tried creating this Filter:
    import java.util.regex.*;
    public class KeyRegexFilter implements EntryFilter {
         protected Pattern pattern;
         public KeyRegexFilter(String regex) {
              pattern = Pattern.compile(regex);
         public boolean evaluateEntry(Map.Entry entry) {
              return evaluate(entry.getKey().toString());
         public boolean evaluate(Object obj) {
              if (obj instanceof ConverterCollections.ConverterMapEvent) {
                   ConverterCollections.ConverterMapEvent mapEvent = (ConverterCollections.ConverterMapEvent)obj;
                   return evaluate(mapEvent.getKey().toString());
              return false;
         protected boolean evaluate(String input) {
              Matcher matcher = pattern.matcher(input);
              return matcher.find();
    The problem I ran into is that mapEvent.getKey() is a com.tangosol.util.Binary object.
    Regards,
    Harry

    Hi Harry,
    you could check the JavaDoc of the LikeFilter and the KeyExtractor classes.
    E.g. your functionality of filtering for the cache key starting with x can be done with the following combination of those classes:
    import com.tangosol.util.extractor.IdentityExtractor;
    import com.tangosol.util.extractor.KeyExtractor;
    import com.tangosol.util.filter.LikeFilter;
    char chEscape='\\';
    boolean bCaseSensitive=false;
    ValueExtractor extractor = new KeyExtractor(IdentityExtractor.INSTANCE);
    Filter filter = new LikeFilter(extractor, "x%", chEscape, bCaseSensitive);You can use the filter to query according to your requirements.
    The extractor object can be used to create an index on your cache so that the querying proceeds even faster. You should create an ordered index for maximum performance for this query.
    Best regards,
    Robert

  • Java Regex Pattern

    Hello,
    I have parsed a text file and want to use a java regex pattern to get the status like "warning" and "ok" ("ok" should follow the "warning" then need to parser it ), does anyone have idea? How to find ok that follows the warning status? thanks in advance!
    text example
    121; test test; test0; ok; test test
    121; test test; test0; ok; test test
    123; test test; test1; warning; test test
    124; test test; test1; ok; test test
    125; test test; test2; warning; test test
    126; test test; test3; warning; test test
    127; test test; test4; warning; test test
    128; test test; test2; ok; test test
    129; test test; test3; ok; test testjava code:
    String flag= "warning";
              while ((line= bs.readLine()) != null) {
                   String[] tokens = line.split(";");
                   for(int i=1; i<tokens.length; i++){
                        Pattern pattern = Pattern.compile(flag);
                        Matcher matcher = pattern.matcher(tokens);
                        if(matcher.matches()){
    // save into a list

    sorry, I try to expain it in more details. I want to parse this text file and save the status like "warning" and "ok" into a list. The question is I only need the "ok" that follow the "warning", that means if "test1 warning" then looking for "test1 ok".
    121; content; test0; ok; 12444      <-- that i don't want to have
    123; content; test1; warning; 126767
    124; content; test1; ok; 1265        <-- that i need to have
    121; content; test9; ok; 12444      <-- that i don't want to have
    125; content; test2; warning; 2376
    126; content; test3; warning; 78787
    128; content; test2; ok; 877666    <-- that i need to have
    129; content; test3; ok; 877666    <-- that i need to have
    // here maybe a regex pattern could be deal with my problem
    // if "warning|ok" then list all element with the status "warning and ok"
    String flag= "warning";
              while ((line= bs.readLine()) != null) {
                   String[] tokens = line.split(";");
                   for(int i=1; i<tokens.length; i++){
                        Pattern pattern = Pattern.compile(flag);
                        Matcher matcher = pattern.matcher(tokens);
                        if(matcher.matches()){
    // save into a list

  • Regex - Pattern for positive numbers

    Hi,
    I wanna check for positive numbers.
    My code so far:
    Pattern p = Pattern.compile("\\d+");
    Matcher m = p.matcher(str);
    boolean b = m.matches(); But I don't know how to check for positive numbers (including 0).
    Thanks
    Jonny

    Just to make your life easier:
    package samples;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    * @author notivago
    public class Positive {
        public static void main(String[] args) {
            String input = "- 12 +10 10 -12 15 -12,000 10,000 5,000.42";
            Pattern p = Pattern.compile( "\\b(?<!-\\s?|\\.|,)([0-9]+(?:,?[0-9]{3})*(?:\\.[0-9]*)?)" );
            Matcher matcher = p.matcher( input );
            while( matcher.find() ) {
                System.out.println( "Match: " + matcher.group(1) );
    }

  • Determine Reports "Record Filter" as a SQL equlvilant

    Afternoon All,
    I am using the latest release, and am trying to work out how I can retrieve the final SQL query the report is using.
    My report is based on data held in a Table ("TABLE_ABC"), not a Command Table.
    I have a "Record Filter" of
    {TABLE_ABC.First_Name} = {?pFirstName}
    The report is ordered on
    {TABLE_ABC.Last_Name}
    If I run my report with a pFirstName parameter of "Bob" I am able to find the following information in my Log4j logs:
    [2010-01-06 17:05:41,717] INFO 73543[main] - com.crystaldecisions.reports.queryengine.QueryInfo.vE(SourceFile:230) - QueryInfo openRowset:
    [2010-01-06 17:05:41,717] INFO 73543[main] - com.crystaldecisions.reports.queryengine.Rowset.bL(SourceFile:444) - Rowset restart: moveToStart true
    [2010-01-06 17:05:41,717] INFO 73543[main] - com.crystaldecisions.reports.queryengine.Rowset.z3(SourceFile:921) - Rowset execute
    [2010-01-06 17:05:41,717] INFO 73543[main] - com.crystaldecisions.reports.queryengine.Connection.a(SourceFile:2929) - Executing query using a Query Definition.
    [2010-01-06 17:05:41,733] INFO 73559[main] - com.crystaldecisions.reports.queryengine.querybuilder.QueryBuilder.GenerateQuery(?:?) - Query:
    SELECT "TABLE_ABC"."First_Name", "TABLE_ABC"."Last_Name", "TABLE_ABC"."Old_Age", "TABLE_ABC"."New_Age", "TABLE_ABC"."Old_***", "TABLE_ABC"."New_***"
    FROM   "SCHEMA_XYZ"."TABLE_ABC" "TABLE_ABC"
    WHERE  ("TABLE_ABC"."First_Name"='Bob')
    ORDER BY "TABLE_ABC"."Last_Name"
    Is there any possible way I can determine this exact information programmatically?
    The whole reason for me wanting this information is I want to find a way to further filter the data of a report, so that I can dynamically manipulate the
    "Record Filter" for the report and thus I can split a Single Report PDF into multiple PDF report outputs, based on the users single Parameter of "Bob".
    .... continued below

    ... continued
    If for example I wanted to group the previous report by the value of "Old_Age" into individual PDFs.
    I am able to retrieve the "Record Filter" using the below code
    IFilter myFilter = reportClientDocument.getDataDefController().getDataDefinition().getRecordFilter();
    String currentFilter = myFilter.getText();
    This is all well and good but this filter is in Crystal Syntax and if anything more complex than a simple "equals" condition, will be almost
    impossible to "convert" into SQL syntax, which I am wanting to use to determine all the possible values of TABLE_ABC.Old_Age that can be found
    which still match the data criteria using the reports "Record Filter"
    Once I have build an array of these possible Old_Age values I will use them in the following loop     
    String freeEditingFilter = "{TABLE_ABC.Old_Age} = ToNumber(\"" + arr_Grouping[j] + "\")";
    freeEditingFilter = "(" + currentFilter + ") AND (" + freeEditingFilter + ")";
    myFilter.setFreeEditingText(freeEditingFilter);
    reportClientDocument.getDataDefController().getRecordFilterController().modify(myFilter);
    reportClientDocument.getDatabaseController().checkDatabase(true);
    exportPDF(reportClientDocument);
    This is the only possible way I can think of when trying to further split a existing report up into individual PDF outputs.
    If I was able to determine the above "...QueryBuilder.GenerateQuery" entry that is output in my logs, or the SQL syntax equivilant of
    whatever the reports "Record Filter" I would be happy as anything.
    Currently my work around is to have a suppressed text field on every report containing a SQL syntax equivalent of the whole
    query used to build the report data. So in my above example I would have a text box containing the text:
    SELECT DISTINCT ?GrpParam FROM TABLE_ABC WHERE First_Name = ?pFirstName
    I would then retrieve this text programmatically, replace ?GrpParam with the selected "grouper/splitter" (Old_Age) and also replace
    ?FirstName with the users parameter entry (Bob)
    With the results from this query I would place all the results in arr_Grouping[] and then use that to loop through
    my code and produce mupltiple reports using the original clause of "First_Name = Bob" and also the new
    grouping/splitting condition of "Old_Age"
    This is what I have come up with, and if anyone else has some ideas or solutions or anything I would
    be great appreciated.
    Cheers
    Darren

  • What does where 1=1 mean in sql code

    I am going throough someones sql code and they have used where 1=1 in alot of places what is this for... it doesnt make sense to me...

    "create table emp1 as select * from emp where 1=1"
    While your statement that this will create a copy of the emp table is true, the predicate is meaningless.
    CREATE TABLE emp1 AS
    SELECT * FROM empwill do the exact same thing with less typing.
    Puppethead
    The same argument applies to your use of the predicate in development. WHERE 1 = 1 does not change the meaning of the query, no matter how many other predicates you add or remove from the query. The result of the query will be governed by the meaningful predicates in the WHERE clause.
    WHERE 1 = 1 is noise, and is ignored by the optimizer.
    SQL> EXPLAIN PLAN SET statement_id = 'john' for
      2  SELECT COUNT(*) FROM demographic
      3  WHERE patient_first_name = 'JOHN';
    Explained.
    SQL> SELECT plan_table_output
      2  FROM TABLE(dbms_xplan.display('plan_table','john','serial'));
    PLAN_TABLE_OUTPUT
    | Id  | Operation            |  Name        | Rows  | Bytes | Cost  |
    |   0 | SELECT STATEMENT     |              |     1 |    17 |  1969 |
    |   1 |  SORT AGGREGATE      |              |     1 |    17 |       |
    |*  2 |   TABLE ACCESS FULL  | DEMOGRAPHIC  |  1547 | 26299 |  1969 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
       2 - filter("DEMOGRAPHIC"."PATIENT_FIRST_NAME"='JOHN')
    Note: cpu costing is offNote that explain plan reports that it used the predicate as a filter during the full scan. Now, 1 = 1:
    SQL> EXPLAIN PLAN SET statement_id = 'johna' for
      2  SELECT COUNT(*) FROM demographic
      3  WHERE 1 = 1;
    Explained.
    SQL> SELECT plan_table_output
      2  FROM TABLE(dbms_xplan.display('plan_table','johna','serial'));
    PLAN_TABLE_OUTPUT
    | Id  | Operation             |  Name          | Rows  | Bytes | Cost  |
    |   0 | SELECT STATEMENT      |                |     1 |       |   119 |
    |   1 |  SORT AGGREGATE       |                |     1 |       |       |
    |   2 |   INDEX FAST FULL SCAN| DEMOGRAPHIC_4  |   154K|       |   119 |
    Note: cpu costing is offNote that there is no predicate used. Even combining both, I still get only one predicate evaluated:
    SQL> EXPLAIN PLAN SET statement_id = 'johnb' for
      2  SELECT COUNT(*) FROM demographic
      3  WHERE patient_first_name = 'JOHN' and
      4        1 = 1;
    Explained.
    SQL> SELECT plan_table_output
      2  FROM TABLE(dbms_xplan.display('plan_table','johnb','serial'));
    PLAN_TABLE_OUTPUT
    | Id  | Operation            |  Name        | Rows  | Bytes | Cost  |
    |   0 | SELECT STATEMENT     |              |     1 |    17 |  1969 |
    |   1 |  SORT AGGREGATE      |              |     1 |    17 |       |
    |*  2 |   TABLE ACCESS FULL  | DEMOGRAPHIC  |  1547 | 26299 |  1969 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
       2 - filter("DEMOGRAPHIC"."PATIENT_FIRST_NAME"='JOHN')
    Note: cpu costing is offJohn

  • Got the following reply from db-kernel: SQL-Code :-903

    Dear Experts,
    I am having a problem running MaxDB Data backup on Netbackup.... Please se log below and suggest.
    2011-04-11 13:30:38
    Using environment variable 'TEMP' with value 'C:\Windows\TEMP' as directory for temporary files and pipes.
    Using connection to Backint for MaxDB Interface.
    2011-04-11 13:30:39
    Checking existence and configuration of Backint for MaxDB.
        Using configuration variable 'BSI_ENV' = 'C:\Netbackup_Script\bsi_backint_daily.env' as path of the configuration file of Backint for MaxDB.
        Setting environment variable 'BSI_ENV' for the path of the configuration file of Backint for MaxDB to configuration value 'C:\Netbackup_Script\bsi_backint_daily.env'.
        Reading the Backint for MaxDB configuration file 'C:\Netbackup_Script\bsi_backint_daily.env'.
            Found keyword 'BACKINT' with value 'D:\sapdb\KGP\db\bin\backint.exe'.
            Found keyword 'INPUT' with value 'E:\sapdb\data\wrk\KGP\backint.input'.
            Found keyword 'OUTPUT' with value 'E:\sapdb\data\wrk\KGP\backint.output'.
            Found keyword 'ERROROUTPUT' with value 'E:\sapdb\data\wrk\KGP\backint.error'.
            Found keyword 'PARAMETERFILE' with value 'C:\Netbackup_Script\backint_parameter_daily.txt'.
        Finished reading of the Backint for MaxDB configuration file.
        Using 'D:\sapdb\KGP\db\bin\backint.exe' as Backint for MaxDB program.
        Using 'E:\sapdb\data\wrk\KGP\backint.input' as input file for Backint for MaxDB.
        Using 'E:\sapdb\data\wrk\KGP\backint.output' as output file for Backint for MaxDB.
        Using 'E:\sapdb\data\wrk\KGP\backint.error' as error output file for Backint for MaxDB.
        Using 'C:\Netbackup_Script\backint_parameter_daily.txt' as parameter file for Backint for MaxDB.
        Using '300' seconds as timeout for Backint for MaxDB in the case of success.
        Using '300' seconds as timeout for Backint for MaxDB in the case of failure.
        Using 'E:\sapdb\data\wrk\KGP\dbm.knl' as backup history of a database to migrate.
        Using 'E:\sapdb\data\wrk\KGP\dbm.ebf' as external backup history of a database to migrate.
        Checking availability of backups using backint's inquire function.
    Check passed successful.
    2011-04-11 13:30:39
    Checking medium.
    Check passed successfully.
    2011-04-11 13:30:39
    Preparing backup.
        The environment variable 'BSI_ENV' has already the value 'C:\Netbackup_Script\bsi_backint_daily.env'.
        Setting environment variable 'BI_CALLER' to value 'DBMSRV'.
        Setting environment variable 'BI_REQUEST' to value 'NEW'.
        Setting environment variable 'BI_BACKUP' to value 'FULL'.
        Constructed Backint for MaxDB call 'D:\sapdb\KGP\db\bin\backint.exe -u KGP -f backup -t file -p C:\Netbackup_Script\backint_parameter_daily.txt -i E:\sapdb\data\wrk\KGP\backint.input -c'.
        Created temporary file 'E:\sapdb\data\wrk\KGP\backint.output' as output for Backint for MaxDB.
        Created temporary file 'E:\sapdb\data\wrk\KGP\backint.error' as error output for Backint for MaxDB.
        Writing 'D:\sapdb\pipe2 #PIPE' to the input file.
    Prepare passed successfully.
    2011-04-11 13:30:39
    Starting database action for the backup.
        Requesting 'SAVE DATA QUICK TO 'D:\sapdb\pipe2' PIPE BLOCKSIZE 8 NO CHECKPOINT MEDIANAME 'BACKDBFULL'' from db-kernel.The database is working on the request.
    2011-04-11 13:30:39
    Waiting until database has prepared the backup.
        Asking for state of database.
        2011-04-11 13:30:39 Database is still preparing the backup.
        Waiting 1 second ... Done.
        Asking for state of database.
        2011-04-11 13:30:41 Database has finished preparation of the backup.
    The database has prepared the backup successfully.
    2011-04-11 13:30:41
    Starting Backint for MaxDB.
        Starting Backint for MaxDB process 'D:\sapdb\KGP\db\bin\backint.exe -u KGP -f backup -t file -p C:\Netbackup_Script\backint_parameter_daily.txt -i E:\sapdb\data\wrk\KGP\backint.input -c >>E:\sapdb\data\wrk\KGP\backint.output 2>>E:\sapdb\data\wrk\KGP\backint.error'.
        Process was started successfully.
    Backint for MaxDB has been started successfully.
    2011-04-11 13:30:41
    Waiting for end of the backup operation.
        2011-04-11 13:30:41 The backup tool is running.
        2011-04-11 13:30:41 The database is working on the request.
        2011-04-11 13:30:43 The database has finished work on the request.
        Receiving a reply from the database kernel.
        Got the following reply from db-kernel:
            SQL-Code              :-903
        2011-04-11 13:30:43 The backup tool is running.
        2011-04-11 13:30:44 The backup tool process has finished work with return code 2.
    The backup operation has ended.
    2011-04-11 13:30:44
    Filling reply buffer.
        Have encountered error -24920:
            The backup tool failed with 2 as sum of exit codes. The database request failed with error -903.
        Constructed the following reply:
            ERR
            -24920,ERR_BACKUPOP: backup operation was unsuccessful
            The backup tool failed with 2 as sum of exit codes. The database request failed with error -903.
    Reply buffer filled.
    2011-04-11 13:30:44
    Cleaning up.
        Copying output of Backint for MaxDB to this file.
    Begin of output of Backint for MaxDB (E:\sapdb\data\wrk\KGP\backint.output)----
            Reading parameter file C:\Netbackup_Script\backint_parameter_daily.txt.
            Using D:\sapdb\KGP\db\bin\backint.exe as Backint for Oracle.
            Using C:\Netbackup_Script\nt_initKGPdaily.utl as parameterfile of Backint for Oracle.
            Using E:\sapdb\data\wrk\KGP\backinthistory.log as history file.
            Using E:\sapdb\data\wrk\KGP\backintoracle.in as input of Backint for Oracle.
            Using E:\sapdb\data\wrk\KGP\backintoracle.out as output of Backint for Oracle.
            Using E:\sapdb\data\wrk\KGP\backintoracle.err as error output of Backint for Oracle.
            Using staging area D:\sapdb\Stage1 with a size of 2147483648 bytes.
            Reading input file E:\sapdb\data\wrk\KGP\backint.input.
            Backing up pipe D:\sapdb\pipe2.
            Found 1 entry in the input file.
            Starting the backup.
            Starting pipe2file program(s).
            Waiting for creation of temporary files.
            1 temporary file is available for backup.
            Calling Backint for Oracle at 2011-04-11 13:30:43.
            Calling 'D:\sapdb\KGP\db\bin\backint.exe -u KGP -f backup -t file -p C:\Netbackup_Script\nt_initKGPdaily.utl -i E:\sapdb\data\wrk\KGP\backintoracle.in -c' .
            Backint for Oracle ended at 2011-04-11 13:30:43 with return code 2.
            Backint for Oracle output: Reading parameter file C:\Netbackup_Script\nt_initKGPdaily.utl.
            Backint for Oracle output: Using E:\sapdb\data\wrk\KGP\backint4oracle.in as input of Backint for Oracle.
            Backint for Oracle output: Using E:\sapdb\data\wrk\KGP\backint4oracle.out as output of Backint for Oracle.
            Backint for Oracle output: Using E:\sapdb\data\wrk\KGP\backint4oracle.err as error output of Backint for Oracle.
            Backint for Oracle output: Using staging area D:\sapdb\Stage1 with a size of 2147483648 bytes.
            Backint for Oracle output: Using E:\sapdb\data\wrk\KGP\backinthistory.log as history file.
            Backint for Oracle output: Using D:\sapdb\KGP\db\bin\backint.exe as Backint for Oracle.
            Backint for Oracle output:
            Backint for Oracle output: Reading input file E:\sapdb\data\wrk\KGP\backintoracle.in.
            Backint for Oracle output: Backing up file D:\sapdb\Stage1.0.
            Backint for Oracle output: Found 1 entry in the input file.
            Backint for Oracle output:
            Backint for Oracle output: Starting the backup.
            Backint for Oracle output: Starting pipe2file program(s).
            Backint for Oracle output:
            Backint for Oracle output: Calling Backint for Oracle at 2011-04-11 13:30:43.
            Backint for Oracle output: Calling 'D:\sapdb\KGP\db\bin\backint.exe -u KGP -f backup -t file -i E:\sapdb\data\wrk\KGP\backint4oracle.in -c' .
            Backint for Oracle output: Backint for Oracle ended at 2011-04-11 13:30:43 with return code 2.
            Backint for Oracle output: Backint for Oracle output: Reading parameter file .
            Backint for Oracle output: Backint for Oracle output:
            Backint for Oracle output: Backint for Oracle output:
            Backint for Oracle output: Backint for Oracle error output: No staging area is defined in the parameter file.
            Backint for Oracle output: Backint for Oracle error output: The path of Backint for Oracle is not defined in the parameter file.
            Backint for Oracle output: Backint for Oracle error output: The name of the history file is not defined in the parameter file.
            Backint for Oracle output: Backint for Oracle error output: The name of the input file of Backint for Oracle is not defined in the parameter file.
            Backint for Oracle output: Backint for Oracle error output: The name of the output file of Backint for Oracle is not defined in the parameter file.
            Backint for Oracle output: Backint for Oracle error output: The name of the error output file of Backint for Oracle is not defined in the parameter file.
            Backint for Oracle output: Backint for Oracle error output:
            Backint for Oracle output:
            Backint for Oracle output: Finished the backup unsuccessfully.
            Backint for Oracle output:
            Backint for Oracle output: #ERROR D:\sapdb\Stage1.0
            Backint for Oracle output:
            Backint for Oracle error output: Backint for Oracle was unsuccessful.
            Backint for Oracle error output:
            Finished the backup unsuccessfully.
            #ERROR D:\sapdb\pipe2
    End of output of Backint for MaxDB (E:\sapdb\data\wrk\KGP\backint.output)----
        Removed Backint for MaxDB's temporary output file 'E:\sapdb\data\wrk\KGP\backint.output'.
        Copying error output of Backint for MaxDB to this file.
    Begin of error output of Backint for MaxDB (E:\sapdb\data\wrk\KGP\backint.error)----
            Backint for Oracle was unsuccessful.
    End of error output of Backint for MaxDB (E:\sapdb\data\wrk\KGP\backint.error)----
        Removed Backint for MaxDB's temporary error output file 'E:\sapdb\data\wrk\KGP\backint.error'.
        Removed the Backint for MaxDB input file 'E:\sapdb\data\wrk\KGP\backint.input'.
    Have finished clean up successfully.

    >     Requesting 'SAVE DATA QUICK TO 'D:\sapdb\pipe2' PIPE BLOCKSIZE 8 NO CHECKPOINT MEDIANAME 'BACKDBFULL'' from db-kernel.The database is working on the request.
    This seems to be your problem, the pipe is wrongly defined. On Windows it looks like
    \\.\pipe1
    see
    http://msdn.microsoft.com/en-us/library/aa365783.aspx
    Markus

  • PL/SQL code written in db or in application...????

    Hi ,
    Which is the best...at performance , maintability... e.t.c.???
    To write PL/SQL as validation process of data values going to be inserted in db:
    1) as db trigger (before insert or update row-level trigger)
    2) in application level - in Forms10g...
    This PL/SQL code compares some pairs of data values only.... there DML statement....
    Both db server and App server are considered to be or in the same machine or in two machines very close to each other...
    Note: i use Db10g .
    Thanks...
    Sim

    It is all about moving parts. How many there are. Where they are located.
    The less moving parts, the less the complexity, the bugs - and the better the performance (less wheels to turn to crunch data), the easier the maintenance and the better the flexibility.
    Part of this is having the moving parts close to the data. Kind of obvious - what is faster? Shipping data from the db engine to a front-end application via a app server and web server? Or shipping the data from the db (SQL) engine to a PL/SQL process running as part and parcel of db instance? IPC is significantly faster than TCP/IP.
    Having the moving parts close to the data also means that it can scale with the data. Oracle is good at scalability. It is designed at its very core to be scalable. Partitions to reduce I/O. Shared Server to reduce o/s resource footprint per client session. Shared pool to re-use SQL. DB buffer to cache data. RAC to run multiple db instances for a single physical database. Etc. Etc.
    With the application moving parts being close to the data, it inherits this scalability. You can "multi-thread" application code using table pipelines. You have access to forking application code using background processes (DBMS_JOB and DBMS_SCHEDULER). You have bulk processing in order to transfer more data per SQL engine call, between the buffer cache and your application, and thus also reduce expensive context switching.
    This list goes on and on.
    All this is summarised into the following rules.
    Rule 1. Do it in SQL.
    Rule 2. Only when SQL cannot do it, use PL/SQL. (e.g. SQL is not suited for managing and controlling process flow - PL/SQL is)
    Rule 3. Only when PL/SQL cannot do it, use <insert-language-here> (e.g. PL/SQL cannot render a Windows grid on the client - but Delphi/C#//Java can).
    Also keep in mind that in the modern client-server paradigm we deal with a web architecture. Which means the client is a web browser. And this means that PL/SQL can pass the data (HTML) required by the client (web browser) to render the User Interface.
    Have a look at APEX (Oracle's Application Express) for how this works. http://apex.oracle.com
    All you need to develop web applications is APEX (a PL/SQL product suite in the database) and a web browser. Kickass stuff... :-)

  • REPORT WITH PL/SQL  CODE

    DECLARE
    SQ VARCHAR2(100);
    BEGIN
    SQ := 'SELECT * FROM EMP WHERE EMPNO=7788';
    RETURN SQ;
    END
    THE ABOVE PL/SQL CODE WORKING FINE
    BUT I NEED CONDITION BASED ON ENAME
    SQ:='SELECT * FROM EMP WHERE ENAME=''SCOTT'';
    IT IS GIVEING ERROR
    WHAT TO DO?

    Hi,
    You're missing the final quote - you have the quotes for SCOTT but not the one to close the SQ string:
    DECLARE
    SQ VARCHAR2(100);
    BEGIN
    SQ := 'SELECT * FROM EMP WHERE EMPNO=''SCOTT''';
    RETURN SQ;
    ENDAndy

  • How to 100% Protect PL/SQL Code By Wrapped in Oracle Database 10g R2

    Hello,
    Is Possible to 100% Protect PL/SQL Code By Wrapped in Oracle 10g R2 ?
    If it is not possible by wrap in oracle 10g R2,
    Please, let me suggest, how i will be able to 100% protect PL/SQL code in Oracle Database 10g R2.
    Because, I have lot of functions, procedures & package's in my project.
    Which is running in field filed.
    So, i have needed to protect 100%.
    Also, will i convert to al functions, procedures & package's to .pll file ?
    And .pll file to .plx file?
    Is it possible to convert .plx file to .pll file ?
    Please, let know any better solutions in this case....
    Regards
    Mehedi

    Hello,
    No, wrapping is not a 100% secure method. It could prevent your code from amateurs, but not from professional hackers. Look at the article http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/wrap.htm#BEHGBJAA
    It says: "•Wrapping is not a secure method for hiding passwords or table names.
    Wrapping a PL/SQL unit prevents most users from examining the source code, but might not stop all of them."
    Edited by: apiminov on 03.12.2012 3:23
    Edited by: apiminov on 03.12.2012 3:24

  • How to reference LEVEL in a TREE's SQL code

    Is it possible to somehow reference LEVEL in a tree's sql code so that you can use a decode statement to selectively create links on specific levels only i.e. NOT on the root level?
    e.g.
    select "CHILD_ID" id,
    "PARENT_ID" pid,
    "NAME" name,
    decode( LEVEL, 1, null,'f?p=' || :APP_ID || ':43:' || :APP_SESSION || '::::P43_CHILD_ID:' || CHILD_ID) link,
    null a1,
    null a2
    from TREETABLE
    order by name
    one solution I've implemented is to create a DB function e.g.
    create or replace function get_tree_level(v_child_id number) return number
    is
    v_level number(2);
    begin
    select level
    into v_level
    from TREETABLE
    where child_id=v_child_id
    start with child_id=1
    connect by prior child_id= parent_id;
    return v_level;
    end;
    and then use
    decode( get_tree_level(child_id) 1, null,'f?p=' || :APP_ID || ':43:' || :APP_SESSION || '::::P43_CHILD_ID:' || CHILD_ID) link,
    but this is too slow as I have quite a few records in the tree and takes too long to render
    regards
    Paul P

    OK I found a workaround after reading
    How to add URL to tree
    The view my tree is build on is constructed out of 3 unions and 4 "selects" ( the first select creates the ROOT NODE where "1" is also used as a hard coded foreign key (Parent_id), in the company table.)
    I just added a new column called tree_level to the query which is hard coded wrt its level on the hierarchy.
    e.g.
    CREATE OR REPLACE FORCE VIEW COMCONSTUTREE ("CHILD_ID", "PARENT_ID", "NAME","TREE_LEVEL") AS
    select 1 as child_id,to_number(null) as parent_id ,'Company' as name,*1 as tree_level* from dual
    UNION
    select COM_ID, 1, COM_NAME,2
    from company
    UNION
    select CON_ID,CON_COMPANY_ID, substr(con_name,instr(con_name,' ')+1) ||', '||substr(con_name,1,instr(con_name,' ')-1),3
    from contact
    UNION
    select STU_ID,STU_CONTACT_ID, STU_LAST_NAME||', '||STU_FIRST_NAME ,4
    from student;
    the tree code now becomes
    select "CHILD_ID" id,
    "PARENT_ID" pid,
    "NAME" name,
    decode( tree_level,1, null,'f?p=' || :APP_ID || ':43:' || :APP_SESSION || ':TREE:::P43_CHILD_ID:' ||CHILD_ID) link,
    null a1,
    null a2
    from COMCONSTUTREE"
    order by name

  • PL/SQL Code not working without debug statements

    Hi Guys,
    I have a pl/sql code in a procedure, logic iterates through almost 40K records, conditional delete and update.
    When I execute this code, I dont see the deletes and updates happening, though procedure executes for 8 minutes and exits wihtout any error, execption.
    In same procedure when I write some debug statements like dbms_output, then everything seems to be working fine.
    I know this scenario happens in Oracle Forms, wehre we use SYNCHRONIZE.
    But this is plain pl/sql procedure.
    any thoughts on this?
    Av.

    COMMIT ?
    Aside from that, no idea what your procedure looks like, what it does, what version of Oracle you are using, how you are determining "I dont see the deletes and updates happening". etc...
    You'd need to provide a slew of information for anyone to give you any meaningful help.
    I can only assure you that DBMS_OUTPUT doesn't do magic :)

  • Multiple SQL queries in additional PL/SQL code in Report

    Hello gurus,
    I have a form in my portal populated some searching parameters and these parameters inserted into some temporary tables such as name_temp, addr_temp. And then I have a report that run based on these parameters, I have added additional PL/SQL code in the report at the time after the header was displayed. The code is as follows:
    declare
    checkname varchar2(40);
    checkaddr varchar2(100);
    begin
    select emp.name into checkname from emp
    where name = (select name from name_temp);
    select personnel.addr into checkaddr from personnel
    where addr = (select address from addr_temp);
    end;
    The problem I have is always the first SQL statement was executed, but not the second one, nor the third one. Does PL/SQL only supports one SQL statement per call? Please help. Is there a better way to handle this case?
    Thanks.
    Vince

    Hello gurus,
    I have a form in my portal populated some searching parameters and these parameters inserted into some temporary tables such as name_temp, addr_temp. And then I have a report that run based on these parameters, I have added additional PL/SQL code in the report at the time after the header was displayed. The code is as follows:
    declare
    checkname varchar2(40);
    checkaddr varchar2(100);
    begin
    select emp.name into checkname from emp
    where name = (select name from name_temp);
    select personnel.addr into checkaddr from personnel
    where addr = (select address from addr_temp);
    end;
    The problem I have is always the first SQL statement was executed, but not the second one, nor the third one. Does PL/SQL only supports one SQL statement per call? Please help. Is there a better way to handle this case?
    Thanks.
    Vince

Maybe you are looking for