Hot to use a column as a tablename value?

Hello

I have the following table jppos:

ID Rank Description value Level-ID Level-Table
11Description 1471234WFJLVL1
22Description 21654567WFJLVL2

Level-Table exist DB-tables that look like to some

ID Description SYSWFJ
1Test 18765
2Test 29123

I have to write a select statement where I get the results of jppos and WFJLVL1 as well as WFJLVL2 for example

Select jppos.id, jppos.rank, jppos.value, WFJLVX. Jppos SYSWFJ, WFJLVX where jppos.level id = WFJLVXUSER.USER

I don't know how to get the tablename off jppos.level - table in use in various posts for the select statement.

Any help is appreciated.

Thanks in advance

Carsten cordially

Perhaps - as suggested by Frank

Select jppos.id,

jppos. Rank,

jppos. Value,

WFJLVX. SYSWFJ

of jppos.

(select id, 'WFJLVL1' level_table, syswfj, description)

of wfjlvl1

Union of all the

Select 'WFJLVL2' level_table, id, description, syswfj

of wfjlvl2

) WFJLVX

where jppos.level_id = WFJLVX.ID

and jppos.level_table = WFJLVX.level_table

Concerning

Etbin

Tags: Database

Similar Questions

  • How can I set the filter criteria to use 2 columns?

    I have a spreadsheet with alpha and numeric values. Column has have alpha values that I want to be the primary sort. Column B has numbers that I want to be the secondary sort. The alpha values are S, G, l, J, L, and PV. Column B are numbers from 1 to 65. These are locations of tent for a party.

    Thanks in advance for your help.

    Hi B,

    Use the sort and filter, Panel to the right of the workspace.

    Click any cell in the table to maki it tha active table.

    Click Filter and sort, then choose sort.

    Click Add rule. Select column A

    Click Add rule. Choose column B.

    Table should now be sorted by column A, then in groups of 'A', by the numbers in column B.

    Kind regards

    Barry

  • Can I use hierarchical column-based action link?

    Hi all

    I used 11.1.1.6.2 OBIEE.

    And I want to know can I use hierarchical column-based action link? I want to show the link based on some certain conditions...

    I try to add conditions, such as the Department is equal to A, but after that I added, it shows me "Department is equal to", why?

    Can someone give me some advice?


    Kind regards
    Anne

    Hi Anne,.

    It should work. How to add the link of action?. Click the icon + on the TreeView column in the criteria tab, lists all the columns in the hierarchy. Each column has its own column properties. Click on the properties of column-> tab Interaction Department hierarchy level and define your conditional action link.

    Kind regards
    DpKa

  • request that is presentation used in column

    Hello

    I want to know how can I know if the column of presentation is used for everything in any application and if it is, that demand. I know that this can be done via the Catalog Manager, but I was never able to do successfully. Can someone guide me through the steps in detail pls.

    THX,
    Parag

    http://obiee101.blogspot.com/2010/06/OBIEE-which-report-uses-which-column.html

    concerning

    John
    http://obiee101.blogspot.com

  • Using the column in the Merge of Oracle statement and column name not valid

    Hello

    I have the database table called ecp_blobdata with the following description of the table:
    OBID VARCHAR2(24),
    ZBINDATA LONG,
    ZLEN INTEGER
    I implemented the following statement from Oracle FUSION to refresh this table:
    MERGE INTO ecp_blobdata ecbl
    
          USING rnlht1m4.zbindb@TCPROD bin
          ON (ecbl.obid = bin.obid)
          WHEN MATCHED THEN
               UPDATE SET
                      ecbl.obid = bin.obid,
                      ecbl.zbindata = bin.zbindata,
                      ecbl.zlen = bin.zlen
          WHEN NOT MATCHED THEN
               INSERT VALUES(ecbl.obid, ecbl.zbindata, ecbl.zlen);
               COMMIT;
    However, I get the following error message when I try to compile the package:
    Compilation errors for PACKAGE BODY BHALLAR.DATA_REFRESH
    
    Error: PL/SQL: ORA-38101: Invalid column in the INSERT VALUES Clause: "ECBL"."OBID"
    Line: 13
    Text: MERGE INTO ecp_blobdata ecbl
    
    Error: PL/SQL: SQL Statement ignored
    Line: 13
    Text: MERGE INTO ecp_blobdata ecbl
    The column defintely exists, but I don't know why he keeps complaining with the same error message? It's to do with the help of column which is zbindata or something else that I might not be looking at?

    Thank you.

    G ' Day

    Your syntax is incorrect.

    In the list of VALUES, you should refer to your table in the source columns, alias 'bin '.

    That is to say, precise cause number error message in the documentation:
    Cause: INSERT fact VALUES clause references columns in the destination table

    SW

  • How to use c:if condition check in the column to display the value

    I'm working on Jdeveloper11g with the table of the ADF.

    UseCase: in one of the column I use the condition such that if the value is not null then use golink otherwise display fair value (in fact, it is nothing). I mean I should be using golink if there is a value for this line. I tried with below but without success.

    Let me know the solution.

    < af:column sortProperty = "docName" sortable = "true".
    headerText = "#{res}" >
    < c:if test = "${docName.length > 0}" >
    "< af:goLink destination =" #{row.docURL} "text =" #{row.docName} ".
    targetFrame = "_blank" / >
    < / c:if >
    < af:outputText value="#{row.bindings.docName.inputValue}"/ >
    < / af:column >

    Thank you
    Katie

    Katie,

    You can do this by using switch or by using the visible property.
    The use of switcher:

    
         
          
              
          
          
              
          
         
    
    

    The visible property using:

    
         
         
    
    

    Jean Lou

  • By using a column twice in a dashboard prompt - selection multiple and wild-carding

    My client uses OBIEE 10.1.3.2; It is impossible to pass at this time. However, they want to be able to enter a list of values and a search for wildcard for additional values at the same time for a single column in a row of dashboard.

    Since they cannot be upgraded, they do not have the Wildcard feature search function fast multiple selection improved 10.1.3.3 and later versions.

    If anyone has found another method to do, perhaps using a column twice in a row of table edge or separate dash invite on the dashboard page, in order to, OR the results of a multiple selection and an edit box (with entry wildcard-matching)? I suspect that this won't work - that the result sets from a command prompt to a column replaces any other games of fast results for the same column.

    Has anyone found another way to do this, before his 10.1.3.3 release?

    Yes, it is possible.

    This is how to do it:

    In your report you need to add two filters on the same column and combine them with OR.
    First filter: is invited.

    Second filter: is as presentation_variable
    Then protect this filter! * What will make your prompt is filtered on the Prée variable and it will not be replaced by another invite.

    Now create your guest of dashboard:

    First add your column with an edit box and attach the presentation variable.
    Then edit the formula in the column, so it will not refer to the column more. (Which is not necessary, because the value will be set to the variable Prée.)

    Then add the column even with a multiple selection.

    Then, test and verify your results.

    Kind regards
    Stijn

  • Use of columns in the placeholder

    Hello, since I am a beginner to the reports. Can someone tell me what are the columns of the reserved space and how they are used in the reports? Where can I see examples of reports using the placeholder columns? Previously, I downloaded a pdf file of Oracle who told placeholder value column can be set in trigger prior report or using formulas. So, are they somehow like global variables in C, which can be used by all components of the report in the form of a variable binding?

    Thank you very much.

    So, are they somehow like global variables in C, which can be used by all components of the report in the form of a variable binding?

    Yes, you could say so.

    We use a column of space reserved for the title of reports and any places objects on the margins of the report by assigning the appropriate values in the avant-rapport-trigger and then using the columns reserved space in layout.

  • Display the name of the tag as the column name and the value in the tag as a row of data from the input string.

    Hi Forum members,

    I am looking for a query display the name of the tag as the column name and the value in the tag as a row of data.

    I have to print the values within the tag to a file by choosing the value of the flags. the sequence of the tags will vary each time, as the tag name will change dynamically.

    So here is the example of input data and the expected output. The string in the text column must be separated as the column names and values.

    Input data
    Select 1 as seqno,' < > 0210A 50 4f < / 4f > < 5f20 > TEST CARD 16 < / 5f20 > < 5f2a > < / 5f2a > < 82 > 1 c 00 < / 82 > ' double text


    Output:

    Seqno 4f 5f20 5f2a 82
    0210A 50 16 1 00 TEST CARD 1

    Please help me by providing your entries on this.

    We use the version of Oracle 11.2.

    Note: This is not the XML string

    Thank you

    Shree

    with

    data in the form of

    (select 1 as seqno,'<4f>0210 A 50<5f20>TEST CARD 16<5F2a><82>00 1' text of all the double union)

    Select 2 as seqno,'XYZ<4F>0210 A 50<5f20>TEST CARD 16<5f2a><82>00 1' text of all the double union

    Select 3 as seqno,'<4f>0210 A 50<5f20>TEST CARD 16<5F2A><82>1 00XYZ ' text of all the double union

    Select option 4 as seqno,'<4F>0210 A 50<5F20>TEST CARD 16<5f2A><82>1 00XYZ' double text

    )

    Select d.seqno, x.*

    d the data,

    XMLTable ('/ root')

    by the way xmltransform (xmltype ('': replace (replace (text,'<><>'),)))

    XmlType (q'~http://www.w3.org/1999/XSL/Transform "version ="1.0"> ")

                                                     

                                                       

                                                         

                                                       

                                                     

                                                     

                                                       

                                                         

                                                       

                                                     

    ~'

    )

    )

    path of columns '4f' varchar2 (10) "tag4f."

    path of "5f20' varchar2 (30)"tag5f20. "

    path of '5f2a' varchar2 (10) "tag5f2a."

    path of varchar2 (10) "82" "tag82.

    ) x


    SEQNO 4f 5f20 5f2a 82
    1 0210A 50 16 TEST CARD - 1 00
    2 0210A 50 16 TEST CARD - 1 00
    3 0210A 50 16 TEST CARD - 1 00
    4 0210A 50 16 TEST CARD - 1 00

    with

    data in the form of

    (select 1 as seqno,'<4f>0210 A 50<5f20>TEST CARD 16<5F2a><82>00 1' text of all the double union)

    Select 2 as seqno,'XYZ<4F>0210 A 50<5f20>TEST CARD 16<5f2a><82>00 1' text of all the double union

    Select 3 as seqno,'<4f>0210 A 50<5f20>TEST CARD 16<5F2A><82>1 00XYZ ' text of all the double union

    Select option 4 as seqno,'<4F>0210 A 50<5F20>TEST CARD 16<5f2A><82>1 00XYZ' double text

    ),

    Chopper (seqno, Key, value, String) as

    (select seqno,

    regexp_substr (text,'<(.+?)>', 1, 1, null, 1),

    regexp_substr (Text,'>(.*?))

    regexp_substr (text,'<.+?>. *? ) (.*) $', 1, 1, null, 1). » <>'

    from the data

    Union of all the

    Select seqno,

    regexp_substr (String,'<(.+?)>', 1, 1, null, 1),

    regexp_substr (String,'>(.*?))

    regexp_substr (String,'<.+?>. *? ) (.*) $', 1, 1, null, 1)

    Chopper

    where regexp_substr (string,'<(.*?)>', 1, 1, null, 1) is not null

    )

    Select '4f', seqno, '5f2a', '82', '5f20.

    of (seqno, lower (key) select key, value)

    Chopper

    )

    Pivot (max (value) for key in ('4f' as '4f', '5f20' as '5f20', '5f2a' as '5f2a', "82" as "82"))

    Concerning

    Etbin

  • Addition of constraint not Null to a column that contains null values

    All,

    Could you please suggest me how to add the constraint not null to an existing column that has null values?

    SQL > create table nn (number n, s varchar2 (10));

    Table created.

    SQL > insert into nn values (1, 'test');

    1 line of creation.

    SQL > insert into values nn (2 '');

    1 line of creation.

    SQL > commit;

    Validation complete.

    SQL > alter table nn edit n number not null;

    Modified table.

    SQL > nn desc;

    Name                                      Null?    Type

    ----------------------------------------- -------- ----------------------------

    N NUMBER NOT NULL

    S                                                          VARCHAR2(10)

    SQL > alter table nn edit n number null.

    Modified table.

    SQL > nn desc;

    Name                                      Null?    Type

    ----------------------------------------- -------- ----------------------------

    N                                                  NUMBER

    S                                                  VARCHAR2(10)

    SQL > alter table nn change s varchar2 (10) not null;

    ALTER table nn change s varchar2 (10) not null

    *

    ERROR on line 1:

    ORA-02296: impossible to activate (SCOTT) - found null values

    SQL >

    Thank you

    Use NOVALIDATE:

    SQL > alter table nn change s varchar2 (10) not null;
    ALTER table nn change s varchar2 (10) not null
    *
    ERROR on line 1:
    ORA-02296: impossible to activate (SCOTT) - found null values

    SQL >
    SQL > alter table nn change s varchar2 (10) not null NOVALIDATE;

    Modified table.

    SQL > insert into values nn (3, null);
    insert into nn values (3, null)
    *
    ERROR on line 1:
    ORA-01400: cannot insert NULL into ('SCOTT'. "' NN '. » S »)

    SQL > select * from nn;

    N S
    ---------- ----------
    1 test
    2

    SQL >

    SY.

  • Sort a column as a numeric value

    Hello

    I created a SQL report from collections and problems with the sorting of the column as a numeric value.

    I used create_collection_from_query2 for my digital set as a variable n001. But, when I use the same in my SQL statement, it is considering the column as a string.

    Please advise if I am doing something wrong that is causing this problem.

    Thank you in advance,

    Madan

    Thanks for the reply fac586.

    Is to help sort the value column, but we hide the column, users do not have it sort by themselves.

    I have solved this problem by using the interactive report and did not apex_item.display_and_save () but used n001 column directly in the select statement. It is allowing me to sort as a numeric value.

  • The research of a column with comma separated values with ora-text

    I use the Oracle 11 g 2 XE and Oracle Text to a web search engine.

    I've now created and text indexed a CLOB keywords column that contains words separated by spaces. This allowed me to expand the search, as Oracle Text returns the rows that have one or more keywords that are stored in this column. The contents of the column are visible to the user and serves to 'expand' the search. This does not work as expected.

    But now I need support several words or even sentences. With the current configuration, Oracle Text will only search for each keyword. How should I store the phrases and configure Oracle text so that it will search entire sentences (exact match is better, but the partial match is fine too)?

    Example of content column of two lines (values separated semicolon):
    "Hello, Hello; y at - it anyone out there? Nope; »
    "the just; basic facts; »
    I found a similar question: looking for a column with values separated by commas, except that I need a solution for Oracle 11 g with it's freetext search.

    Possible solutions:
    1st solution: I thought to redraw the DB as follows. I would like to make a new array of keywords (pkID NUMBER, nonUniqueID NUMBER, singlePhrase VARCHAR2 (100 BYTE)). And I want to change the column previous keyword to KeywordNonUniqueID, holding the ID (instead of a list of values). At the time of the research I had INNER JOIN with the new keyword table. The problem with this solution is that I will get several lines containing the same data except for the sentence. I guess this will destroy the ranking?

    2nd solution: is it possible to store sentences as an XML in the column key of origin and somehow say Oracle text to search for in the XML?

    3rd solution: separate individual phrases with spaces, but replace the spaces in sentences with the underscore or something (making a single word). If a phrase "why Hello there, Johnny!" is saved as "Why_hello_there, _Johnny!

    4th solution?:

    Note that, generally, there is a lot of sentences (less than 100), nor that they will be long (one sentence will be up to 5 words).

    Also note that I am currently using CONTAINS, and needs some of its operators, to my full-text searches.

    When you talk about "phrase", do you mean "a list of words separated by a comma other sentences?

    Isn't that the definition of "sentence" used by Oracle Text, where it simply means "a list of words in the order defined."

    If I understand your requirement, you want to have data such as:

    "aa bb cc dd".
    "aa ee dd ff.

    and give priority to the first on the second if someone looking for "dd".

    First, to conduct research in the comma separated list, you should look for in a section. You can either explicitly define sections of field such as
    AA bb cc dd
    Or you can use the PHRASE special section and set the sentence delimiters correctly. This is done with the attribute BASIC_LEXER punctuation

    Then you have the number you want to find only words where they are the only words in the section. That's the same problem, I address in the last post of this forum entry:
    Contains: match exactly

    Our solution will be substantially the same, some surrounding text with special markers, and then prioritize a phrase search with these special markers each side of the word.
    We need to do a treatment some additional, although, as we need to surround each "sentence" (in your terminology) with special markers. I did it by surrounding the text with "XX1"... Condition2"then by replacing every comma with"Condition2, XX1"as part of a MULTI_COLUMN_DATASTORE:

    drop table names;
    create table names (id number primary key, text varchar2(50));
    
    insert into names values( 1, 'just and kind, kind and loving' );
    insert into names values( 2, 'just, kind' );
    
    exec ctx_ddl.drop_preference  ( 'mylex' )
    exec ctx_ddl.create_preference( 'mylex', 'BASIC_LEXER' )
    exec ctx_ddl.set_attribute    ( 'mylex', 'PUNCTUATIONS', ',' )
    
    exec ctx_ddl.drop_preference  ( 'mcds' )
    exec ctx_ddl.create_preference( 'mcds',  'MULTI_COLUMN_DATASTORE' )
    exec ctx_ddl.set_attribute    ( 'mcds', 'COLUMNS', '''XX1 ''||replace(text, '','',''XX2, XX1'')||'' XX2''' )
    
    exec ctx_ddl.drop_preference  ( 'mywl' )
    exec ctx_ddl.create_preference( 'mywl', 'BASIC_WORDLIST' )
    exec ctx_ddl.set_attribute    ( 'mywl', 'SUBSTRING_INDEX', 'YES' )
    
    create index namesindex on names(text)
    indextype is ctxsys.context
    parameters( 'datastore mcds wordlist mywl' )
    /
    
    select score(1),id,text from names where contains( text, '
    
      
        
           XX1 kind XX2 
           kind
        
      
    
    ', 1) > 0
    order by score(1) desc
    /
    

    Output of this is:

      SCORE(1)        ID TEXT
    ---------- ---------- --------------------------------------------------
         52         2 just, kind
          2         1 just and kind, kind and loving
    
  • Merger with subquery causes ORA-38101 invalid column to INSERT the VALUES C

    What follows is a slightly shortened version of a SQL statement that causes the error.
              MERGE INTO applicant_matches m_table USING
              (
                   SELECT DISTINCT
                               s.student_id,
                               a.term_scope_id,
                               a.first_name,
                             a.last_name,
                             a.ssn_visa,
                             a.birth_date,
                             ...     
                         
              ) m_list ON
              (m_list.student_id =     m_table.student_id AND
                   m_list.first_name     =     m_table.first_name AND
                   m_list.last_name =     m_table.last_name AND
                   m_list.birth_date     =     m_table.birth_date AND
                   m_list.ssn_visa =     m_table.ssn_visa AND
                   m_list.term_scope_id =     m_table.term_scope_id)
    
              WHEN NOT MATCHED THEN
                     INSERT (m_table.student_id, m_table.term_scope_id, m_table.ssn_visa, m_table.first_name, m_table.last_name,
                           m_table.birth_date, m_table.ssn_match, m_table.dob_match, m_table.soundex_match, m_table.name_match, m_table.past_present)
                     VALUES
                        (m_list.student_id, m_list.term_scope_id, m_list.ssn_visa, m_list.first_name, 
                             m_list.last_name, m_list.birth_date, m_list.ssn_match, m_list.dob_match, m_list.soundex_match, 
                             m_list.name_match, 
    
    
                             (SELECT                    
                   'A'
                        FROM  term_scope ts
                             JOIN campus_term ct ON ts.campus_term_id=ct.campus_term_id
                             WHERE
                             ts.term_scope_id = 5  )
               
               )
               
    I've simplified the request a bit to see what combination of things are the cause of the problem, that is why she always inserts 'A' in m_list.past_present (a CHAR (1)) and always use 5 for the term_scope_id.

    On the SELECT subquery I get one
    ORA-38101 invalid column in the INSERT VALUES Clause: string "ts". "" term_scope_id ".

    However, if I leave the
    JOIN the ct campus_term ON ts.campus_term_id = ct.campus_term_id
    Then, the query works fine.

    Anyway, it must be insert 'A', so I can't imagine what that JOIN has to do with anything anyone. The term_scope_id is valid. It won't let you do a join in a subquery for a merge insert?

    BTW: I'm using Oracle Database 11 g Enterprise Edition Release 11.1.0.6.0 - Production

    Try using the old join syntax

    Select 'x '.
    from t1, t2
    where t1.col = t2.col
    and t2.other_col = using_set.other_col

  • How to use the checkbox to display the values of booolean?

    Hi all

    I'm learning to use APEX. I built an editable report after the 'top advanced tutorials', and I use static LOVs to insert Boolean values in two columns.
    The underlying table has two columns of type VARCHAR2 (1) NOT NULL with a a check constraint, so it must contain either 'Y' or 'n'), and the static LOV requires users to only choose beetween 'Yes' and «»

    I would use checkboxes to insert this field. Is this possible? Where can I find examples / tutorials about it?

    Thank you
    Andrea

    See this:

    http://www.inside-Oracle-apex.com/checkboxes-in-tabular-forms-the-easy-way/

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • I have a column with two values, separated by a space, in each line. How to create 2 new columns with the first value in a column, and the second value in another column?

    I have a column with two values, separated by a space, in each line. How do I create 2 new columns with the first value in one column and the second value in another column?

    Add two new columns after than the original with space separated values column.

    Select cell B1 and type (or copy and paste it here) the formula:

    = IF (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    shortcut for this is:

    B1 = if (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    C1 = if (Len (a1) > 0, Member SUBSTITUTE (A1, B1 & "", ""), "")

    or

    the formula of the C1 could also be:

    = IF (Len (a1) > 0, RIGHT (A1, LEN (A1) −FIND ("", A1)), "")

    Select cells B1 and C1, copy

    Select cells B1 at the end of the C column, paste

Maybe you are looking for