Expression for default data

I'm trying to retrieve a file that is in the following format xxxxxxx_xxxxxx.YYYYMMDDHHMISS. I can't retrieve the file with the following sql command in the parameter "Expression for default for data" as
to_char(sysdate,'YYYYMMDDHHMISS') because my command is looking for a file that is transferred at that exact time, down to the second.  I could pick up the file if it was named xxxxxxx_xxxxxx.YYYYMMDD and I used the command to_char(sysdate,'YYYYMMDD').  I can't use a wait event to pick up the file, because there is no scheduler associated with this server.  When I try to use the wildcard * it cancels with an error and returns the name xxxxxx_xxxxxxx.YYYYMMDD*.
Do you know a command I could use in the "Expression for default for data" that would pick up the file in the following format: xxxxxxx_xxxxxxx.YYYYMMDDHHMISS.
Thanks,
Isaac Bonds

Hi Isaac,
Well, the wait event obviously is the easiest, then you have the exact file name available from the event, even hours later still. But this does require a scheduler to be installed on that server indeed.
Given you do not use an event, how do you trigger this job now ? Do you use a polling mechanism ?
And what about the other side that is creating the file: can they send you an event or trigger file containing the actual file name that needs to be processed ?
Regards,
Anton Goselink.

Similar Messages

  • Pl/sql expression for default value

    I'm trying to run this simple script as a default value using pl/sql expression, but I keep getting this error. THe select statement itself works fine as a sql statement source value, but will not work as a pl/sql exression as a default value. This (:P33_SYSUSERID_CREATED_BY ) is the field name on the form. Any ideas?
    begin
    select a.id || ', ' || A.NAME_LAST into :P33_SYSUSERID_CREATED_BY from S_USERSV a where a.name_last = 'HAMMAKER';
    end;
    Error ERR-9132 Error in PLSQL expression for item default code, item=P33_SYSUSERID_CREATED_BY
    OK
    ORA-06550: line 1, column 27: PLS-00103: Encountered the symbol "BEGIN" when expecting one of the following: ( - + case mod new not null avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date pipe

    Sudha,
    For a default value type of PL/SQL Expression, you could create a function that accepts an input and returns a value. If the function (not a procedure) is named GET_REFNO, you would call it using an expression in the default value field like:
    get_refno(:P3_REFTYPE)
    For a default value type of PL/SQL Function Body, you could call your existing procedure with a default value like:declare
        l_value varchar2(32767);
    begin
        get_refno(:P3_REFTYPE, l_value);
        return l_value;
    end;Scott

  • Need a Better Regular Expression for Validating Dates

    I have data coming from file with date in the format DD-MON-YY.
    I have created the following regular expression:
    '^([0-2]{1}[0-9]{1}|[3]{1}[0-1]{1})-(JAN|FEB|MAR|A PR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC|Jan|Feb|Mar|Apr |May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-[[:digit:]]{2}$'
    However, it doesn't catch dates like 31-APR, 29-FEB. Can someone make changes to it to make it foolproof
    WITH temp AS
    (SELECT '29-FEB-07' AS COL1 FROM DUAL
    UNION ALL
    SELECT '31-APR-08' FROM DUAL
    UNION ALL
    SELECT '32-JAN-08' FROM DUAL
    UNION ALL
    SELECT '29-MAR-08' FROM DUAL
    UNION ALL
    SELECT '31-JAN-08' FROM DUAL)
    SELECT COL1,
    CASE WHEN REGEXP_LIKE(COL1,'^([0-2]{1}[0-9]{1}|[3]{1}[0-1]{1} )-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC |Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)- [[ :digit:]]{2}$')
    THEN 'VALID'
    ELSE 'INVALID'
    END
    FROM TEMP;

    Hi,
    Please check this function.
    The function works for the dates in the format 'DD-MON-YYYY','DD/MON/YYYY'.
    create or replace function date_validation_f(v_date varchar2) return varchar2 is
    v_ip_date     date;
    v_ip_date_ch  varchar2(20);
    v_ip_year  number;
    v_ip_month char(3);
    v_ip_day   number;
    v_return   varchar2(10);
    v_leap_year_check number :=0 ;
    type v_month_name_typ      is varray (12) of char(3);
    type v_month_last_day_typ  is varray (12) of number(2);
    v_month_name     v_month_name_typ    :=v_month_name_typ('JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC');
    v_month_last_day v_month_last_day_typ:=v_month_last_day_typ(31,28,31,30,31,30,31,31,30,31,30,31);
    begin
    --Assuming that input date is in the format DD-MON-YYYY or DD/MON/YYYY
    v_return := 'invalid';
    v_ip_date := to_date(v_date);
    v_ip_date_ch := to_char(v_ip_date,'DD-MON-YYYY');
    dbms_output.put_line('v_ip_date_ch := '||v_ip_date_ch);
    v_ip_month   := substr(v_ip_date_ch,4,3);
    dbms_output.put_line('v_ip_month := '||v_ip_month);
    v_ip_day    := substr(v_ip_date_ch,1,2);
    dbms_output.put_line('v_ip_year := '||v_ip_year);
    v_ip_year     := to_number(substr(v_ip_date_ch,8,4));
    dbms_output.put_line('v_ip_day := '||v_ip_day);
    -- Ckecking for leap year
    if MOD(v_ip_year,4)=0 then
      if MOD(v_ip_year,100)=0 then
        if MOD(v_ip_year,400)=0 then
           v_leap_year_check:=1;
        end if;
      else
           v_leap_year_check:=1;
      end if;
    end if;
    if v_leap_year_check = 1 then
       v_month_last_day(2):=29;
    end if;
    for i in 1..12
    loop
    if v_month_name(i)=upper(v_ip_month) then
         if v_ip_day between 1 and v_month_last_day(i) then
            v_return := 'valid';
            exit;
        else
            v_return := 'invalid';
            exit;
        end if;
    end if;
    end loop;
    dbms_output.put_line('v_return := '||v_return );
    return v_return;
    exception
    when others then
    return v_return;
    dbms_output.put_line(SQLERRM);
    end;you can use this function in SELECT statement.
    Edited by: Sreekanth Munagala on Nov 13, 2008 11:25 PM

  • Need regular expression for oracle date format 'DD-MON-YYYY'

    Hi,
    Can anybody tell me the regular expression to validate date in 'DD-MON-YYYY'.
    My concept is i have a table with just two columns item_name and item_date
    Both fields are varchar2 and i want to fetch those records from this table which have valid date format('DD-MON-YYYY').

    If it must be a regexp, this is a starter for you, note it carries the caveats mentioned by both posters above and in the linked thread
    mkr02@ORA11GMK> with data as (select '10-jan-2012' dt from dual
      2  union all select '10-111-2012' from dual
      3  union all select 'mm-jan-2012' from dual
      4  union all select '10-jan-12' from dual)
      5  select
      6  dt,
      7  case when regexp_like(dt,'[[:digit:]]{2}-[[:alpha:]]{3}-[[:digit:]]{4}','i') then 1 else 0 end chk
      8  from data
      9  /
    DT                 CHK
    10-jan-2012          1
    10-111-2012          0
    mm-jan-2012          0
    10-jan-12            0It will not validate content, only string format.
    And to emphasis the points made in the linked thread - dates in text columns is poor design. Always.

  • Boolean Expression for get date

    Hi Experts,
    I am working boolean expression in ssis package. I want download files from ftp and the file name is mic_20141101-mi.txt. 
    I want to take yesterday files for that i am using expression but i want to give dynamic date which i want give in variable the specific date to download those files from FTP.
    For this process i am using Boolean Expression if i give the specific date in variable then its download specific date files from ftp or else its download yesterday files.
    Pls help to me for this scenario.
    Raj.

    You need to have a variable inside SSIS through which you pass the date value
    Once passed you can have a script task inside your package to check for the pattern of date variable value inside your file to select correct files
    see this for similar logic where i'm looking for files from current day
    http://visakhm.blogspot.in/2012/05/package-to-implement-daily-processing.html
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Expression for due date less than today

    hi - i'm trying to compare if the due date of a task is less than today, so that I can automatically mark it as completed.
    any idea what expression I'd use?

    You will have to write a workflow that waits till the due date and then updates it as completed.
    But then what business purpose will it serve? The users will not update the tasks ever.

  • Default date should be displayed in Locale's date short format in Prompt

    Dear BI Gurus,
    I would like to take your attention to resolve one of date format issue which we are currently facing.
    We want to display Current_Date in locale's date short format ( For US: MM/DD/YYYY and for UK: DD/MM/YYYY) in a dashboard prompt. Also we need to pass the the prompt value to the report filter through presentation variable.
    For this we used logical sql to get the default value as select Times.time_id from sh when times.time_id= Current_Date. Once I click on the preview button it was showing in locale's date short format. But when we place the prmpt in dashboard, the default date was coming up in 'YYYY-MM-DD' format. But since calendar picker is giving value in locale's date short format (For US: MM/DD/YYYY and for UK: DD/MM/YYYY), there is an inconsistency in the display format. So could you please provide any workaround to make them consistent.
    Thnaks,
    Siva Naga Hari.
    Edited by: user6371352 on 27-Mar-2010 13:50

    Hi Vinay,
    Thanks for reply.
    We are looking for default date display format in dashboard prompt. i.e For US locale, default date and calendar picker should be displayed in MM/DD/YYYY and for UK locale, default and Calendar picker should be displayed in DD/MM/YYYY.
    We don't have any problem in report output for different locales. Also we don't need to create 2 seperate reports for different locales. If we set the data format to [FMT:dateShort], it will display as per the locale's date short format. Please provide workaround to display in dashboard prompt.
    Thanks,
    Siva Naga Hari.

  • Default data in Customs document

    Hello
    How do I make default data into a field setting with conditions such as if Field A is 'X' and Field B is 'Y', then there should be a default data 'Z' into Field C.
    Example, in Customs declaration document, if Country of Dep is X from header info and Item category is Y from Item info, then the default data for Place of Loading header should be Z
    The Procedures for Defaulting Customs data in IMG has been checked. I have defined the Target document data for document field. Also done the Determination procedure for defaulting data. I have set up the master data in the Customs application menu to specify the Source data and Target data to default.
    Am I missing something pls or is this something that BADI is better for?
    Thanks

    Closed - settings worked as proper test data later confirmed this

  • Defaulting Date Types in IT0041

    Hi All,
    I have a issue in defaulting Date Types in IT0041,
    There is a feature DATAR for defaulting Date Types in IT0041. When I create new IT0041 by PA30, values from feature DATAR is getting defaulted.
    But, when i run Hiring Action and at that time vaules from feature DATAR is not being called, its defaulting some other date types.
    Is there any other place where Date Types are defaulted?
    Please let me know if you want any more information
    With Regards
    Shyam

    Hi All,
    Current problem is rectified,
    Solution : I have used INSS instead of INS. In this case values from DATAR is getting defaulted
    New issue is there,
    Some dynamic action is automatically updating with Date Types those which are not there in DATAR. I dont know from where these values are being picked....
    I will continued my research and let you guys know the status.
    I request others to share their thoughts..
    Regards
    Shyam V

  • Needs to added default data cache to 1GB

    Hi All,
    When i tried to change defualt data cache getting below prompt.
    1> sp_cacheconfig "default data cache", "1024M"
    2> go
    Msg 10879, Level 16, State 1:
    Server 'TST', Procedure 'sp_cacheconfig', Line 1752:
    The current 'max memory' value '1792000', is not sufficient to change the size
    of cache 'default data cache' to '1024M' (1048576 KB). 'max memory' should be
    greater than 'total logical memory' '2024571' required for the configuration.
    (return status = 1)
    How to add 1GB for default data cahce.
    Please suggest.

    Hello Karthik,
    Increase your max menmory and run the cache config command again it should work.
    Eg:
    1. Please increase 'max memory' by additional X MB
    2. Please increase 'statement cache size' by additional X MB
    3. Both are dynamic parameters, does not require ASE restart.
    Regards
    Kiran K Adharapuram

  • Defaulting data from worklist document

    Hi,
    I had been able to create a worklist based on the PO from the feeder system.
    However when I try to create the customs declaration using the same, not all the data available in the worklist view is being transferred to the document.
    Is there anyway to control the transfer of these datas.
    To be specific I'm not able to copy data such as the COO, Destination country etc., at the item level.
    Also can someone give me an idea with an example how to configure the defaulting of partner function in the header.
    with best regards
    Surender

    You can default Partner which are not coming from Feeder syetem to GTS suppose you want to default your Carrier( Forwarding Agent )  as your Ship to party .
    To achieve this you have to following config:
    1. Under "Define Data for Default Partner"  Define a Procedure say ZTEST .
    2. Under Default rules you now define
         Target field  :  Forwarding Agent ( Parnter Function )
         Source Field : Ship to Party  ( Parnter Function )
       And Give seq as 1 and check  "Default Active Flag"
    3.Assign  Proc ZTEST under Define Determination Proc for Default Data for the Leg Reg of the custom document on which you want your default data.
    Kind Regards,
    Samere

  • How to give specific default date with expression in SSRS

    Hi,
    I have to pass some specific kind of dates in "Default Values" section of parameter.
    1st is whenever SSRS report run for any year in default date I want to pass value 1/1/(Current Year), for this I tried many way like , = "1/1/" + DatePart("Y",Now())  also = "1/1/" + Year(Now()) but it
    is giving me error. When I tried both part individually "1/1/" and  DatePart("Y",Now()) , it is working but when I join them with + sign it is giving me error that "input string is not in correct format"
    2nd I want to set up like when package run in month of April, it takes default date as "(Previous Month, which is May)/1/(current Year)" so if I am running report on 4/5/2013 then it in default date it should take 3/1/2013.
    Please help me with the expression. Thanks in advance. 
    Vicky

    Hi Visakh,
    Thanks again.
    I have one more question, I also have start date and end date. In start date I can put your expression as you gave me as below,
    =DateAdd(DateInterval.Month,DateDiff(DateInterval.Month,CDate("01/01/1900"),Now())-1,CDate("01/01/1900"))
    But can you please help me with End date expression?
    In End date I want to put previous month's last date. For example, if active batch is running package on
    12/16/2013 then for End Date parameter it should value "11/30/2013" 
    For  1/16/2014 then for End Date parameter it should value "12/31/2013" 
    For  3/16/2013 then for End Date parameter it should value "2/28/2013" 
    Thanks for your help in advance.
    Vicky

  • Unable to set default date for Date Picker item using Auto Row Processing

    Okay, I have searched through the forum for an answer, and have not found a thing to account for my problem.
    First, does anyone know if using Auto Row Processing has problems updating an item/field in a record where the Source is defined as Database Column if the 'Display As' is defined as 'Date Picker (MM/DD/YYYY)'?
    I ask this only because I found out the hard way that Auto Row Processing does NOT fetch the value for an item where the field is defined as TIMESTAMP in the database.
    My problem is as follows: I have a form that will CREATE a new record, allowing the user to select dates from Date Pickers, text from Select Lists, and entering in text into a Textarea item. The information is saved using a standard (created through the Auto Row Processing wizared) CREATE page level button. After the record is created the user is able to go into it and update the information. At that time, or later, they will click on one of two buttons, 'ACCEPT' or 'DECLINE'. These are Item level buttons, which set the REQUEST value to 'APPLY' (Accept) and 'UPDATE' (Decline). The Accept button executes a Process that changes the Status Code from 'Initiated' to 'Accepted', and sets the Declined_Accepted_Date to SYSDATE, then another Process SAVEs the record. The Declined button runs a Process that changes the Status Code from 'Initiated' to 'Declined', and sets the Declined_Accepted_Date to SYSDATE, then another Process SAVEs the record.
    However, even though the Status Code field is updated in the database record in both Accepted and Declined processing, the Declined_Accepted_Date field remains NULL in the database record (by looking at the records via SQL Developer). WHY??? I looked at the Session State values for both the Status Code and the Declined_Accepted_Date fields and saw that the fields (items) had the expected values after the process that SAVEs the record.
    The following is the code from the Accept button Page Process Source/Process:
    BEGIN
    :P205_STATUS_CD := 'A';
    :P205_REF_DECLINE_ACCEPT_DT := SYSDATE;
    END;
    As can be seen, the Status Code and Declined_Accepted_Date items are set one right after the other.
    As an aside, just what is the difference between Temporary Session State vs Permanent Session State? And what is the sequence of events to differentiate the two?

    Here's yet another thing that I just looked into, further information...
    One other difference between the date field I am having problems with (Accepted_Declined_Date), and other dates (with Date Pickers) in the record is that the Accepted_Declined_Date never gets displayed until after it is set with a default date when the Accept and Decline buttons are pressed.
    One of the other dates that works, the Received Date, is able to write a default date to the record that is never typed into the box or selected from the calendar. That date is placed into the box via a Post Calculation Computation in the Source, which I set up as: NVL(:P205_REF_RECEIVED_DT,TO_CHAR(SYSDATE,'MM/DD/YYYY'))
    However, I do remember actually trying this also with the Accepted_Declined_Date, and setting the Post Calculation Computation did not work for the Accept_Decline_Date. Could this be because the Accept_Decline_Date is never rendered until the Status Code is set to Declined (in other words, there is no need to display the date and allow the user to change it until the record is actually declined)???
    The control of the displaying (rendering) of the date is set via the Conditions / Condition Type: Value of Item in Expression 1 = Expression 2
    Expression 1 = P205_STATUS_CD and Expression 2 = L
    Does this shed any light???

  • Setting a default date value for input controls

    Hi All,
    I have created a webi report that shows  - among other things - the activity between 2 dates. I have created 2 input controls where the user can select the start and end dates from a calendar for this.
    The displayed data is restricted by a date variable which 'unfiltered' contains 1 month of data.
    'out of the box' I can set these input controls and all works fine, but each time I open the report the same values that I set last time are set in the input controls. I want to have these default to being between today and 7 days ago with the user then able to move away from  this action, rather than the 'window of interest' slowly slipping into the past.
    I have looked at the forum posting Re: Default Input Control Values in WebI doc on Open which describes setting a default on the objects in the report filter pane, but this does not appear to be possible as these are 'grayed out' and i need both the input controls to run from a single object.
    Does anyone have any ideas how this might be achieved?
    Thanks in advance
    John

    Hi,
    Sorry, I've obviously not explained myself very well. Please let me try to elaborate...
    The report I am writting is to function as a dashboard (yes, i know - Xcelcius/Dashboard Designer - don't ask!) but asking the user to enter a prompt for the date range is not an option here. My only options for this are effectively the input controls or the report filters. I want to be able to achieve the effect of entering =CurrentDate() in the 'default value box in the same way that I would if writting a Reporting Services report. However the WebI controls do not accept expressions for this.
    So...
    I have one date object with a months worth of dates in it.
    I have two input controls associated with this date object to allow the user to select a narrowed date range from this month of data.
    I need one of these to default to 'today' and the other to default to '7 days ago' (I can do the calculations to get both dates, the bit I cannot get past is applying these dates as defaults)
    can anyone help me with step 3 (in bold) above?
    John

  • SSRS expression for today,yesterday,Lastweek ,Last fortnight,Last Month, Year to date

    Hi All;
    I have a field called createdon 
    Using this field i need to create the SSRS expression for the table as below 
    Any help much appreciated
    Thanks
    Pradnya07

    use expressions as below
    assuming this is to be done in SSRS
    Today
    =COUNT(IIF(
    DateDiff(DateInterval.Day,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Day,Cdate("01/01/1900"),Now()),Fields!YourRequiredField.Value,Nothing))
    Yesterday
    =COUNT(IIF(
    DateDiff(DateInterval.Day,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Day,Cdate("01/01/1900"),Now())-1,Fields!YourRequiredField.Value,Nothing))
    LastWeek
    =COUNT(IIF(
    DateDiff(DateInterval.Week,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Week,Cdate("01/01/1900"),Now())-1,Fields!YourRequiredField.Value,Nothing))
    Last fortnight
    =COUNT(IIF(
    (DateDiff(DateInterval.Week,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Week,Cdate("01/01/1900"),Now())-1)
    Or (DateDiff(DateInterval.Week,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Week,Cdate("01/01/1900"),Now())-2),Fields!YourRequiredField.Value,Nothing))
    Last Month
    =COUNT(IIF(DateDiff(DateInterval.Month,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Month,Cdate("01/01/1900"),Now())-1,Fields!YourRequiredField.Value,Nothing))
    Year To Date
    =COUNT(IIF(DateDiff(DateInterval.Year,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Year,Cdate("01/01/1900"),Now())
    And
    DateDiff(DateInterval.Day,Cdate("01/01/1900"),Fields!createdon.Value) <= DateDiff(DateInterval.Day,Cdate("01/01/1900"),Now()),Fields!YourRequiredField.Value,Nothing))
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Maybe you are looking for

  • How to make a good balance in different  browser

    Tt is hard to make a perfet website in different browser,  many times it is beautiful in firefox , but ugly in IE. Do anyone have tips to make a balance in different browser?

  • Problem rebuilding VMWare Workstation 10.0.2 Modules

    Hi, today I updated my Kernel to 3.14.2-1 and wanted to rebuild the modules for VMware Workstation 10.0.2. Doing so causes the following error. I used this patch before http://pastie.org/pastes/9090538/. Has there been major changes between 3.14.1-1

  • Handles are gone in dreamweaver cc fluid

    basocally my handles are gone in dreamweaver cc fluid layout and i donr seee the grid. any helpis appercated thsnks Mike

  • Having permission to rename a file

    each time i wish to rename a picture file a pop up says i have not got the acess/privelage to do so. i have to get info, unlock the sharing and permission lock and change 'everyone' to 'no access' then it allows me to name my file. I am the sole user

  • How to Uninstall MAXDB

    Hi All i have the problem with MaxDB uninstalltion even i stopped the services of MAXDB in the controlpanel->Services. after that i  deleted the d:\sapdb folder structure in the system. but still the MAXDB is available in the controlpanel->ad or remo