Correct way to modify Advanced SQL in report

The actual Select on the Advanced tab is something like this:
SELECT Incidents."DATE" saw_0, Incidents."TYPE" saw_1, Defects."TYPE" saw_2, "Vessel and Boats"."NUMBER" saw_3 ...
FROM "Vessel and Boats Reporting" (this is the catalog name)
Now, I need to modify the sql I have tried using the columns in the From then an alias but it doesnt recognize the tables (see example below), how is this handled in the sql in obiee?*
Trial 1
SELECT I."DATE" saw_0, I."TYPE" saw_1, D."TYPE" saw_2, V."LR NUMBER" saw_3
FROM Incidents I, Defects D, "Vessel and Boats" V
Trial 2
SELECT SIM.Incidents."DATE" saw_0, SIM.Incidents."TYPE" saw_1, SIM.Defects."TYPE" saw_2, SIM."Vessel and Boats"."NUMBER" saw_3
FROM "Vessel and Hull Defects Reporting" SIM
Neither of the trials worked. I guess I am getting it wrong, again how is this handled in the sql in obiee?*

Hi user,
in the advanced tab you need not mention the table name in from clause.
your trial 2 looks ok but remove the subject area name in the table name
try something like below,
SELECT Incidents."DATE" saw_0, Incidents."TYPE" saw_1, Defects."TYPE" saw_2, "Vessel and Boats"."NUMBER" saw_3
FROM "Vessel and Hull Defects Reporting" order by saw_0
PS:your incident and defects and vessel and boats table should have proper joins between them.
Edited by: kart on May 25, 2010 4:22 PM

Similar Messages

  • Is there one tell  me the correct way to access remote SQL server

    Hi
    I have tried to access a remote SQL server by many ways but all failed
    here is my trying :
    String driver = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
    String url= "jdbc:microsoft:sqlserver://217.52.98.102:1433";
    Class.forName(driver);
    Connection conn = DriverManager.getConnection(url,"sa"," " );
    String selectStr = "select * from FleetWatch..table_name";
    Statement st = conn.createStatement();
    ResultSet rs = st.executeQuery(selectStr);
    DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver());
    // connect to the DB by using the driver.
    String connString = "217.52.98.102:1433;databasename=FleetWatch";
    String strDBConnect = "jdbc:microsoft:sqlserver://" + connString;
    conn = DriverManager.getConnection(strDBConnect, "sa", "");
    String driver = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
    Class driverClass = Class.forName(driver, true, jdbcLoader);
    Driver currDriver = (Driver)driverClass.newInstance();
    Properties prop = new Properties();
    prop.setProperty("sa", (String)paras.get("sa");
    prop.setProperty("password", (String)paras.get(" ");
    String url= "jdbc:microsoft:sqlserver://217.52.98.102:1433";
    conn = currDriver.connect((String)paras.get(url, prop);
    pls tell if you know the correct way to access a remote sql server and
    access it befor tell me its step to ensure it's connect

    String driver = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
    String url= "jdbc:microsoft:sqlserver://your servername:1433";
    Class.forName(driver);
    Connection conn = DriverManager.getConnection(url,"username ","password " );
    this user name and password may be diff becoz if u have only sql authentication then u have to know that user name or it can have windows nt authentication so if it is so then no probs can use ur windows nt login..
    know the server name where ur sqlserver is connected to.
    set the classpath for the sqlserverdrivers jar files which u have downloaded where ur working on.
    then it works
    i did the same and worked for me.
    try it.

  • Is there a way to create SQL Dev reports with validated binds?

    Is there a way to create SQL Dev reports with validated binds similar to the way user defined extensions can have <prompts> with a <value> that is a SQL statement returning a list of possible values?
    This sure would make select appropriate values for binds in reports easier and less error prone.

    Maybe a forum search on "Windows registry" would turn up some useful things. You're not the first to ask this. You might save yourself and everyone else some time if you'd simply do that.

  • Which of of these two choices is the correct way to call a report ?

    Environment is 9iAS.
    Which of of these two choices is the correct way to call a report from the menu?
    Choice 1) CGNV$INVOKE_REPORT('W02226.adinfra.net:8888,reports9i', 'rv043knd.rdf', CACHE, '', 'HTML',NULL );
    Coice 2) qms$menu.set_current_action('LAUNCH_REPORT','rv043knd.rdf'); execute_trigger('QMS$MENU_ITEM');

    although the menu-preference MNUDRC has the value qms$menu.set_current_action('LAUNCH_REPORT','<MODULE>'); execute_trigger('QMS$MENU_ITEM');
    the generated code for calling the report in the menu is like the code under option 1).
    What else do we need to set (in the preferences or elsewhere) to use the Headstart Report Launch Form ???
    thanks! Bart

  • SQL Server Reporting services. failed to establish connection with project server. verify the url is correct.

    Dear All,
    I'm working on reporting of Project Server 2010, while configuring SQL SERVER REPORTING SERVICES faced issue after two complete days of troubleshooting along with this gone through plenty of forums, unable to figure out any solution. So finally posting on
    technet in order to find solution.
    ISSUE/PROBLEM:
    At initial configured the SQL REPORTING CONFIGURATION to sharepoint integrated database (SQL SERVER is installed on seperate machine), change the service to Domain Account and also installed sharepoint add in on server story was fine at this point. Furthur
    moving to SHAREPOINT ADMIN console and while configuring the Sharepoint Integrated Reporting continuously facing this error:
    Failed to establish connection with report server. . . . (Snapshot is attached for your further reference).
    My point of concern is that whenerver i try to open the REPORT SERVER URL on project server machine it prompts me to enter username and password but whenever i insert the domain credentails it didnt accept though it can be accesible by using the credentials
    of Local Admin of sql server machine. So i wana come to know whether its permission issue if yes then where i should mention the domain credentials.? 
    REGARDS DANISH DANIE

    Dear Paul,
    I am able to open the URL (http://psdb/ReportServer )using
    domian credential and page open with these contents
    Reporting Services Error
    The configuration parameter SharePointIntegrated is set to True but Share Point Object Model cannot be loaded
    Second,
    Configured the SPN on domain controller , performed the steps required to change the AUTHENTICATION in rsreportserver.config
    file also done the registry settings to disable the loop back settings.
    Same error still ! .... what should i do now ??? 
    REGARDS DANISH DANIE

  • SQL Server Reporting Services misunderstands url

    I am having trouble encoding a url inside of a web.config tag because you can't just type in & you have to encode it.
    For some reason sql server reporting server never understands when I encode it.
    Below is the working for sure url that has not been put inside the tag yet.
    http://business.business.com/ReportServer/Pages/ReportViewer.aspx?/All%20Department%20Reports/System%20Summary&rs:ClearSession=true&SSN=5440
    When I encode it the following way SSRS errors & says the param 'amp;SSN'
    does not exist! Of course it was supposed to interpret &amp; as an & !
    http://business.business.com/ReportServer/Pages/ReportViewer.aspx?/All%20Department%20Reports/System%20Summary&amp;rs%3AClearSession=true&amp;SSN=5440
    So I tried to encode it a different way:
    http://business.business.com/ReportServer/Pages/ReportViewer.aspx?/All%20Department%20Reports/System%20Summary&amp;rs%3AClearSession=true%3ASSN=5440
    This resulted in SSRS telling me that the 'param SSN is missing a value'
    Can anyone point me toward the correct url for my web.config tag?

    Hi yashmitl,
    In your case, please running the following command to check the current URL reservations on http.sys.
    netsh http show urlacl
    Then, please delete the URL reservation by executing the following command try to resolve the issue.
    netsh http delete urlacl <url>
    There is a similar issue, you can refer to it.
    http://social.technet.microsoft.com/Forums/en-US/d5204dd3-e26d-4592-8ef0-a94005fc46a5/the-url-has-already-been-reserved?forum=sqlreportingservices
    Hope this helps.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Trying to make Reporting Services Configuration Manager work. Or, SQL Server Reporting Services.

    Under Start > Programs > Microsoft SQL Server 2008, I have the following:
    SQL Server Management Studio
    Configuration Tools
    Integration Services
    Import and Export Data
    Under Configuration Tools, I have the following:
    SQL Server Installation Center
    SQL Server Configuration Manager
    SQL Server Error and Usage Reporting
    Reporting Services Configuration Manager
    I tried to enable Reporting Services through 'Reporting Services Configuration Manager' but I don't seem to have much control from this view.  I see two boxes, one named Server Name (and it shows my server name) and the other is named Report Servicer Instance (and this is grayed out).  If I click on the Find box next to Server Name, I get this message:
    Report Server WMI Provider Error: Invalid Namespace
    Details
    Invalid Namespace
    To get the Server Name I right-clicked SQL Server > Properties > General
    Any ideas on how to make Reporting Services Configuration Manager work?  Or, can you please give me more details on how to access "System control" => "Services"?  I'm not seeing it anywhere and I'm not seeing any way to find "Sql Server Reporting Services".  Basically, I'm trying to activate my SQL Server Reporting Services.
    I am using SQL Server 2008 Express Management Studio.  Is SQL Server Reporting Services included in Express Management Studio?  I read, online, that it is, but I can't find it anywhere.
    Thanks again!
    Ryan--
    <input id="gwProxy" type="hidden"><!-- Session data--></input> <input id="jsProxy" onclick="jsCall();" type="hidden" />

    Thanks Jerry Nee!!  This may be exactly what I’m looking for!  I went to this link:
    http://www.microsoft.com/downloads/details.aspx?FamilyID=B5D1B8C3-FDA5-4508-B0D0-1311D670E336&displaylang=en#filelist  
    At the top of the page it says, ‘Microsoft® SQL Server® 2008 Express with Advanced Services’, which seems like this is what I’m looking for, so I downloaded the file named ‘SQLEXPRADV_x86_ENU.exe’
    Then, I cut that from my desktop and pasted it in my C-drive and I get a message that says, ‘this folder already contains a file named ‘SQLEXPRADV_x86_ENU.exe’, would you like to replace the existing file?’
    I’m thinking…what the heck?  Do I already have this thing?  If so, why can’t I see SQL Server Reporting Services?  Maybe I have it now, and I just don’t know how to access the reporting Services features…
    Couple quick questions:
    What’s the difference b/w these two files: 
    ‘SQLEXPRADV_x64_ENU.exe’ and ‘SQLEXPRADV_x86_ENU.exe’? 
    Also, my current version of SSMS, Help > About shows this:
    Microsoft SQL Server Management Studio
    10.0.1600.22 ((SQL_PreRelease).080709-1414 )
    Microsoft Data Access Components (MDAC)
      2000.085.1132.00 (xpsp.080413-0852)
    Microsoft MSXML
    2.6 3.0 5.0 6.0
    Microsoft Internet Explorer
    8.0.6001.18702
    Microsoft .NET Framework
    2.0.50727.3603
    Operating System
    5.1.2600
    Should Server Reporting Services be included in this version?  I think so!!!
    Under Start > Programs > Microsoft SQL Server 2008 > Configuration Tools > Reporting Services Configuration Manager, I see this:
    Connect to a report server instance:
    Server Name: 
    Report Server Instance: 
    My server name is ‘'EXCEL-4J2W8KYNP', which I got from Control Panel > System Properties > Computer Name > Full Computer Name;
    However, when I put that server name in the box, and hit ‘Find’ I get this message: ‘Report Server WMI Provider error’ Invalid namespace
    Details: Invalid Namespace.
    I have no idea what this means…
    Thanks for everything!
    Ryan---

  • Wwv_flow_item.popupkey_from_query in combination  SQL updateable report

    Hi,
    I found out that wwv_flow_item.popupkey_from_query in combination 'SQL updateable report' does not work. It does not display the popup. It creates a extra column with the message below.
    In combination with 'SQL query' it works. Is it possible to make it work in combination with updatable reports? If so can you tell me how?
    Thanks in advance,
    Patrick
    Message:
    <NOSCRIPT>JavaScript not supported</NOSCRIPT><SCRIPT LANGUAGE="JavaScript1.1"> <!-- Comment out script for old browsersfunction genList0_f05_0() {           w = open("wwv_flow_utilities.gen_popup_list" +                       "?p_filter="  +                       "&p_name=" + escape('f05') +                       "&p_element_index=" +  escape ('0') +                       "&p_hidden_elem_name=" + escape('f04') +                       "&p_form_index=" + escape('0') +                       "&p_max_elements=" + escape('') +                       "&p_escape_html=" + escape('') +                       "&p_ok_to_query=" + escape('YES') +                       "&p_flow_id=" + escape('2648') +                       "&p_page_id=" + escape('8') +                       "&p_session_id=" + escape('276014029277327813') +                       "&p_eval_value=" + escape('') +                       "&p_return_key=YES" +                       "&p_translation=" + escape('NO') +                       "&p_lov=select+short_name,+id+from+rio_reps",                       "winLov",                       "Scrollbars=1,resizable=1,width=400,height=450");           if (w.opener == null)             w.opener = self;           w.focus();         }//--> </SCRIPT><div nowrap><INPUT TYPE="hidden" NAME="f04" VALUE="" id="0" ><INPUT TYPE="hidden" NAME="p_arg_names" VALUE="0"><INPUT TYPE="text" NAME="f05" id="0" disabled onfocus="this.blur()" ><IMG SRC="/i/list.gif" alt="LIST" border="0" align=bottom></div>

    you're seeing that error because those project marvel updatable report regions expect a regular query that they then turn into an updatable report for you at runtime. you're kind of confusing things when you try to provide it with your own calls to wwv_flow_item in there. the way to really take control of the way your updatable report will render is to code it as a regular report region in which you make your own wwv_flow_item calls. an easy way to generate that region code would be to step through our updatable report wizard and let marvel do it for you. the first screen of that updatable report wizard presents you with the option of having the flow builder "Use flows built in updatable query page process" or "Generate PL/SQL logic directly into page process". if you use this second option, your resulting query will have those calls to the wwv_flow_item package in it. so let's say you step through the wizard to generate an updatable report for the SCOTT.EMP table. you'd probably get something like this...
    select
    wwv_flow_item.hidden(1,EMPNO)||
    wwv_flow_item.text(2,EMPNO) EMPNO,
    wwv_flow_item.text(3,ENAME) ENAME,
    wwv_flow_item.text(4,JOB) JOB,
    wwv_flow_item.text(5,MGR) MGR,
    wwv_flow_item.text(6,HIREDATE) HIREDATE,
    wwv_flow_item.text(7,SAL) SAL,
    wwv_flow_item.text(8,COMM) COMM,
    wwv_flow_item.text(9,DEPTNO) DEPTNO
    from #OWNER#.EMP
    ...as your query in that report region. you could then tweak your wwv_flow_item calls to generate other item types like so...
    select
    wwv_flow_item.hidden(1,EMPNO)||
    wwv_flow_item.text(2,EMPNO) EMPNO,
    wwv_flow_item.text(3,ENAME) ENAME,
    wwv_flow_item.textarea(4,job) JOB,
    wwv_flow_item.text(5,MGR) MGR,
    wwv_flow_item.date_popup(4, null,HIREDATE) HIREDATE,
    wwv_flow_item.text(7,SAL) SAL,
    wwv_flow_item.text(8,COMM) COMM,
    wwv_flow_item.popupkey_from_query (1,deptno,'select dname, deptno from dept') DEPTNO
    from #OWNER#.EMP
    ...so now you'd have the an updatable report that used a date picker, a text area, and a popup key LOV as opposed to the one with straight text areas that was generated by default. take a look at the docs for the wwv_flow_item api at http://marvel.oracle.com/pls/otn/f?p=4200:58 to see just how much control you'd have.
    hope this helps,
    raj

  • [DW 8.02 + PHP] how to use variables in advanced SQL queries

    Hi all,
    I can't find a way to use variables in an SQL query after
    updating
    dreamweaver 8.02.
    I always get error messages that says: 'missing variable
    type:myvariablename', undefined#myvariablename... and so on.
    What is the correct way to use variables?
    I usually set a variable in a PHP statement (example: <?
    $today=date('Y-m-d'); ?>)
    and then I compare this variable in the SQL query.
    What is the correct syntax for variable in DW 8.02 in
    advanced SQL
    queries?
    TIA
    tony

    sweetman wrote:
    > I'm editing a website created with DW 8.01 and MX
    Kollection.
    >
    > I updated DW to 8.02 and now I can't edit an existing
    SQL query.
    > I always get an error message 'Missing variable type'
    and I can't go
    > on.
    InterAKT released a new version of Kollection to cope with
    the 8.0.2
    changes. AFAIK, you should be able to download the updated
    version from
    your InterAKT account area.
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Correct Way to Look at ROWID value

    I found some sql and modified it that is suppose to allow you to look at the ROWID info of a table
    Can someone tell me why this does not work and what would be the correct way to get the info based on the ROWID ?
    Evertyime I generate the ROWIDs and try to enter one into the second SQL statement, I get nothing back
    Example:
    prompt
    prompt ******************
    prompt V$Session/DBA_Objects - Create RowIDs
    prompt ******************
    prompt
    select
         s.sid,
         s.terminal,
         do.object_name,
         row_wait_obj#,
         row_wait_file#,
         row_wait_block#,
         row_wait_row#,
         dbms_rowid.rowid_create ( 1, ROW_WAIT_OBJ#, ROW_WAIT_FILE#, ROW_WAIT_BLOCK#, ROW_WAIT_ROW# ) rowid_created
    from
         v$session s,
         dba_objects do
    where
         s.ROW_WAIT_OBJ# = do.OBJECT_ID
    order by
         s.sid;
    prompt
    prompt ******************
    prompt Get ROWID Info
    prompt ******************
    prompt
    select * from &table_select where rowid = '&rowid_created';
    Any assistance would be appreciated
    Thanks
    Jim

    Hi Miguel
    well i am using thread based processes into oracle and some of my users are getting CGI timeouts or else getting tired of waiting and trying to do the same task again through my web app so they try it again causing a lock problem
    I can see what is being locked down to the table but i wanted to know what data is being locked when trying to get updated, so i thought i could use the ROWID to look at the entry
    Thanks
    Jim

  • SQL Query report - how to evaluate the current sort column?

    Hi,
    I have a need to determine which column has been selected to sort the current report by. I need to pull this column name and pass it when a button is pressed so that the ensuing PDF report generated using PLPDF will be able to sort the data the same way.
    thanks in advance.

    Hi,
    As i think, you need to create report manually using SQL query and for sorting you can put a drop down box and user can select a field name and shorting type that is ASC or DESC from another drop down and than generate a report, additionally you can have another button for exporting to PDF that you can now manage through PLPDF and you can get the shorting column.
    hope this can help you.
    Thanks,
    Jaydip

  • Correct way to un-expired applsyspub user

    Dear all,
    system
    OUL5x64
    DB 11.1.0.7
    EBS r12 12.1.1
    not sure why APPSSYSPUB was expired. What is the correct way to un-expired this user.
    FNDCPASS or sqlplus>
    now when running adadmin connect as system it would not take the system password.
    Thanks in advance.
    Regards,
    T
    SQL> select USERNAME, LOCK_DATE , EXPIRY_DATE,account_status
    2 from dba_users
    3 where USERNAME = 'APPLSYSPUB';
    USERNAME LOCK_DATE EXPIRY_DATE
    ACCOUNT_STATUS
    APPLSYSPUB 01-OCT-10
    EXPIRED(GRACE)

    Hi,
    Please see (How can the Applsyspub Password Expire? [ID 605570.1]).
    Alter the profile as per (403-Forbidden Error Accessing Forms on E-business Suite (fnd_icx_launch) [ID 556761.1]) to avoid having this user locked (the same applied for APPS and APPLSYS users).
    Thanks,
    Hussein

  • Modifying the sql

    Post Author: rdorris
    CA Forum: .NET
    I'm creating a report against a MS SQL2005 server and have the need to change the sql command that's created by Crystal at run time. Some of the joins will need to change from inner to outer which seems easy to do using the TableLinks objects. However, when changed to a left outer join, I also need to add a few more selection criteria to the "on" phrase. Is there a way to do that via code? In other words, in the sql code "left outer join t2 on t1.id=t2.id" I need to add " and t2.username='rick' ". Not finding a way via code to modify the sql....
    The other option is to use a command, but I'm not finding the appropriate class to set the sql at run time either.
    Is filling a dataset and sending that to crystal the better/easier way to handle these issues?
    Thanks for the help!

    Post Author: OzgeYilmaz
    CA Forum: .NET
    hi. I am in the same situation now.. I just want to set filter in the JOIN clause, rather than the WHERE clause. did you resolve this problem.
    I tried to edit my left table datasource in code by using SetDataSource method of table object. when I watch from SQL profiler I saw that the sql which I used to setdatasource of table is executed for several times.
    please help.

  • Setting fields defined in SQL updateable report with a process

    I have SQL statement defined in a SQL updateable report with hidden fields. I want to be able to update these hidden fields with values from other displayed fields on the page. How do I reference these hidden items - I have referencign them as :my_field but get and error telling me thats its underfined.

    But, the reason I am doing this is because I want to format the page with 6 columns in one <TD> cell with some extra text and formatting etc - I don't want 1 column per <TD>. Thats why I am using the APEX_ITEM.TEXT so I can format the 1 <TD> the way I want it (with 6 columns it there).
    In the short term can you tell me how to reference hidden fields please.
    I will create the case in apex.oracle.com in the next few days to make it clearer.
    P.S. see my previous post: SQL QUERY updateable report with APEX_ITEM fields to update hidden columns

  • SQL Query report region that only queries on first load

    Hello all,
    Is there any way in which you can prevent a SQL Query report region from quering data after every refresh?
    I would like to make a report that queries on the first load, but then I would like to change the individual values, and reload to show the change, but every time I reload the page the columns are queried and the original values are displayed once again...
    any ideas?
    -Mux

    Chet,
    I created a header process to create the HTMLDB_COLLECTION. It is something like:
    HTMLDB_COLLECTION.CREATE_COLLECTION_FROM_QUERY(
    p_collection_name => 'Course_Data',
    p_query => 'SELECT DISTINCT COURSE_ID, HTMLDB_ITEM.CHECKBOX(14,COURSE_ID) as "checker", TITLE, SUBJECT, COURSE_NUMB, SECTION, ENROLLED, null as "temp_term", null as "temp_title", null as "temp_crse_id", null as "temp_subj", null as "temp_crse_numb", null as "temp_sect", FROM DB_TBL_A, DB_TBL_B, DB_TBL_C, DB_TBL_D, DB_TBL_E, DB_TBL_F WHERE ...');
    The names were changed, for obvious reasons.
    I then created an SQL Report Region to see if it would work. The SQL is:
    SELECT c001, c002, c003
    FROM htmldb_collections
    WHERE collection_name = 'COURSE_DATA'
    When I run the page it says:
    ORA-20104: create_collection_from_query Error:ORA-20104: create_collection_from_query ExecErr:ORA-01008: not all variables bound
    Any idea why this is happening?
    I'm new to HTMLDB_COLLECTIONS, so I may be doing something wrong
    -Mux

Maybe you are looking for