Column Name Search

I know the name of the column. Is there any way I can search the System Tables to determine what tables and where the column name is defined so that I can build a primary key and foreign key mapping???
Thanks in advance for your help.
PSULionRP

You can use all_tab_columns - but then You will see only for those tables to wich You have access.
dba_tab_columns would show for all tables in database.

Similar Messages

  • Searching for missing column names in a single database.

    I have a database with about 100 tables, database gets generated using entity framework. The application has been enhanced  so users deployed with older version of the application need to upgrade to newer version. The database generated is both versions
    is same name.
    Now, the older version is missing some tables and column names that are in new database.
    Is there a script that can search for missing fields in a single database as described in this situation?
    Below is my script. Basically, nameofdatabase would the database generated and that already existing. If you install the application and database already exits no new database will be created.
    SELECT * FROM (Select TABLE_CATALOG, Table_name,COLUMN_NAME FROM nameofdatabase.INFORMATION_SCHEMA.COLUMNS) a FULL OUTER JOIN (SELECT TABLE_CATALOG, Table_name,COLUMN_NAME FROM nameofdatabase.INFORMATION_SCHEMA.COLUMNS) b ON b.COLUMN_NAME=a.COLUMN_NAME and
    a.TABLE_NAME=b.TABLE_NAME WHERE b.COLUMN_NAME is null or a.COLUMN_NAME is null ;

    There is a great tool called SQLCompare provide by www.red-gate.com
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to set column names in OVS search help of ALV EDIT

    Hi All,
    I have a OVS search help for my ALV EDIT column.This OVS will have two columns,I need to give the names(name1 , name2)  to the columns.
    I am writing the below codo in phase 0.
          ls_text-name = 'Column1'.
          ls_text-value = 'name1'.
          INSERT ls_text INTO TABLE lt_column_texts.
          ls_text-name = 'Column2'.
          ls_text-value = 'name2'.
          INSERT ls_text INTO TABLE lt_column_texts.
          ovs_callback_object->set_configuration(
                    label_texts  = lt_label_texts
                    column_texts = lt_column_texts
                    group_header = lv_group_header
                    window_title =  lv_window_title
                    table_header = lv_table_header
                    col_count    = 2
                    row_count    = 20 ).
    Below code in Phase 3.
          Assign ovs_callback_object->selection->* to <ls_selection>.
          if <ls_selection> is assigned.
            ovs_callback_object->context_element->set_attribute(
            name = `ATR1`
            value = <ls_selection>-Column1 ).
          endif.
    But,the column names are not getting set.Please provide your inputs.
    Regards,
    Salma

    hi,
    About your requirement, i don't know why you need to code in "Phase 3" of OVS.
    "Phase 3" is used for transporting your selected value to Your ALV.
    I think, the reason why you loose the result table including your customized column title, is that you loose the "Phase 2".
    Generally, in the past i used OVS as the following code simply.Just one example:
    * declare data structures for the fields to be displayed and
    * for the table columns of the selection list, if necessary
      types:
        begin of lty_stru_input,
    *   add fields for the display of your search input here
          carrid type string,
          connid type string,
        end of lty_stru_input.
      types:
        begin of lty_stru_list,
    *   add fields for the selection list here
          carrid type string,
          connid type string,
          text   type string,
        end of lty_stru_list.
      data: ls_search_input  type lty_stru_input,
            lt_select_list   type standard table of lty_stru_list,
            ls_text          type wdr_name_value,
            lt_label_texts   type wdr_name_value_list,
            lt_column_texts  type wdr_name_value_list,
      case ovs_callback_object->phase_indicator.
        when if_wd_ovs=>co_phase_0.  "configuration phase, may be omitted
    *   in this phase you have the possibility to define the texts,
    *   if you do not want to use the defaults (DDIC-texts)
          ls_text-name = 'CARRID'.  "must match a field name of search
          ls_text-value = 'Search Field-Carrid'.
          insert ls_text into table lt_label_texts.
          ls_text-name = 'CONNID'.  "must match a field name of search
          ls_text-value = 'Search Field-Connid'.
          insert ls_text into table lt_label_texts.
          ls_text-name = 'CARRID'.  "must match a field in list structure
          ls_text-value = 'Result-Carrid'.
          insert ls_text into table lt_column_texts.
          ls_text-name = 'CONNID'.  "must match a field in list structure
          ls_text-value = 'Result-Connid'.
          insert ls_text into table lt_column_texts.
          ls_text-name = 'TEXT'.  "must match a field in list structure
          ls_text-value = 'Result-Text'.
          insert ls_text into table lt_column_texts.
          lv_group_header = 'Group Header'.
          lv_window_title = 'Window Title'.
          lv_table_header = 'Table Header'.
          ovs_callback_object->set_configuration(
                    label_texts  = lt_label_texts
                    column_texts = lt_column_texts
                    group_header = lv_group_header
                    window_title = lv_window_title
                    table_header = lv_table_header
                    col_count    = 3
                    row_count    = 8 ).
    when if_wd_ovs=>co_phase_2.
    *   If phase 1 is implemented, use the field input for the
    *   selection of the table.
    *   If phase 1 is omitted, use values from your own context.
          if ovs_callback_object->query_parameters is not bound.
    ******** TODO exception handling
          endif.
          assign ovs_callback_object->query_parameters->*
                                  to <ls_query_params>.
    SELECT * INTO CORRESPONDING FIELDS OF TABLE lt_select_list FROM ZTABLE_FLIGHT
                           WHERE CARRID LIKE lw_carrid
                                 AND CONNID LIKE lw_connid
    *ovs_callback_object->set_output_table( output = lt_select_list ).*
    Hope it can help.
    Best wishes.

  • Search by column name

    I have a table with search and display boxes at the top created by APEX.
    I added another dropdown box for the search to do the search by column names.
    This dropdown is displaying numbers instead of column names.
    How would do I make this change so that the search can be done by a specific column?
    Thanks.

    Click the arrow at the magnifier glass and you can select a specific column. Or click on the heading of a column to do the filtering there too.
    Or you can remove the "Allow Users To: Filter" checkbox from all the columns where you don't want to support search. If there is just one left only that one should be search with the general search field.
    Patrick
    *** New *** Oracle APEX Essentials *** http://essentials.oracleapex.info/
    My Blog, APEX Builder Plugin, ApexLib Framework: http://www.oracleapex.info/

  • Multiple Column search based on column name

    Hi, Can anybody please help me with my issue. I have a table containing about 100 columns, I am using application express. I want to use a textbox for input, and input will be column name i.e. say one of the column name is "PARK" when user type park in that textbox and click on go or search it will display the records for "PARK" column. How can I do that.
    I am trying like this - select :P124_PARK_NAME from wp_parks.
    it displays the result but display "PARK" instead of actual data for that column. Please help...

    I would prefer some thing like this.
    SQL> create table hx_test
      2  as
      3  select level as rno
      4    from dual
      5  connect by level <=10
      6  /
    Table created.
    SQL> create or replace type num_type as table of number
      2  /
    Type created.
    SQL> create or replace package get_col_val
      2  as
      3     function get(pCol_Name in varchar2, pTable_Name in varchar2) return num_type PIPELINED;
      4  end get_col_val;
      5  /
    Package created.
    SQL> create or replace package body get_col_val
      2  as
      3      function get(pCol_Name in varchar2, pTable_Name in varchar2) return num_type PIPELINED
      4      as
      5       lcol_val number;
      6       lref_cur sys_refcursor;
      7     begin
      8              open lref_cur for 'select ' || pCol_Name || ' as col from ' || pTable_Name;
      9
    10              loop
    11                      fetch lref_cur into lcol_val;
    12                      exit when lref_cur%notfound;
    13                      pipe row (lcol_val);
    14              end loop;
    15
    16              close lref_cur;
    17
    18              return;
    19     end;
    20  end get_col_val;
    21  /
    Package body created.
    SQL> select * from table(get_col_val.get('rno','hx_test'))
      2  /
    COLUMN_VALUE
               1
               2
               3
               4
               5
               6
               7
               8
               9
              10
    10 rows selected.Thanks,
    Karthick.

  • Search for column name in DB tables

    Hi Guys
    Is it possible to search column name when we do not know the corresponding table in the databse
    Cheers
    shabar

    You can use the data dictionary to search though a list of all column names. The <strike>table</strike> data dictionary view is ALL_TAB_COLUMNS.
    Lets assume you want to search for ID columns:
    example
    select owner, table_name, column_name
    from all_tab_columns
    where column_name = 'ID';Edited by: Sven W. on Jun 21, 2011 1:47 PM

  • Renaming Column Names in a single shot in Requests

    Hi All,
    We are having one issue while trying to rename the column in the requests.
    Requirement:
    We are having two presentation table "Fact Summary" and "Countries Dimension". Both of these tables contain one column "Country Description".
    Presently in all the reports we have developed till now, we used "Fact Summary"."Country Description".
    Now the users want us to replace "Fact Summary"."Country Description" with "Countries Dimension"."Country Description" and delete the "Country Description" from "Fact Summary" table.
    Approach we followed:
    Opened the Catalog Manager in Offline mode and used the XML Search and Replace option.
    With this option we are able to replace column names that are selected in a request but not those just used as filters(is prompted).
    Example:
    Suppose we have one request with "States Dimension"."State" seleted and "Fact Summary"."Country Description" as filter, we are able to not able to replace "Fact Summary"."Country Description" with "Countries Dimension"."Country Description"
    Can anyone please help me...Is there any alternative solution for this?
    Thanks in Advance.....

    Nope, I don't have a solution for this. You must never model descriptive columns in a fact table. Even when you have descriptive columns or textual content in one of your fact table columns, you should model them as part of a logical dimension table. Let this be a good lesson.
    Regards,
    Stijn

  • How to get table and column names thats being used in SQL , that's generating all my reports on SSRS.

    Good day,
    I searched through the forum and cant find anything.
    I have around 300 published reports on SSRS and we are busy migrating to a new system.
    They have already setup their tables on the new system and I need to provide them with a list of table names and column names that are being used currently to generate the 300 reports on SSRS.
    We use various tables and databases to generate these reports, and will take me forever to go through each query to get this info.
    Is it at all possible to write a query in SQL 2008 that will give me all the table names and columns being used?
    Your assistance is greatly appreciated.
    I thank you.
    Andre.

    There's no straightforward method for that I guess. There are couple of things you can use to get these details
    1. query the ReportServer.dbo.Catalog table
    for getting details
    you may use script below for that
    http://gallery.technet.microsoft.com/scriptcenter/42440a6b-c5b1-4acc-9632-d608d1c40a5c
    2. Another method is to run the reports and run sql profiler trace on background to retrieve queries used.
    But in some of these cases the report might be using a procedure and you will get only procedure. Then its upto you to get the other details from procedure like tables used, columns etc
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • CS5 Advanced Query - using a variable for a column name

    Hi
    I have been using Dreamweaver for a few years now, mostly version 8, but have just moved to CS5 (I teach it - among lots of other thing -  at what in the US would be a community college).
    I have problem with a page in CS5 that worked fine in my old version 8 edition.
    I am using PHP and MySQL as my server technologies
    I have a CD database and have constructed a Search Page which has a Form with a Text Box (stext) for the search criteria, and 3 option buttons to select the DB column I want to search on.  The option buttons are called sfield - and have values band, title, and/or year these will be passed to my display page (display.php) via GET array URL Parameters.  They are passed fine.
    I want to be able to enter "Pink" into the search text field, click the Band option button, and then my data displayed would inlude CDs by any band with Pink in their name i.e. Pink Floyd.  If I put 1989 and click the year option button, I search for all CDs from 1989 and so on.
    On my display page I created a recordset and selected my MySQL Server, DB Table, and using the simple dialogue selected band as the Filter and "contains" and the URL Parameter stext.   This all works as expected. I put in a  dynamic table and when I run it to test it, it will search on band only and works fine.
    Its when I try to select the column to search I get a problem.  I go to the advanced recordset dialogue.  I have the SQL
    Select * from newellcds where band like %colname%
    I need to change this to add a new variable, lookfield, which will hold my column selection from the option buttons (URL parameter: sfield), so I create the TEXT variable, with band as the default and the value of $_GET['sfield'] and put it into my SQL
    Select * from newellcds where lookfield like %colname% - and it doesn't work!!!  I always get no return from the database.
    After much experimentation, I echoed the Dreamweaver generated SQL on the screen and when I entered Pink and selected band on the search page, the Display SQL was displayed as:
    Select * from newellcds where 'band' like '%Pink%'
    Dreamweaver is putting single quotes round the value returned by my lookfield variable 'band' in this case.  If I enter the SQL without the quotes round Band into MySQL it works, with the quotes I get no returns.
    After this very long description - does anyone have an idea how to get rid of the quotes round my lookfield variable???
    How do I create a search page with two values passed - the actual criteria to search for, and the field to search for it in?
    Any help would be greatly appreciated.

    I don't have anything useful to contribute because I don't use DW to create queries, and you are not looking for help writing the query. You just want to get rid of the single quotes, which I can't help with.
    But based on your description, shouldn't the query be
    SELECT * FROM newellcds WHERE $sfield LIKE '%$stext%'
    If not, then I am not following.

  • Please help me I am not seeing Database table column names in field explorer view

    Hi,
    I am developing a crystal report using eclipse and sql server. After creating connection, when i drag and drop tables, The table name and its columns should apper in field explorer view. Then we drag the columns onto crystal report. Unfortunately I am just  seeing only table names but not column names in field explorer view. Could anyone help me?
    After downloading eclipse I have plugged in the crystal report using the following instructions
    1. Click on the Help menu, and then Software Updates > Find and Install... to open the Install/Update wizard.
    2. Select Search for new features to install and click Next.
    3. Click the New Remote Site button. This will launch the New Update Site wizard
    4. Type the Business Objects Updsate Site for the Name field and the following for the URL: http://www.businessobjects.com/products/dev_zone/eclipse/
    5. Click OK to complete the wizard.
    6. Enable the newly created Business Objects Update Site checkbox as well as the Callisto Discovery Site (which should appear by default with Eclipse 3.2) and click Finish.
    Expand the Business Objects Update Site node and enable the Crystal Reports for Eclipse 1.0.0v555 checkbox.
    8. Expand the Callisto Discovery Site and click the button "Select Required". This will automatically select the required Eclipse features necessary to successfully install Crystal Reports for Eclipse.
    Thank You
    Rajavardhan Sarkapally

    Now we have a lot of views which select data from the tables, but I need to get the "Table Column Name" that is linked in the view.
    If you are using SQL Server 2012/2014, then you can use
    sys.dm_exec_describe_first_result_set (Transact-SQL) to gte the informations.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Column name in ALV table dissapeared after new language package installatio

    Hi,
    We have a custom field in an ALV table in SAP system. In english everything was just fine with our custom field.
    But when we installed a new languaged the column name dissapeared.
    My question is:
    Where does the ALV get the column name from? Is there a standard method which I can search for which is used for this purpose in ALV?
    regards
    Baran

    the field name comes from data element FIELD name you have specified when creating ur custom field..
    try to change that field name for that field..
    hope it works
    award points if helpful

  • How to validate column name in dynamic made sql?

    Oracle db, jdbc, web app with struts2/spring.
    Example table could be this:
    CREATE TABLE album
    album_id number(10)  not null,
      artist  varchar2(50) not null,
    title  varchar2(50) not null,
      released  DATE,  
      CONSTRAINT album_pk PRIMARY KEY (album_id)
    );In may app the user MAY search, MAY sort, and the result from an select might return 10.000 rows.
    The basic sql usually look like this.
    String sql = "select album_id, artist, title, released from album";Then in the html page the user can add search criteria for each column. Like type "iron maiden" in artist field, put "1982" in released field. And you all know what the exceptionally result should be from that :)
    Now I need to modify the sql a bit:
    if( artist search field contains stuff )
       sql = sql + " where nvl( artist,' ') like ?"
    }we try use prepared statements right? So we use ? as placeholders, and then add "iron maiden" into this statement later on.
    Nice, no big fuzz right, and pretty safe from sql injections i guess.
    But now I have to have an if/else for every single field in the table. Boring. In my app I got like 25 tables like this, with 20 columns minimum. Copy/Paste have never been so boring.
    I also might have to add "order by" with user selected columns and their order. I have to count the query to get total result in case i got to split it up in pages. So there is alot of if/else and sql = sql + "more stuff", and sticking to ? and pure prepared statements is impossible.
    But doing this is not good either:
    for( each element in a map)
      sql = sql + " and nvl( " + key + ",' ') like ?"
    }Where key is "artist".
    In struts and other tag libs its easy to make kode like:
    <s:textfield name="model.addSearch( 'artist' )" value="%{model.getSearch( 'artist' )}" size="30" />
    Silly example maybe, but just to make a point.
    Inputed values in an html form, can very easily be a part of a dynamic created sql - which becomes a security problem later on.
    Artist is an column name. Key should be validated if it contained an valid column name.
    I could make a list of strings, containing valid column names to check against.
    My question is if there is possible to get this type of information from the database, so I don't have to hand-make these lists?
    But I also want to keep the number of heavy and slowing queries down.
    My app have like 25 tables now, and I could easily get away with hand-make everything, copy/paste around etc. But I have more projects and this question will be here next time too. And after there again...

    Etharo wrote:
    Metadata. Then I have to query the database, take the result and use it for validating of input. If my sql only query 1 table, then this is ok. In this case I could do with that. But if the sql query mutliple tables, with sub-selects, unions etc. Then I might have to query all tables first, and even then I might not have what I want.
    The best way is of course to run the query, then get the metadata from that query - cause then im 100% sure what columns will be returned, and then I can validate with that.... 1 query is often not that slow. But I might query once to find total number of rows the query return in order to decide if we need to page the result. then query to get the metadata for validating input, then query to get the result... Maybe this is ok -but my head don't like it as an general ok thing to do, but I can't really say why...If you have a gui screen then it needs to correspond to some specific query. It can't be all possible combinations.
    So once you know the query you can obtain the meta data using a query that returns no results. Like the following.
    select * from mytable wheren 1 = 0
    >
    Jschell:
    I agree to what you say. I don't understood everything you said tho.
    Im not sure if you talk about having 1 search field (like google), and you input stuff there that might be in any columns.
    I have several search fields in one-to-one relasionship with view column/sql query column.
    Then you already know what the field represents. So validate it in the gui and not via the database.
    The first is way more advanced since you have to cover any input, any column, any case etc. Pluss add ranking. Lots of work for someone who have done little searchengines.
    Latter is simpler, but might also be limiting.Huh?
    As an example if you have a call center then the operators are not going to be doing unrestricted searches to find customers. They are going to look using a very limited set of data like the customer name and telephone number.
    >
    My job is very much like an consulent. They got an app, I shall add a new feature. The app is old and ugly coded. My boss ask how long it takes to make this, I say 2months, he decide 1 month. My dev time for features is rarely above 1 month, and I don't make much new apps.
    So I don't have the time to make advanced codegenerator, or spend time to evaluate various frameworks. Bringing an framework into the existing code is actually difficult. But I do want to improve the code, and add good code into the existing app that can be extended without evil pain.
    That doesn't jive with your OP. You made the following statement "My app have like 25 tables now, and I could easily get away with hand-make everything,...".
    That suggests that you are doing much more than simply updating an existing application.
    If you only need to add one new field then you should do only that. You shouldn't be attempting to add a system spanning validation system.
    On the other hand if you are in fact adding a validation system, then code generation makes it likely that it would take less time or no more than the same. And it is less likely to introduce bugs.
    Learn how to make an code generator? Well I guess thats what I asked help for - point me in the right direction if you could pls. Putting strings together to become code in an logic way is usually manageable, at least for simple querys. Evaluating that the generated code is good/safe - got no good clues...
    Learn about frameworks? Got no time. Hope I will get the time, but I won't. The customer must want to spend the money so I can get the time, that won't happen cause an framework does not add features, its only cost saving in terms of dev time, and maintenance time. The customer have no such focus/interest. They got a bit money to spend now and then regularily. i.e. government.
    I just want to try code as good as possible so I save myself from errors, painfull rewrites, and dev-time that gets out of proportions because of stupid code. So the question is actually about me trying to improve myself, its just that i don't know how right now.There are two goals.
    1. Implement a specific feature in an existing application.
    2. Learn a new way to solve problems.
    Nothing says that the second will help with the first. They should be addressed separately and your post doesn't make it clear what the first is so it is hard to say how it should be down.
    As for the second I already made a suggestion which provides two new ways to solve problems.

  • JDBC send data to oracle, oracle only accept column name in Upper case

    Hi experts,
    I am doing a scenario File --> XI --> JDBC,  JDBC send data to a Oracle 10g database, I have configured JDBC receiver to use XML-SQL format. in oracle database ,  table "EMPLOYEE" has a column "NAME", but when I send data to oracle using JDBC receiver, the column is "name", then XI complains
    " 'EMPLOYEE' (structure 'insert'): java.sql.SQLException: FATAL ERROR: Column 'name' does not exist in table 'EMPLOYEE'.
    can anyone help me to let oracle accpet column "name". I can't change colum in JDBC receiver from "name" to "NAME".
    Thanks a lot.

    <i>can anyone help me to let oracle accpet column "name"</i>
    Making Oracle case insensitive is not possible (in my opinion). By default all object names are stored in UPPER case in the rdbms dictionary.
    When XI searches for column name in Oracle, this search is case sensitive. So u have to configure accordingly.
    Regards,
    Prateek

  • Report data binding error unknown column name

    Hi,
    I am having a problem with the new 7.02 update of Report
    Builder. The issue is it's not finding my SQL query.
    I have wrote my query initally in the advance mode, and it
    doesn't seem to reconize it. Is there an issue with this?
    I did manage to fix one of my reports by using the basic mode
    and selecting all my tables and seting my linkage and criteria.
    I have other computers that i have not updated to 7.02 and
    they do not have this issue. Below is the error:
    Error Occurred While Processing Request
    Report data binding error Unknown column name : work_phone.
    Please try the following:
    Check the ColdFusion documentation to verify that you are
    using the correct syntax.
    Search the Knowledge Base to find a solution to your problem.
    Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0;
    .NET CLR 1.1.4322; .NET CLR 2.0.50727)
    Remote Address 127.0.0.1
    Referrer
    Date/Time 13-Jul-06 02:33 PM
    Stack Trace (click to expand)
    coldfusion.runtime.report.Report$ReportDataBindingException:
    Report data binding error Unknown column name : work_phone.
    at
    coldfusion.runtime.report.Report.runReport(Report.java:420)
    at
    coldfusion.filter.ComponentFilter.invoke(ComponentFilter.java:96)
    at
    coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:225)
    at
    coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
    at
    coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:69)
    at
    coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
    at
    coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    at
    coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at
    coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at coldfusion.xml.rpc.CFCServlet.invoke(CFCServlet.java:106)
    at coldfusion.xml.rpc.CFCServlet.doGet(CFCServlet.java:157)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at
    org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
    at
    jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
    at
    jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:349)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:457)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:295)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    This report works in 7.01. So all query variables match with
    a variable in the SQL select statement.
    Anyone have any Ideas??
    Thanks,
    Daniel

    Thank you very much for help.
    The "Unknown column name " is a field still used in my
    report, so I can't remove it.
    After I clear the query in the report and reopen the report
    and apply the same query back to it, I get different error message:
    Element TASKNUM is undefined in QUERY.
    The error occurred in : line 1
    -1 : Unable to display error's location in a CFML template.
    I know for sure this "Element TASKNUM is undefined in QUERY."
    is defined in query. each time it complains something different. I
    get really confused.
    Thanks again.
    Yueming

  • Setting Column Names in Dynamic Pivot Query

    Hi all,
    I'm having trouble setting column names in a dynamic pivot query and was wondering if someone could please help me figure out what I need to do.
    To help you help me, I've setup an example scenario in my hosted account. Here's the login info for my hosted site at [http://apex.oracle.com]
    Workspace: MYHOSTACCT
    Username : DEVUSER1
    Password : MYDEVACCTAnd, here is my test application info:
    ID     : 42804
    Name   : dynamic query test
    Page   : 1
    Table 1: PROJECT_LIST         (Alias = PL...  Listing of Projects)
    Table 2: FISCAL_YEAR          (Alias = FY...  Lookup table for Fiscal Years)
    Table 3: PROJECT_FY           (Alias = PF...  Intersection table containing project fiscal years)
    Table 4: PROJECT_FY_HEADCOUNT (Alias = PFH... Intersection table containing headcount per project and fiscal year)Please forgive the excessive normalization for this example, as I wanted to keep the table structure similar to my real application, which has much more going on.
    In my sample, I have the "Select Criteria" region, where the user specifies the project and fiscal year range that he or she would like to report. Click the Search button, and the report returns the project headcount in a pivoted fashion for the fiscal year range specified.
    I've got it working using a hard-coded query, which is displayed in the "Hardcoded Query" region. In this query, I basically return all years, and set conditions on each column which determines whether that column should be displayed or not based on the range selected by the user. While this works, it is not ideal, as there could be many more fiscal years to account for, and this is not very dynamic at all. Anytime a fiscal year is added to the FISCAL_YEAR table, I'd have to update this page.
    So, after reading all of the OTN SQL pivot forums and "Ask Tom" pivot thread, I've been able to create a second region labeled "Dynamic Query" in which I've created a dynamic query to return the same results. This is a much more savvy solution and works great; however, the column names are generic in the report.
    I had to set the query to parse at runtime since the column selection list is dynamic, which violates SQL rules. Can anyone please help me figure out how I can specify my column names in the dynamic query region to get the same column values I'm getting in the hardcoded region?
    Please let me know if you need anymore information, and many thanks in advance!
    Mark

    Hi Tony,
    Thanks so much for your response. I've had to study up on the dbms_sql package to understand your function... first time I've used it. I've fed my dynamic query to your function and see that it returns a colon delimited list of the column names; however, I think I need a little more schooling on how and where exactly to apply the function to actually set the column names in APEX.
    From my test app, here is the code for my dynamic query. I've got it in a "PL/SQL function body returning sql query" region:
    DECLARE 
      v_query      VARCHAR2(4000);
      v_as         VARCHAR2(4);
      v_range_from NUMBER;
      v_range_to   NUMBER;         
    BEGIN
      v_range_from := :P1_FY_FROM;
      v_range_to   := :P1_FY_TO;
      v_query      := 'SELECT ';
      -- build the dynamic column selections by looping through the fiscal year range.
      -- v_as is meant to specify the column name as (FY10, FY11, etc.), but it's not working.
      FOR i IN v_range_from.. v_range_to  LOOP
        v_as    := 'FY' || SUBSTR(i, 3, 4);
        v_query := v_query || 'MAX(DECODE(FY_NB,' || i || ',PFH_HEADCOUNT,0)) '
          || v_as || ',';
      END LOOP;
      -- add the rest of the query to the dynamic column selection
      v_query := rtrim(v_query,',') || ' FROM ('
        || 'SELECT FY_NB, PFH_HEADCOUNT FROM ('
        || 'SELECT FY_ID, FY_NB FROM FISCAL_YEAR) A '
        || 'LEFT OUTER JOIN ('
        || 'SELECT FY_ID, PFH_HEADCOUNT '
        || 'FROM PROJECT_FY_HEADCOUNT '
        || 'JOIN PROJECT_FY USING (PF_ID) '
        || 'WHERE PL_ID = ' || :P1_PROJECT || ') B '
        || 'ON A.FY_ID = B.FY_ID)';
      RETURN v_query;
    END;I need to invoke GET_QUERY_COLS(v_query) somewhere to get the column names, but I'm not sure where I need to call it and how to actually set the column names after getting the returned colon-delimited list.
    Can you (or anyone else) please help me get a little further? Once again, feel free to login to my host account to see it first hand.
    Thanks again!
    Mark

Maybe you are looking for

  • Illustrator CS6 drop shadow looks worst

    Anyone there know is it a bug of Illustrator CS6, I try the same size and same setup in Illustrator CS5 have no problem.

  • How do you see if you've been infected by flashback?

    how do you see if you've been infected by flashback?

  • Adobe Email Service verification code

    This is a trial version of Elements 11. I want to use Adobe Email Service to send pictures. The promised verificatiopn email is received by my email address but there is no verification code. I click the link to verify my email address and it is veri

  • Installing Creative Cloud causes Error 207

    Hi all, I try to install CC on an new clean Win7 PC. The Setup takes long and end's with the Error 207. Retrying doesn't help it ends with a new 207 Error a few minutes later... Here are some log enties: 07/26/14 17:04:22:467 | [WARN] |  | ASU | PIM

  • Individual/Collective Requirement indicator in MTS

    Hi Gurus, Can you please let me know what is the relevence of individual/Colelctive Requirement indicator from MRP4 view of material.. for Finished product as well as its sub assembliees in case of make to Stock planing strategies. i know how it work