Stupid question: getting sysdate into repository variable (11g)

Hi, I'm having a complete brain fade and can't figure out how to select current sysdate into a dynamic repository variable. I've done the following:
1. Created init block
2. Set data source to the connection pool from one of my Oracle databases
3. Set the default database string to "select trunc(sysdate) from dual"
4. Created a dynamic variable STP_TODAY with default initializer of DATE '1900-01-01'
5. Check in and save the RPD
When I go into answers, I can see the variable, but it's always getting the 1900-01-01 date. Obviously I'm doing something dumb - can someone help?
Thanks!
Scott

This is related to presentation server Cache.
Bypass the Presentation server Cache with the following steps:
1. In Answers go to Advanced tab and select the "Bypass Oracle BI Presentation Services Cache" box for the report.
2. At the lower end of the page, you have a box name "prefix", add the below text in it,
"SET VARIABLE DISABLE_CACHE_HIT=1;"
3. Save the report.
Check now, this hopefully should help..
Regards,
Kiran

Similar Messages

  • Getting sysdate in a variable

    hi,
    how can i get the current sysdate in a repository variable so that i can use that variable in answers and filter my data according to that..
    Thanks

    copter,
    that should be pretty easy.
    If back end database is Oracle use SELECT SYSDATE FROM DUAL in your initilization block and populate the result to a variable (repository).
    If back end datavbase is SQL Server use SELECT GETDATE() in your initilization block and populate the result to a variable (repository).
    or google for repository variables, you will find tons of info.
    mark answers promptly
    J
    -bifacts
    http://www.obinotes.com

  • Get query into a variable

    Hi,
    See attached code.
    Now, when you would run this query (and if you've turned your
    CF debugger on), you would see the following in your browser under
    your SQL Queries section:
    select id_product, product_name
    from tbl_product
    where id_supplier in (1,2,3)
    and is_ordered_by = 'Telephone'
    In other words you can see what the query has processed
    exactly.
    Now, this is just a simple query that I took as an example.
    What I want to do is NOT to execute the CFQUERY.
    Instead, I want to store the processed part of the query i.e.
    select id_product, product_name
    from tbl_product
    where id_supplier in (1,2,3)
    and is_ordered_by = 'Telephone'
    into a variable.
    Is this possible?
    I've tried doing the following:
    <cfset querypart = "select id_product, product_name from
    tbl_product where id_supplier in (" & variables.supplierIDs
    & ") " & <CFIF variables.isElectronic eq 1>"and
    is_ordered_by = 'Electronic'"<CFELSE>"and is_ordered_by =
    'Telephone'"</CFIF>>
    But it's giving me an error "<".
    It's as if it can't process the <CFIF> inside the
    <cfset>
    Please advise.
    Thanks and regards,
    Yogesh Mahadnac

    You could set a session variable to the results of your
    query, then use that session variable as if it were a query:
    <!--- Query products --->
    <cfquery name="qProduct" datasource="db1">
    select id_product, product_name
    from tbl_product
    where id_supplier in (#variables.supplierIDs#)
    <cfif variables.isElectronic eq 1>
    and is_ordered_by = 'Electronic'
    <cfelse>
    and is_ordered_by = 'Telephone'
    </cfif>
    </cfquery>
    <!--- set session variable equal to query results --->
    <cfset session.querypart = qProduct>
    <!--- now list your "query" results using your session
    variable--->
    <cfoutput query="session.querypart ">
    #id_product# #product_name# <br>
    </cfoutput>
    Of course, once you use your results, you should set your
    session variable to NULL to clear the query.
    <cfset session.querypart = "">
    <edit> I believe that I misread your post, and thought
    that you wanted to store the result of your query, not the query
    itself.</edit>
    Phil

  • How to use Min function to get FileName into a Variable

    I was wondering how to use MIN function in Evaluate variable in package to get the first file name from the list(Datastore)
    With reference to Merging Flat Files into a single file Post number-4
    Thanx

    Hi Diwakar,
    That List data store should be table, than only it will gives the min of the filename string,
    If it is a file datastore, Min function does not works properly it will returns a first name in the file data store.
    so please, use an interface to upload the List filedatastore into some other temp table. From that table you can use variable to get Min value of file name.
    Thanks
    Madha

  • Trying to get sysdate- 2yrs and sysdate+2yrs value into variable

    Hi,
    iam Trying to get sysdate- 2yrs and sysdate+2yrs value into variable.But facing the following issue. Please help me out .
    Error :
    p_start_date := select add_months(max(sysdate), -24) from dual;
    ERROR at line 6:
    ORA-06550: line 6, column 25:
    PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
    ( - + case mod new not null <an identifier>
    <a double-quoted delimited-identifier> <a bind variable>
    continue avg count current exists max min prior sql stddev
    sum variance execute forall merge time timestamp interval
    date <a string literal with character set specification>
    <a number> <a single-quoted SQL string> pipe
    <an alternatively-quoted string literal with character set specification>
    <an alternat
    ORA-06550: line 7, column 3:
    PLS-00103: Encountered the symbol "P_END_DATE"
    Code
    declare
    p_start_date date;
    p_end_date date;
    begin
    select add_months(max(sysdate),-24) into p_start_date from dual;
    dbms_output.put_line('p_start_date' |p_start_date);
    dbms_output.put_line('p_end_date' | p_end_date);
    end;

    Hi, try:
    SQL> declare
      2 
      3  p_start_date date;
      4  p_end_date date;
      5 
      6  begin
      7 
      8  select add_months(sysdate,-24) into p_start_date from dual;
      9  select add_months(sysdate, 24) into p_end_date from dual;
    10 
    11  dbms_output.put_line('p_start_date: ' ||to_char(p_start_date, 'dd-mm-yyyy hh24:mi:ss'));
    12  dbms_output.put_line('p_end_date: '   ||to_char(p_end_date, 'dd-mm-yyyy hh24:mi:ss'));
    13  end;
    14  /
    p_start_date: 14-04-2007 17:41:34
    p_end_date: 14-04-2011 17:41:34
    PL/SQL procedure successfully completed.

  • Really stupid question - Migrating from 6i to 11g

    Hi all,
    I'm a developer that have been working with oracle since Forms 3, right now I use Forms 6i and I would like to know what I need to use Forms 11g. I understand this new environment is web based, but to start developing and deploying, what I need? for example if I buy the Oracle Forms & Report 11g, I also will need the OAS? or just with Forms and Report I could deploy (somehow) the application?
    Please don't flame me, I just want to understand how this works now.
    Best Regards

    As my old college profession used to say - "The only stupid question is the one that doesn't get asked!" Forms 11g only supports web deployment. This means you will need the OAS with the Forms and Reports Services installed as well. Typically, the setup is three tiered ( 1 server = Database, 1 server = Application Server, 1 server = Infrastructure server ). You don't have to set up the technology stack multitiered - all three could reside on the same server or you could have the all three on the same machine but is not recommended. I would at least have the database on a server seperate from OAS.
    Here are a few links to get you started.
    Oracle Documentation
    * Check out: Development Tools - Oracle Forms, Middleware - Applications Server - Oracle Fusion Middleware 11g and Middleware - Data Warehousing and Business Intelligence - Oracle Reports
    Since you will be upgrading from Forms 6i to 11g, be sure to visit the Oracle Forms-Upgrading Forms 6i to Forms 11g documentation.
    BTW, welcome to the forums!
    Craig
    If a response is helpful or correct, please mark it accordingly.
    Edited by: CraigB on May 6, 2010 2:09 PM

  • HT1347 I have movies on my Hard drive that I would like to add to my iPad how do I get them into iTunes to download to my iPad question mark

    I have movies on my Hard drive that I would like to add to my iPad how do I get them into iTunes to download to my iPad?

    READ the article from which the question was posted.  Then follow the instructions for importing content to iTunes on the computer.
    Once the content is in iTunes, connect the device, select the content desired to sync, and sync.

  • Reg:Getting error text from a channel into a file or into a variable

    Hi,
    Can we get the error text such as u201Cjava.lang.NegativeArraySizeExceptionu201D  from a communication channel into a variable or in the form of an xml message so that based on kind of error further processing can be done.
    Regards,
    Rahul

    You can decide further processing based on the data available in the mapping. If the value comes in the source field for a list element as you expected do UDF and return error as string and decide the mapping as per business need. I talk about something like enhanced interface determination. That's one way. Reading the error message from the communication channel and decide does not seem to be better option.

  • Mapping proc output to vars gets error extracting result into a variable of type (DBTYPE_UI2)

    Hi, we run std 2012.  I have a proc (sets nocount on) whose params r shown in the first block .   My execute ssis sql task mapping is shown in the block following that (same order as shown, the param sizes are all -1).  The variable
    characteristics and initial values are shown in the 3rd block.  The execute sql task command is
    exec usp_fileArrivalStatus ?,?,?,?,?,? output,? output,? output
    when I run the proc in ssms followed by a select on the output fields, I get stat 0, instance id -1 and file name empty string (aka tick tick aka '')
    The error is:
    [Execute SQL Task] Error: Executing the query "exec usp_fileArrivalStatus ?,?,?,?,?,? output,? ou..." failed with the following error:
    "An error occurred while extracting the result into a variable of type (DBTYPE_UI2)".
    Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
    Does anybody know what is wrong?
    CREATE PROCEDURE [dbo].[usp_fileArrivalStatus] @NewFilePattern varchar(500),
    @PkgName varchar (257),
    @appid int,
    @MsgHistCreateDate date,
    @messageFriendlyName varchar(500),
    @arrivalStatus int output,
    @instanceId bigint output,
    @fileName varchar(500) output
    VariableName Direction DataType ParamName
    User::TranFilePattern Input VARCHAR 0
    System::PackageName Input VARCHAR 1
    User::AppID Input SHORT 2
    User::todaysDate Input DATE 3
    User::TranFileArriveStatus OUTPUT SHORT 5
    User::TranFileInstanceId OUTPUT LARGE_INTEGER 6
    User::TranFileName OUTPUT VARCHAR 7
    User::TranFileFriendlyName Input VARCHAR 4
    User::TranFilePattern,string,tranfile05-Nov-2014
    User::fileDate,string,05-Nov-2014
    System::PackageName,
    User::AppID,int32,12
    User::todaysDate,DateTime, set by select getdate()
    User::TranFileArriveStatus,int32,0
    User::TranFileInstanceId,Int64,0
    User::TranFileName,string
    User::TranFileFriendlyName,string,Tran File

    I may have gotten past this.  The ui showed the first execution of that proc as the aborting component but when I looked at my error code (-1073548784), and component name in the
    message sent with notification email, I noticed the second component name.  It too executes that proc and still had ushort for appid in sql task mapping and long for instance id.  I changed these characteristics to match what I posted and got green
    on the seq container that runs both.
    I think I go thru this kind of adventure every time I try to map proc output to ssis vars.   

  • This is a stupid question but I needed to ask because I don't want to go there and not being able to buy it, but can I get the iPhone 5 brought straight there when I go to an apple store?

    This is a stupid question but I needed to ask because I don't want to go there and not being able to buy it, but can I get the iPhone 5 brought straight there when I go to an apple store?

    And I meant go to the apple store physically without preordering it online, and I meant the Southampton one. So could I just stroll in apple store and buy a iPhone 5 in Southampton apple store and buy the iPhone 5 straight away? Because I didn't want to have to wait? I just want to go in and buy it and go out with it, if you guys get what I mean? And felipeV if it is in stock could I just buy it and leave with my iPhone 5?

  • How to pass the repository variables in title view in obiee 11g

    all I am trying to create a reprot and the format of that report is
    TEST REPORT
    month range : 04/01/2012-04/30/2012.
    how can we get that date range in the title view.
    Any suggestions??

    Hi,
    For session variables:
    @{biServer.variables['NQ_SESSION.variablename' ]}
    For repository variables:
    @{biServer.variables['variablename']}
    Try this syntax in the title view it should work.

  • Stupid question: my top 'dock' is not displayed on the screen. How do I get it back and what is it called?

    Stupid question: my top 'dock' is not displayed on the screen. How do I get it back and what is it called? It's just annoying that I have to reach high for it!

    Menu bar. Are you in Full Screen Mode?
    OS X Mavericks: Take apps full screen
    In all apps?

  • KPI doesn't filter according to the repository variables- obiee 11g

    Hello all,
    I have created a KPI that contains the following dimensions:
    Year, Monthname, Trn_date
    I have also created some 3 repository variables:
    CurrentYearRepoVariable: holds current year (select to_char(trunc(sysdate, 'yyyy'),'yyyy') from dual)
    CurrentMonthRepoVariable: holds current month (select to_char(trunc(sysdate, 'mm'),'MONTH') from dual)
    and TodayRepoVariable: holds current day (select trunc(sysdate) from dual)
    I added the KPI in a KPI watchlist and added as filter for Year, Monthname, Trn_date the CurrentYearRepoVariable,  CurrentMonthRepoVariable and TodayRepoVariable accordingly.
    When I “analyze” the KPI I don’t see the results for the current day as if the filters are not correct. I can see from the repository that the variables have the correct values. I have also created an analysis where I applied the same filters and the result is the correct one. It seems that the KPI doesn’t seem to “see” the correct values of the variables. I have also tested with an agent and it doesn’t seem to work either.
    The OBIEE version is 11.1.1.6 .
    Can somebody help with this? How is it possible with the analysis to see the correct result but not with the KPI and agent?
    Thanks in advance,
    Konstantina

    Sorry I was wrong in my previous thread.
    Actually your approach is not correct, Product Number choose constraint that will show as per the selection of Product Name.
    Coming to default value for Product Number you are going for sql override that is okay but not work with variable, instead of setting default values for product number set that to product name.
    if not you need to go for 2 different prompts
    Prompt 1 Product Name hit GO
    Prompt 2 will work based on as you defined earlier with variables
    Hope this helps

  • HT204053 Stupid question, but how do I get to/access my iCloud?!

    Stupid question, but how do I get to/access my iCloud? All this time, I've been under the impression that every time I plug in &amp; lock my screen, things on my phone are backed up in my cloud, but I've never been able to find it to check! And, yes, I'm blonde! Please help me!

    You can't see the backup, all you can do is confirm that it was successfully completed.  To do this, go to Settings>iCloud>Storage & Backup and look at the very bottom under Back Up Now.  It will show the time/date of your most recent backup.  If you see this, you do have a backup in iCloud and can restore it to your device in the future if you ever need to.  (You also can't see any of the files in a backup, you can only restore it to your device.)

  • Assign sysdate into a string variable ?

    Hi
    How to assign a sysdate into a string variable.
    Pleae help me...
    Rgds
    Merlina

    Basically impossible, since the two things can reasonably be described as a "sysdate" -- either a long or a Date object -- aren't Strings.
    Also I suppose you could reformat them as a String. But there are a lot of ways you could do that (a String representation of the long, in decimal or hex or octal or any arbitrary base, or a Date formatted in any arbitrary way, etc.).
    What exactly do you want to do, and why?

Maybe you are looking for

  • Compressor 2 not working in FCP 5

    I'm having a problem with Compressor 2 and FCP 5. For the past several months, I had FCP 5 and Compressor 2 working on my 800ghz G4 Titanium powerbook. No problems. However, I needed to go back to FCP 4.5 for compatibility issues with other machines

  • How to clear the rows in a jTable

    Can anyone tell me how to clear the contents of all the rows in a jTable?

  • Latest Leopard and LR 1.3.1 back-up issue. Thoughts please.

    Hi All, Running the latest Leopard and LR 1.3.1. Transition to 1.3.1 went smoothly (or so it seams) But backing-up seems to be an issue. Upon opening LR and trying to back-up, I get a dialog box that states "Lightroom is unable to back-up catalog, do

  • Where is the authorize computer on itunes?

    i went to itunes store but dont see any where where it says authorize computer

  • Why No Tif Thumbnails?

    I've just switched from using Lightroom for cataloguing my photos to Bridge (via Photoshop ES5).  Incoporating the same Windows 7 "My Pictures" contents, I get thumbnails in Bridge for my RAW files but not for my TIF files.  Has anyone any explanatio