Using Sql Result and Limit Value in Prompt OBIEE 11.1.1.5

Dear Gurus,
I have prompt hierarchy like this:
Year
Quarter
Month
Which are using limit value (Quarter depend on Year, Month depend on Quarter), but I have issue because appear null also in those prompt
I have checked my database, view, repository there are not null.
My questions is, how to remove null in prompt when sql result can't use together with limit value, I don't know how to remove it using column filter.
NB:I already using presentation variable in sql result in order to remove null and using constraint, but it show nothing in prompt view unless we press apply button.
So I don't use this
Please help, kindly appreciated
JOE
Edited by: JoeSSI on Mar 27, 2012 2:03 AM

Hi,
Can you edit your prompt here you can find show option then select SQL Result please modify statement like below.
SELECT your column name FROM subject area where your column name is not null
Go--> Edit your prompt--> Show--> Select Sql result---> change statement like above.
Second way.
Go to physical layer then double click your column name here you can find *"nullable"* option please check that.
Go--> Physical Layer--> Extract table --> select your column name-->double click your column name--> here you can find option like Nullable please check it.
Award points it is useful.
Thanks,
Satya

Similar Messages

  • Using a Sql Result in Default Value of Dashboard Prompt

    Hi,
    I Create a Dashboard Prompt, this have two dates, the initial and the last for a period to filter. I need to set the default value in the fist and last date of the previous month, for example, if today is 20th of november the default value of initial date has been 1th of October and the last date has been 31th of october.
    I used in default the option 'SQL Results' and use the next sentences:
    SELECT TRUNC(add_months(sysdate, -1), 'MM') FROM dual;
    SELECT TRUNC(last_day(add_months(sysdate, -1))) from dual;
    But when I try to use the dashboard prompt the result is:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <(>: Syntax error [nQSError: 26012] . (HY000)
    SQL Issued: SELECT TRUNC(add_months(sysdate,-1),'MM') FROM dual
    When I try to use only select sysdate from dual; the result is:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27004] Unresolved table: "dual". (HY000)
    Thanks for your help.

    Thanks for your help. Finally I solve this issue of
    this form:
    1. I Create a Initialization Block with the next
    sentences:
    SELECT TRUNC(add_months(sysdate, -1), 'MM')
    INITIAL_DATE ,TRUNC(last_day(add_months(sysdate,
    -1))) END_DATE, To_char(TRUNC(add_months(sysdate,
    -1), 'MM'), 'YYYYMM') PERIOD FROM dual;
    2. Then I Create three Repository Variables and
    assign the Initialization Block to this
    3. In the Dashboard Prompt I use the "Server
    Variable" Option in the default and call the three
    variables.
    Thanks again
    EdwinHi: How u access server variable with two fields of date. Actually, I am doing the same work. But I can not do this work. Because this is ok when the date is greater than or less than. When i use between, in default server variable button did not show any text area for reoository variable. I also made initailization block with 2 fields.
    My Task is, I have to initialize the one date coloumn. From Date: and To Date. Pluzz help me in section
    Ali Haroon Nawaz

  • Restrictions for using sql commands and operators in loader control file

    Hi ,
    It suppose that there is a lot of restrictions and limitations when using sql commands and operators in the loader control files, same as it seems I cannot use (or) when with case statement, also it seems there is certain length for the case,
    So guys, what are the common limitations and restrictions to be avoided in the loader control file ?
    Your efforts are highly appreciated
    Ash

    Hi Ash,
    if you need to do more complicated logic its better to define the file to be loaded as an external table. You can then use any sql function you like against the external table rather than messing around with what you can and can;t do in a sqlldr control file.
    You can use the external_table option of sqldr to generate the definition.
    Regards,
    Harry
    http://dbaharrison.blogspot.com/

  • Using SQL*Loader and UTL_FILE to load and unload large files(i.e PDF,DOCs)

    Problem : Load PDF or similiar files( stored at operating system) into an oracle table using SQl*Loader .
    and than Unload the files back from oracle tables to prevoius format.
    I 've used SQL*LOADER .... " sqlldr " command as :
    " sqlldr scott/[email protected] control=c:\sqlldr\control.ctl log=c:\any.txt "
    Control file is written as :
    LOAD DATA
    INFILE 'c:\sqlldr\r_sqlldr.txt'
    REPLACE
    INTO table r_sqlldr
    Fields terminated by ','
    id sequence (max,1) ,
    fname char(20),
    data LOBFILE(fname) terminated by EOF )
    It loads files ( Pdf, Image and more...) that are mentioned in file r_sqlldr.txt into oracle table r_sqlldr
    Text file ( used as source ) is written as :
    c:\kalam.pdf,
    c:\CTSlogo1.bmp
    c:\any1.txt
    after this load ....i used UTL_FILE to unload data and write procedure like ...
    CREATE OR REPLACE PROCEDURE R_UTL AS
    l_file UTL_FILE.FILE_TYPE;
    l_buffer RAW(32767);
    l_amount BINARY_INTEGER ;
    l_pos INTEGER := 1;
    l_blob BLOB;
    l_blob_len INTEGER;
    BEGIN
    SELECT data
    INTO l_blob
    FROM r_sqlldr
    where id= 1;
    l_blob_len := DBMS_LOB.GETLENGTH(l_blob);
    DBMS_OUTPUT.PUT_LINE('blob length : ' || l_blob_len);
    IF (l_blob_len < 32767) THEN
    l_amount :=l_blob_len;
    ELSE
    l_amount := 32767;
    END IF;
    DBMS_LOB.OPEN(l_blob, DBMS_LOB.LOB_READONLY);
    l_file := UTL_FILE.FOPEN('DBDIR1','Kalam_out.pdf','w', 32767);
    DBMS_OUTPUT.PUT_LINE('File opened');
    WHILE l_pos < l_blob_len LOOP
    DBMS_LOB.READ (l_blob, l_amount, l_pos, l_buffer);
    DBMS_OUTPUT.PUT_LINE('Blob read');
    l_pos := l_pos + l_amount;
    UTL_FILE.PUT_RAW(l_file, l_buffer, TRUE);
    DBMS_OUTPUT.PUT_LINE('writing to file');
    UTL_FILE.FFLUSH(l_file);
    UTL_FILE.NEW_LINE(l_file);
    END LOOP;
    UTL_FILE.FFLUSH(l_file);
    UTL_FILE.FCLOSE(l_file);
    DBMS_OUTPUT.PUT_LINE('File closed');
    DBMS_LOB.CLOSE(l_blob);
    EXCEPTION
    WHEN OTHERS THEN
    IF UTL_FILE.IS_OPEN(l_file) THEN
    UTL_FILE.FCLOSE(l_file);
    END IF;
    DBMS_OUTPUT.PUT_LINE('Its working at last');
    END R_UTL;
    This loads data from r_sqlldr table (BOLBS) to files on operating system ,,,
    -> Same procedure with minor changes is used to unload other similar files like Images and text files.
    In above example : Loading : 3 files 1) Kalam.pdf 2) CTSlogo1.bmp 3) any1.txt are loaded into oracle table r_sqlldr 's 3 rows respectively.
    file names into fname column and corresponding data into data ( BLOB) column.
    Unload : And than these files are loaded back into their previous format to operating system using UTL_FILE feature of oracle.
    so PROBLEM IS : Actual capacity (size ) of these files is getting unloaded back but with quality decreased. And PDF file doesnt even view its data. means size is almot equal to source file but data are lost when i open it.....
    and for images .... imgaes are getting loaded an unloaded but with colors changed ....
    Also features ( like FFLUSH ) of Oracle 've been used but it never worked
    ANY SUGGESTIONS OR aLTERNATE SOLUTION TO LOAD AND UNLOAD PDFs through Oracle ARE REQUESTED.
    ------------------------------------------------------------------------------------------------------------------------

    Thanks Justin ...for a quick response ...
    well ... i am loading data into BLOB only and using SQL*Loader ...
    I've never used dbms_lob.loadFromFile to do the loads ...
    i 've opend a file on network and than used dbms_lob.read and
    UTL_FILE.PUT_RAW to read and write data into target file.
    actually ...my process is working fine with text files but not with PDF and IMAGES ...
    and your doubt of ..."Is the data the proper length after reading it in?" ..m not getting wat r you asking ...but ... i think regarding data length ..there is no problem... except ... source PDF length is 90.4 kb ..and Target is 90.8 kb..
    thats it...
    So Request u to add some more help ......or should i provide some more details ??

  • How to use dynamically column_name and column_name value in plsql procedure

    hi,
    how to use dynamically column_name and column_name value in plsql procedure.
    for example, i have one table with column col1.i want write plsql code with dynamically execute the insert one schema to another schema.
    by
    siva

    DECLARE
    CURSOR C
    IS
    SELECT cc_cd
    FROM TEMP1 WHERE s_flg ='A' AND b_num IN('826114');--,'709537','715484');
    CURSOR D
    IS
    SELECT * FROM cONSTRAINTS_test ORDER BY SRL_NUM;
    STMT VARCHAR2(4000);
    p_target_schema VARCHAR2(30):='schema1';
    p_source_schema VARCHAR2(30):='schema2';
    BEGIN
    FOR REC IN C
    LOOP
    FOR REC1 IN D
    LOOP
    STMT := 'INSERT INTO '||p_target_schema||''||'.'||''||REC1.CHILD_TABLE||' SELECT * FROM '||p_source_schema||''||'.'||''||REC1.CHILD_TABLE||' where '||REC1.COLUMN_NAME||'='||REC.cntrct_cd||'';
    Dbms_Output.Put_Line('THE VALUE STMT:'||STMT);
    END LOOP;
    END LOOP;
    END;
    cc_cd='434se22442ss3433';
    cc_t_ms is parent table-----------------------pk_cc_cd is primary key
    cc_cd is column name
    CONSTRAINTS_test table
    CHILD_TABLE NOT NULL VARCHAR2(30)
    CONSTRAINT_NAME NOT NULL VARCHAR2(30)
    COLUMN_NAME NOT NULL VARCHAR2(400)
    R_CONSTRAINT_NAME VARCHAR2(30)
    CONSTRAINT_TYPE VARCHAR2(1)
    PARENT_TABLE NOT NULL VARCHAR2(30)
    SRL_NUM NUMBER(4)
    CHILD_TABLE     CONSTRAINT_NAME     COLUMN_NAME     R_CONSTRAINT_NAME     CONSTRAINT_TYPE     PARENT_TABLE     SRL_NUM
    a aaa cc_CD     pk_cc_CD     R     cc_t_MS     1
    bb     bbb      Cc_CD     PK_CC_CD     R     cc_t_MS     2
    bb_v     bb_vsr     S_NUM     PK_S_NUM      R     bb_v      3
    cC_HS_MS     cc_hs_CD     cc_CD     PK_CC_CD     R     cc_t_MS     4
    cC_HS_LNK cc_HIS_LNK_CD     H_CD     PK_HS_HCD     R     cC_hs_ms 5
    cC_D_EMP     cc_d_EMP     Cc_CD     PK_CC_CD      R     cc_t_MS     6
    i want insert schema1 to schema2 with run time of column_name and column value.the column_name and values should dynamically generated
    with refential integrity.is it possible?
    can any please quick solution.its urgent
    by
    siva

  • Prompt using SQL Results with row-wise session variable comparison

    I have a prompt on Department and I only want the departments to show that have been authorized via a session variable for that user. The session variable can return can return multiple values and is set as row-wise. The session variable is returning results and have been used successfully in an application filter.
    I'm trying to put the correct SQL statement and this syntax doesn't work:
    SELECT "Department"."Department Code" 
    FROM "UBC Financials - YTD Table"
    WHERE  "Department"."Department Code" = '@{DEPT_LIMITS}'
    Can someone give me an example that does work?
    Thanks,

    Try something like WHERE  "Department"."Department Code" = VALUEOF(NQ_SESSION."DEPT_LIMITS")
    or else filter on department and then hit on add then Session variable
    ~ http://cool-bi.com

  • Using Presentation variables in Prompt Default using SQL Results.

    I have set a presentation variable in a prompt(say 1st prompt). In the 2nd prompt, using default option, when I try to reference this variable in SQL Results, I get this error.
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <@>: Syntax error [nQSError: 26012] . (HY000)
    The syntax used for SQL is:
    SELECT <tab>.<col1> FROM <subject area> WHERE <tab>.<col2> = @{variables.myvar}
    Note: However the same SQL works fine in SHOW option.
    Thanks in advance..
    Edited by: user457687 on Feb 27, 2009 3:13 PM
    Edited by: user457687 on Feb 27, 2009 4:49 PM

    - OK. In the second prompt, instead of setting Default to SQL Results, set it to Specific Value.
    - Then insert '{pres_var}' in the window. I got it to work this way.
    - It supplied the PV as the default in the second prompt after hitting "Go" on the first prompt.
    Hi, thanks for your suggestion but I don't need to have the value of the presentation variable itself as the prompt default. The variable is a filter for a specific SQL clause and the default is the result of this SQL.
    Cheers
    DrPlexi

  • SQL*Loader and timestamp values

    I'm loading timestamp values (among other data) from a text file into Oracle using SQL*Loader.
    The data I load is formatted like the following:
    2008/11/13 23:55:21.366
    2008/11/13 23:55:22.782
    2008/11/13 23:55:25.879
    Hence my control file look like this:
    TSTAMP TIMESTAMP "YYYY/MM/DD HH24:MI:SS.FF",
    The timestamp data in the input file are in UTC, however I load into a column that is of type "TIMESTAMP(3)", i.e. in server time. This is on purpose. I do not want the data to be in UTC when I look at them.
    Therefore after the load I have to manually do
    UPDATE mytable
    SET tstamp = tstamp + (tstamp - sys_extract_utc(tstamp));
    This update-after-loading actually takes quite some time due to the amount of records. I would like to avoid it and instead do it as part of the load. Is this possible somehow?
    I'm on Oracle 10.2.
    Thanks.

    Hi
    What about setting a special Time Zone in your database?
    You have two options when setting which time zone the database belongs to. You can either qualify it as a displacement from GMT/UTC in the format of 'hh:mm' or you can specify it as a name that has an entry in the V$TIMEZONE table.
    select tzname,tzabbrev from V$TIMEZONE_NAMES;
    select DBTIMEZONE from dual;
    ALTER database SET TIME_ZONE = 'Denmark/Copenhagen';
    select SESSIONTIMEZONE from dual;
    select CURRENT_TIMESTAMP from dual;
    See that link
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/create.htm#sthref319
    Edited by: Hub on Dec 7, 2008 3:58 PM

  • How to use SQL OVER and PARTITION BY in OBIEE Expression Builder??

    Hi there,
    I want to create a new logical coulmn with the following SQL query.
    SUM(Inventory Detail.Qty) OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C,Inventory Detail.D,MyDATE )/SUM(Inventory Detail.Qty) OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C )
    How to use the OVER and PARTITION BY in OBIEE Expression Builder??
    Thanks in Advance

    hi bipin,
    We cant use by in Expression builder(rpd) .But use the same formula like this in Fx of answers
    SUM(Inventory Detail.Qty) OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C,Inventory Detail.D,MyDATE )/SUM(Inventory Detail.Qty) >OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C )SUM(Inventory Detail.Qty by Detail,ITEM,Mydate)/SUM(qty by detail,item)
    First check the numerator whether it was giving correct results or not then go with denominator
    compare the results with sql that u have
    Let me know if that does work
    thanks,
    saichand.v
    Edited by: Saichand Varanasi on Jul 27, 2010 9:27 PM
    Edited by: Saichand Varanasi on Jul 27, 2010 9:28 PM

  • Javax.servlet.jsp.jstl.sql.Result and arraylist

    Hi,
    I try to explain my problem, I have posted in another section of forum, but perhaps this is a better place:
    I'm trying to use MVC model, so I call an EJB from a servlet which returns me a javax.servlet.jsp.jstl.sql.Result object (this derive from a resultset of a query) and then I make this available to a jsp page.
    I've choosen to return an javax.servlet.jsp.jstl.sql.Result object because I'd like to use this syntax:
    <c:forEach var="profiloString" items="${listaProfili}" >
              ${profiloString.anything}
    </c:forEach>Now I need to put my listaProfili object in session and permit users of my application to add and delete items from it. Finally I will update my database with the new data from listaProfili object.
    If listaProfili is an arraylist I can easily add or delete item from it, but if it is a javax.servlet.jsp.jstl.sql.Result I don't know how I can do this.
    If I return an arraylist object instead of an javax.servlet.jsp.jstl.sql.Result object, I can't use "<c:forEach ..." syntax.
    Can anyone help me?
    Thanks.

    So why didn't you think that the JSP forum here wasn't a good place to ask JSP questions like this one?
    You can use <c:for-each> with a List. That's how it's designed. I don't understand why you say you can't. Perhaps you were confused by the SQL tags in JSTL. But anyway, you should just return a List from your EJB and forget about using obscure internal JSP classes.

  • Using SQL Developer and IPC connection

    SQL Dev 1.0.0.15 on Windows XP
    On the windows PC I am run SQL Dev on I have a Listener & tnsnames setup to use an IPC connection. I did not have the listener setup to use a protocol of TCP. The connection to the db worked fine via sql+. Also I have toad on this PC and it worked just fine via the IPC connection.
    I installed SQL Dev and tried to use the IPC connection. It did not work. I kept getting the message of "unable to access the network adapter" or something close to that. The message made sense as an IPC connection does not use the Network or Network adapter.
    I ended up setting up the listener to listen for both IPC and TCP and SQL Dev worked.
    My question is does SQL Dev use only the JDBC thin driver as it is my understanding the thin driver must use TCP. And is there a method to allow SQL Dev to use an IPC connection.
    Here is my currect listener and tnsnames. SQL Dev I simple listed the parms to connect via TCP in the basic tab of the connection dialog.
    listener=
    (description=
    (address_list=
    (address=(protocol=tcp)(host=localhost)(port=1521))
    (address=(protocol=ipc)(key=to2))
    sid_list_listener=
    (sid_list=
    (sid_desc=(sid_name=to2)))
    tnsnames:
    to2.world =
    (description =
    (address = (protocol=ipc)(key=to2))
    (connect_data = (sid=to2)))
    Thanks

    As packaged, sql dev uses the thin driver.
    I believe that it is possible to dump the thick driver in its place (most likely in jdbc/lib) and use that with the advanced connection tab. I have yet to see anyone submit instructions on how to do it, so I am not of much help beyond saying that it is possible.

  • Error message using SQL import and Export Wizard with Excel spread sheet

    I am trying to import an Excel spreadsheet using the Import export wizard that is provided with SQL 2014.  
    Everything seems to set up OK but then when I go to do the transfer "error message" comes up saying:
    External Table is not in the expected format.(Microsoft Jet Database Engine).   
    This is a spreadsheet and there is no database, that is why I want to import it into a database!!  So the reference to JET is a tad disappointing.
    So why the error and how do I fix the problem?
    As there are over 100 variables in the spread sheet rows, it would be great to have this automatically create the database and populate the fields.
    I am using SQL 2014  Express and Office Excel 2013.
    Thank you in  advance for taking the time to read this, and hopefully sheading some light on the issue.

    Hi AWlcurrent,
    When import a .xlsx file to SQL Server using SQL Server Import and Export Wizard, you see a “External Table is not in the expected format.(Microsoft Jet Database Engine).” error message. This error message seems that the Microsoft JET Database Engine is
    unable to handle something that is contained in the file.
    So please make sure there is no unsupported content in the Excel file. Alternatively, we can use ‘Microsoft Excel’ as the Data Source, then Select ‘Microsoft Excel 2007’ as the Excel version to import the excel file.
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • How to call a stored procedure on time basis with out using sql job and GOTO

    Hi,
       I wanted to call a stored proc, on time basis ,
    please tel me how it can be done with out using sql job , goto .
    1) That is, is there any timer aviable in sqlserver.
    q2) And which one is better GOTO or sql job.
    yours sincerley

    Raj, Check if my explanation helps you:
    Your job runs every 10 seconds.
    Lets say first time you are scheduling and running your job at 12:00:00 PM
    Now your proc will start executing.
    Say it got finished at 12:00:07.
    Now the next schedule time is 12:00:10 PM.
    The moment this time hits, the job will get invoked and start executing the proc.
    Lets say this time it finished at 12:00:22 PM (It took 2 extra seconds)
    This time the scheduled time is already gone (12:00:20 PM), thus it'll now run at the next schedule that is 12:00:30 PM.
    Thus if anytime your job takes more than 10 seconds to run, it'll just miss those particular schedules overlapping with execution time. Otherwise you are good to go. 
    PS: A job is the best way to handle this, in your problem statement you don't need a job but that would be wrong. You have another way to do that, if you keep running your procedure all the time and the moment your timestamp hits a multiple of 10
    seconds you can run your logic and then returning to the timer. But this is extremely wrong for a system. Even if your requirement is extremely transactional and complex, I would not suggest this. If the job is taking more than 10seconds (which it might if
    your logics inside are complex), you should optimize your code and table architecture.
    Chaos isn’t a pit. Chaos is a ladder. Many who try to climb it fail and never get to try again. The fall breaks them. And some are given a chance to climb, but they refuse. They cling to the realm, or the gods, or love. Illusions. Only the ladder is real.
    The climb is all there is.

  • BAPI Structure populating using field name and field value frm internal tbl

    Hi Experts,
                     Need your help, my requirement is to populate BAPI import structure using its field name and filed value  stored in a internal table.  Please advise the best approach.
    Regards
    Ram.

    Hi, in an ABAP program you can make use of FIELD-SYMBOLS and the ASSIGN statement for filling the BAPI fields based on the fieldname found in the internal table. Hopes it answer your question. Succes

  • Dimension build using SQL table and process to fill the SQL table

    I have a dimension in a cube that is manually* built by one of our power users. Now I have to get all the member information of that dimension into a SQL table(example : with columns...level0,level0property,level1,level1property etc....) to use that table in STUDIO for member load.
    Is there any easy process to do this? Currently I am building each and every row manually in that SQL table and there are 1100+ members in that manually built dimension. Please advice.

    Thank you so much Glenn!! That worked!! You make our lives so much easier!!

Maybe you are looking for