Regular expression TO validate the name of column

Hi all

I want to write a regular expression to validate the name of column names.i.e enterted must follow the convention of valid column name
contain only A - Z, a-z, 0-9, _, $, and #.

Please someone help me to do this.
Padma

Hey padma.

Regular expression TO validate the name of column

to set jaspx for example in the Validation number:

**

If your use na na... chain mention you model as etc. from A to z...

otherwise if the two method nt answer using java Scrpit na... it's better ground for you.

If however hepatitis is any querys na msg me... If possible I try best,.

Thnks,
Suresh V

Published by: V Suresh on April 2, 2012 16:55

Tags: Database

Similar Questions

  • How can I use a regular expression to validate the email address

    How can I use a regular expression to validate the e-mail address.

    var emailExp:RegExp = /([a-z0-9._-]+?) @([a-z0-9.-] +). ([a - z] {2,4});

  • Model maching class of regular Expression to validate the alphanumeric string

    Hello
    MY version of DB is Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production 64-bit

    I wanted to use the model maching given by oracle classes to check whether a given input string is alphanumeric.

    Documentation Oracle 10 g said about classes like [: digit:], [: alnum:] and many others.

    http://www.DBA-Oracle.com/t_regular_expressions.htm

    However these classes seems not work with my version of DB.

    Can someone tell me the DB version in which these classes work?

    Here is the code I use to validate an input string.
    SQL> CREATE OR REPLACE FUNCTION fn_is_alphanumeric
      2  (
      3     pi_value             IN       VARCHAR2
      4  )
      5  RETURN VARCHAR2
      6  IS
      7     lv_length   NUMBER;
      8  BEGIN
      9     lv_length := length(pi_value);
     10     IF ( REGEXP_LIKE(pi_value,'[:alnum:]{'||lv_length||'}')) THEN
     11        RETURN 'TRUE';
     12     ELSE
     13        RETURN 'FALSE';
     14     END IF;
     15  END fn_is_alphanumeric;
     16  /
    
    Function created.
    
    SQL> 
    SQL> 
    SQL> SELECT fn_is_alphanumeric('abc123') alpha FROM DUAL;
    
    ALPHA
    --------------------------------------------------------------------------------
    FALSE
    
    SQL> 
    SQL> 
    SQL> CREATE OR REPLACE FUNCTION fn_is_alphanumeric
      2  (
      3     pi_value             IN       VARCHAR2
      4  )
      5  RETURN VARCHAR2
      6  IS
      7     lv_length   NUMBER;
      8  BEGIN
      9     lv_length := length(pi_value);
     10     IF ( REGEXP_LIKE(pi_value,'[A-z0-9]{'||lv_length||'}')) THEN
     11        RETURN 'TRUE';
     12     ELSE
     13        RETURN 'FALSE';
     14     END IF;
     15  END fn_is_alphanumeric;
     16  /
    
    Function created.
    
    SQL> SELECT fn_is_alphanumeric('abc123') alpha FROM DUAL;
    
    ALPHA
    --------------------------------------------------------------------------------
    TRUE

    Arun Kr Gupta says:
    Hi knani
    I need to check whether the input string is alphanumeric.

    That's why "ABC" all entries as '1234', '123ABc', must return true.

    Also can the alphanumeric string contains characters that are available on the keyboard which can be seized of it.

    Concerning
    Arun

    Published by: Arun Gupta of Kr on October 18, 2010 11:46

    I just read your requirement "all printable characters.

    Try:

    select regexp_like('string','^[[:print:]]$') from dual
    

    to get only the records that have only printable characters.

  • How to dynamically change the names of columns LOV

    Hello

    I use JDeveloper 11.1.1.4

    I have only one requirement, while I need to change the names of columns in the list of values dynamically.

    How can I achieve it.

    Please help me.

    Kind regards

    John.

    Hello

    > But I want to change the column names 'ID' and 'Name' dynamically.

    Based on what? Condition? If Yes, have you tried to set the text for the label as an expression? If not based on the condition, you can also expose the VO to Java Impl and need a way to get the attribute and change its label.

    Arun-

  • Y at - it an option to print the names of columns?

    Hi developers out there!

    Problem:
    When I try to print the data in the table, the names of columns like "COL01', 'COL02' and so on.
    But initially, they have other names.
    Am I missing something?

    Best regards
    Ruslan.

    If you go to your report and click on the 'Report Attributes' tab. You will see all the names of your column headers. and a group of radio buttons at the top of the page. Select custom, and then change the names of your column headers.

    In addition, it seems that on your 'Definition of the region' tab in the Source box, you checked the option button "use generic column names (analysis of query runtime only). Try to select the other radio button "use query column names-specific query and validate.

    Good luck.

  • regular expression to remove the zeros on the right

    I need a regular expression to remove the zeros after the decimal point. I tried (?.)<=\.\d+?)0+(?=\D|$) but="" i="" get="" a="" error="" about="" look="" behind="" not="" a="" fixed="" length="" or="" something="" like="" that.="" i="" am="" not="" a="" regex="" expert="" and="" i="" was="" wondering="" just="" how="" to="" do="" this="" with="" regular="" expression="" or="" some="" other="">

    Z.K. wrote:

    [...] or some other way.

    I tried and I tried but I couldn't crack with a regular expression, so I took the easy way.  The first match found pattern the comma and the other removes the zeros to the right of the rest.  It is not discriminate between numbers and all the rest, though.

  • How to extract the names of columns in dynamic SQL

    Hi all

    Is it possible to extract all the names of columns in a dynamic query?

    In my case according to the user selections that my query will get changed (number of the column, column name and tables that everything can vary).

    So now, is it possible to retrieve all the column names of the dynamic query generated?

    I am using Oracle 11g (11.2.0.4)

    Thank you

    Shaz

    Re: Dynamic Extraction on dynamic Sql

  • Using regular expressions to store the first 3 letters of a string

    Can anyone help with regular expressions?

    The problem:

    I have a contact field which is holder of a value of campaign here is an example of how we look at:

    EMC | TEACHER | HRSUB | June2012-may-01

    I need to store the first three letters of the code in another field of contact, the first three letters are not a defined value and may change in different codes.


    I have next to no experience with regular expressions, so I am struggling to set up cloud connector Eloqua - here's a screenshot:

    A few tips on how to set up?

    This should do the trick, although I would recommend that make you a few tests more using http://regexpal.com/

    ^|\| (.*)$

    Chris

  • How to write information to complete file including the names of columns in the ftp adapter using the Ombudsman?

    Hi all

    I have a requirement like the reading of the data from the DB table and put it in a location of ftp server using mediator.also file in the ftp location must be in .csv format.

    I am able to get the data from the file in .csv format.

    But here, my requirement is I want the data from the file with the names of columns (i.e. header information).

    Can someone help me in this problem.

    Thanks in advance,

    Divya.

    Hello

    I am able to get the information to complete file with column names.

    I added a code in the ftpadapter xsd file.

    nxsd:version = "NXSD".

    nxsd:stream = "chars".

    nxsd: encoding = "US-ASCII".

    nxsd:hasHeader = 'true '.

    nxsd:headerLines = "1".

    nxsd:headerLinesTerminatedBy = "${eol}.

    nxsd:outboundHeader = "empno, ename, sal, location, status ${eol} '"

    By adding the code above, I'm able to get the full file header information.

    Thank you

  • ORE: the names of columns not valid cost.matrix

    I'm trying to use the method odmDT with application costs customized as follows:

    > dt.mod = ore.odmDT (default ~.,credit_train,max.depth=20,cost.matrix=matrix(c(0,1,4,0),nrow=2)

    but I get the error:

    Error in ore.odmDT (default ~., credit_train, max.depth = 20, cost.matrix = error_cost):

    ORE: the names of columns not valid cost.matrix

    I can't find any documentation anywhere on how exactly this cost matrix must be specified.

    Any help would be appreciated

    The value for cost.matrix currently requires a data structure object. The following examples using the NARROW data successfully pass a frame of data for the value of cost.matrix:

    R > NARROW.costs.gender<- data.frame(actual_target_value="">

    PREDICTED_TARGET_VALUE = c("M","M","F","F"),

    COST = c (0.25, 0.75, 0.0, 0.0))

    R > NARROW.costs.class<- data.frame(actual_target_value="">

    PREDICTED_TARGET_VALUE = c (0,0,1,1),

    COST = c (0.25, 0.75, 0.0, 0.0))

    R > dt.mod1<- ore.odmdt(gender="" ~="" .,="" narrow,="" cost.matrix="">

    Summary (DT. MOD1)

    R > dt.mod2<- ore.odmdt(class="" ~="" .,="" narrow,="" cost.matrix="">

    Summary (DT. MOD2)

    I filed a bug so this behavior can be evaluated for a future release of Oracle Enterprise R.

  • How to reference the names of columns, if you use select *.

    Hello

    How to reference the names of columns to get out of the data, when you use select * and not aware of the column names (and number of columns) in advance.

    Even if I could get the column names in the other variables. I am new to CF so question may be stupid.

    getting column names: -.

    < cfquery datasource = "RTW_ORA" name = "cn" >
    SELECT COLUMN_NAME
    OF ALL_COL_COMMENTS
    WHERE TABLE_NAME = ' #meas #
    < / cfquery >

    obtain data: -.

    < cfquery datasource = "RTW_ORA" name = "cd" >
    SELECT *.
    To #meas #.
    < / cfquery >

    How do all the output data?

    Any help would be much appreciated!

    Thank you

    Tushar Saxena

    How to reference the names of columns to get out of the data, when you use select * and not aware of the column names (and number of columns) in advance.

    Even if I could get the column names in the other variables. I am new to CF so question may be stupid. getting column names: -.


    SELECT COLUMN_NAME
    OF ALL_COL_COMMENTS
    WHERE TABLE_NAME = ' #meas #

    obtain data: -.


    SELECT *.
    To #meas #.

    How do all the output data?

    Your question is not stupid. You can use the concept of a query requestand their properties cfquery attributes name and result.


    SELECT *.
    To #meas #.






    column names: #column_names #.

    number of columns: #no_of_columns #.



    SELECT #column_names #.
    FROM the cd



    A SQL query: #resQoQ.sql #.

    Query:


       
       
    #column #: #cd [column] [currentrow] #.
       


    T/t:


       
    #column #: #QoQ [column] [currentrow] #.
       


  • return the names of columns which line values are not null.

    Hi I m a new db admin guy, and I need a sql script that should return the names of columns of the given table. and the returned column must be the value (fyi - if the column contains the value null column name would not come to the o/p of sql).
    Exmple:
    name of the table - A
    fresh status s.no name brand
    1 null aa 45P
    paid 2 null bb 30
    3 cc paid 35P

    (FYI - 1) if I give the table name (A) and s. n. (2) o/p should be - name, mark.
    (2) if I give the status of tablename (A) and s. n (1) the o/p should be - name, brand.

    Thank you
    Krishna.

    Published by: user13294228 on June 14, 2010 22:54

    BTW,
    The previous solution is for all values of the column, if you want a specific line, you can add it in where clause.
    I mean in your example, it you look like:

    SET serveroutput on;
    
    DECLARE
       l_cnt          NUMBER;
       l_str          VARCHAR2 (255) := '';
       l_table_name   VARCHAR2 (255) := 'YOUR_TABLE_NAME';
       l_col_cond     VARCHAR2 (255) := 'S_NO';
       l_val          NUMBER         := 1;
    
       CURSOR c_col
       IS
          SELECT column_name
            FROM user_tab_columns
           WHERE table_name = l_table_name;
    BEGIN
       FOR i IN c_col
       LOOP
          EXECUTE IMMEDIATE    'SELECT COUNT ('
                            || i.column_name
                            || ') FROM '
                            || l_table_name
                            || ' WHERE '
                            || l_col_cond
                            || ' = '
                            || l_val
                       INTO l_cnt;
    
          l_str := l_str || CASE
                      WHEN l_cnt = 0
                         THEN ''
                      ELSE i.column_name
                   END || ',';
       END LOOP;
    
       l_str := SUBSTR (l_str, 1, LENGTH (l_str) - 1);
       DBMS_OUTPUT.put_line (l_str);
    END;
    

    Saad,

    Published by: S.Nayef on June 15, 2010 11:54

  • change the names of columns in the automatic process line fetch, edit the code

    Hello

    I created the master detailed form of two tables, and then I changed one of the names of columns in the table which is the detail.

    of course the extraction process could not recognize the name of this column (as it is no longer exist), so I need to change the column name in the query of in the current name.

    Ditto for line process transformation, to insert a new line.

    I guess it's easy, but I don't know where to find the ASR process query request,
    suggestions please!

    Kind regards.

    Published by: user8784111 on September 14, 2009 12:53 AM

    Hello:

    The detail rows are rendered in tabular form. This tabular presentation is implemented in a region of "report". You can change the query for the report region explain the column names.

    CITY

  • A list of the names of columns in addition to the OMB

    I have to add several operators to approximately 120 maps and trying to learn more about OMB in the hope that it might be able to save time (and my Visual/mental health ;-) acuity. However, each map works on different tables, each with its own unique set of columns. This list of columns must be added to a GROUP OF property of an aggregator.

    Is there a way to get a list of the names of table columns in the OMB, so I can get this GROUP BY list? So far, I couldn't find one.

    I use 10.2.0.1

    Thank you

    Hello

    Set tab_cols [OMBRETRIEVE 'EMP' GET COLUMNS]

    or such a thing on a map...
    define the atts [OMBRETRIEVE '$mapName' OPERATOR '$lastOperator' GROUP 'OUTGRP1' GETTING ATTRIBUTES of MAP]
    foreach att $atts {}
    the value of EO [OMBRETRIEVE MAPPING '$mapName' OPERATOR '$lastOperator' GROUP 'OUTGRP1' ATTRIBUTE '$att' GET PROPERTY (EXPRESSION)]
    ...

    Could be interesting furtively to the SQL to map the Accelerator for the OMB snippets too.
    http://blogs.Oracle.com/warehousebuilder/2007/06/sql_and_owb_accelerated_map_co_1.html
    http://blogs.Oracle.com/warehousebuilder/2007/08/sql_and_owb_accelerated_map_co.html

    There is MDL on the second post in the main activity to start tasks, there is the OMB to be part of this.

    See you soon
    David

  • Import data from txt file with the reading of the names of columns

    Hello

    After changing the export of my simulation program, I can't use the postet heresolution, that works well. (I mark the message as hailed this is why I run a post only)

    Can anybode if you please tell me how to fan the code to import the new txt file type. The names of the columns here are FOA online first columns, like this (with ignoring the first lines).

    Hello Gabriel

    You can use the use wizard (Navigator > file > use wizard) to define a new filter to import file for your data. It will take only a minute.

    Please find the uri of the file that I create for you. Copy the attached file in your disk, unzip it and double-click the file uri.

    Then you can open your file by using 'open with '.

    Hope this helps

Maybe you are looking for