Default value 'sys_date' in an integer form YYYYMMDD without changing NLS

I would need to define the default value in the alter table SQL, where I would set the default value of the current 'sys_date' in a string form 'YYYYMMDD' (8 varchar) without changing the session or system NLS settings.
Would I need to invoke a PL/SQL procedure for this (if possible without it)?
Dejan

I have enclosed the SQL for creating my table, where I have to set the current date to today's date for the field 'DAT_VIR'. How do I set the TO_CHAR function in the SQL of the create or alter table SQL?
Thanks!
Dejan
CREATE TABLE SCHEMA.TABLE
FID NUMBER(10),
GEOM MDSYS.SDO_GEOMETRY,
LENGTH NUMBER(20,8),
TIP_SPR VARCHAR2(10 CHAR) DEFAULT 'D',
ID NUMBER(10),
ID_UPR VARCHAR2(20 CHAR),
SIF_VRSTE NUMBER(10) DEFAULT 6100,
CC_KLAS NUMBER(5),
TOPO NUMBER(10) DEFAULT 2,
NAT_YX NUMBER(10),
Z NUMBER(7,2),
NAT_Z NUMBER(10),
GJI NUMBER(10) DEFAULT 1,
VIR NUMBER(10),
DAT_VIR VARCHAR2(8 CHAR),
MAT_ST NUMBER(7),
MAT_GJS NUMBER(7),
ID_EL VARCHAR2(15 CHAR),
DAT_EL VARCHAR2(8 CHAR),
DIM_YX NUMBER(6,2),
DIM_Z NUMBER(6,2),
OPU NUMBER(10) DEFAULT 1,
ATR1 NUMBER(10),
ATR2 NUMBER(10),
ATR3 NUMBER(10),
ATR4 VARCHAR2(8 CHAR),
ATR5 VARCHAR2(5 CHAR),
OPIS VARCHAR2(30 CHAR)
COLUMN GEOM NOT SUBSTITUTABLE AT ALL LEVELS
TABLESPACE USERS
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOGGING
NOCOMPRESS
LOB ("GEOM"."SDO_ELEM_INFO") STORE AS
( TABLESPACE USERS
ENABLE STORAGE IN ROW
CHUNK 8192
PCTVERSION 10
CACHE
INDEX (
TABLESPACE USERS
STORAGE (
INITIAL 64K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOB ("GEOM"."SDO_ORDINATES") STORE AS
( TABLESPACE USERS
ENABLE STORAGE IN ROW
CHUNK 8192
PCTVERSION 10
CACHE
INDEX (
TABLESPACE USERS
STORAGE (
INITIAL 64K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
NOCACHE
NOPARALLEL
MONITORING;

Similar Messages

  • Setting default value to columns on tabular form is not working.

    Hi,
    I created a tabular form and i want to set some default values to columns based on the values in page items.
    so i set the page item to column value in tabular form attributes by selecting the Default type as PLSQL Expression & Function DEFAULT value &P24_ISSUE_ID. it worked fine but
    in the similar way i tried for the another column by selecting the default type as pl/sql expression & function and default value &P24_CASE_NAME.
    but it throwing an error for this like failed to parse SQL query:    ORA-00904: "C254DB": invalid identifier
    i don't understand where i gone wrong even i checked for the data types of the columns, everything is fine.
    so please help me out of this problem.

    Tulasi 1243 wrote:
    for the first column
    i selected
    DEFAULT TYPE as PL/SQL Expression & FUNCTION
    Default as *&P24_ISSUE_ID.* This is a number data type column
    2nd column
    Default Type as PL/SQL Expression & Function
    Default as *&P24_CASE_NAME.* This is Varchar2 data type column.The appropriate options for a default value from a page item are Item (application or page item name) for Default Type and the item name ( P24_ISSUE_ID, P24_CASE_NAME etc) for Default.
    *&P24_ISSUE_ID.* is not a "PL/SQL Expression or Function".
    but it throwing an error for this like failed to parse SQL query: ORA-00904: "C254DB": invalid identifierWhat you are doing results in the APEX engine substituting the P24_CASE_NAME value "C254DB" into the default value and then trying to evaluate this string as a piece of PL/SQL. Outside of a block in which it is defined as a variable, constant or function "C254DB" is not a valid PL/SQL expression.

  • HOW TO SHOW A DEFAULT VALUE IN AN UPDATABLE TABULAR FORM

    I have an updatable form that has three columns:
    Employee Name (display only)
    Reporting Name (select list)
    Element Type ID (hidden and updatable)
    When the user select a value in the reporting name column it updates the
    element type id with the appropriate value. But when they look at the select list
    it has the select list values as well as the selected value in the list. How do I
    overcome this. My example is setup and ready to be reviewed at http://apex.oracle.com/pls/otn/f?p=32409:1
    Thank you
    Forrest
    p.s. weather in Anchorage Alaska Sunny and 45 degrees!

    Woody,
    I'm a little confused (not uncommon), as I don't understand why you have a hidden column to hold the element_type_id value.
    It looks like you're doing a simple SELECT LIST/LOV that shows the display value and stores the code value. I guess I don't understand why you need the hidden column. Shouldn't the code value end up in the APEX_ITEM array, so you can save it to your table?
    I would think you'd have a hidden value to hold the primary key for your table in one APEX_ITEM array, and the element_type_id column is the second parameter of the APEX_ITEM.SELECT_LIST() call. Then your manual update procedure saves that value to the right record, using the primary key from the hidden column?
    What am I missing here?
    Good luck,
    Stew

  • Get previous items unique value in new add item form

    Hi
    I have on list having items related to multiple locations.
    Every location is related to one user.
    When user logs in it filters the list with that users location.
    Now when user click on add new item I want to get the data related to his location using item event listener.
    But in new item form there is no way to get the location of that user in event listener as its new item.
    So I passed the qury string parameter form list and changed the add item form link and form to get the query string paramter as default value in Add new Item form.
    But again when user clicks on save button it redirects to original url without paramter. 
    How to redirect user to url with parameter on click on Save/Cancel.
    Is there any other way to get the previous item unique value in add new item from before executing the event listener?

    Hi,
    According to your post, my understanding is that you wanted to redirect user to url with parameter on click on Save/Cancel.
    You need to modify the onclick event need to as below:
    javascript: {{ddwrt:GenFireServerEvent('__redirect={{Home.aspx?Participant={@Participant}&@Activity={@Activity}}}')}}
    Here is a similar thread for your reference:
    http://social.technet.microsoft.com/Forums/en-US/b506cfe5-650e-4017-b470-9ca0a75cd390/sharepoint-2010-list-how-to-pass-parameters-in-a-url-to-another-page?forum=sharepointcustomizationprevious
    In addition, you can creating an intermediate page which just finds the filed value with a DVWP and then redirect to RedirectURL with the filed value on the Query String.
    For more information, you can refer to:
    Redirect to Another Page from NewForm.aspx with the New Item’s ID
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to set the default value of a database column to NULL

    Hello,
    I want to set the default value of a column (VARCHAR2(20) to NULL, nut I cannot figure out to do this. I tried the following editing the offline table with JDeveloper:
    Default Value : <empty> -> On database NULL
    Default Value: '' -> On database ''
    When I create a new column, there is no default value on the database side and when I open the tabe properties in the database navigator I can see that the default value is (null). This is what I want to see in the other column as well. I don't know why sometimes a default value is visible on the database side (when generating form offline tables to database tables) and sometimes not.
    Perhaps sombody can bring some light in this issue.
    Thanks Thomas

    Hello Shay,
    I have the impression that you don't understand my problem. So here step by step:
    1. Create a offline Table TEST with one column TEST: VARCHAR2(20). nullable=true, no default value.
    2. Generate the table to the database
    3. When you look at the table properties (columns) with the database navigator the following information is displayed (sorry for the formatting):
    Column Name | Data Type | Nullable | Data Default | COLUMN ID| Primary Key | COMMENTS
    TEST | VARCHAR2(20 BYTE | Yes | (null) | 1 | (null) | (null)
    4. Now set the default value for the column TEST in the offline table for example to 'Test'
    5. Generate the table to the database.
    6. When you have a look at the database table, the default value is now 'Test' (as expected)
    7. Now remove the default value of the column TEST in the offline table
    8. Generate the table to the database
    9. When you have a look at the database table, the default value is now NULL (in uppercase letters without parenthesis)
    And this is where the problem starts!
    When you generate the table again with the options "Alter/Manual Reconcile" the default value of the column test is considered to be different! But in fact it should'nt be different because nothing has been changed.
    Best regards Thomas
    Edited by: thmayr on May 28, 2009 9:05 AM
    Edited by: thmayr on May 28, 2009 9:31 AM

  • SP Online - Managed Metadata column Default Value for folders (using CSOM)

    Hello,
    I am working on setting default values (metadata columns)  for different folders on my document library. As so far, I've found solution about how to set default values on whole library and many solutions which works for folders, but not for sharepoint
    online (using metadataDefaults object).
    The only working solution for folders in SPO I've found is editing file library/Forms/client_LocationBasedDefaults and add some data here.
    My question is: is there any easier method to set default values for each folder in document library without manually editing this file? 

    I second that, I have a client looking to do the same thing but I don't see a way to automate this.

  • Dynamic variable in 11g rpd - character 'd' got appended to default value

    Hi All,
    We have recently upgraded to 11.1.1.6 version from obiee10g.
    We are facing an issue with default initializer in the dynamic variables in the RPD.
    For one of the dynamic variables XYZ_YEAR default value is '2013.0d' in 11g. In 10g for the same dynamic variable XYZ_YEAR default value is '2013'.
    As we are using this variable on the 11g dashboard the following error has been thrown -- A numeric value was expected (received "2013.0d")
    After the upgrade we are unable to do online changes to the RPD. That is another issue.
    So, coming back to the variable issue. I have taken a offline copy of the rpd and changed the default value of the variable to '2013.0'.
    And ported the offline rpd via EM. Initially, it seemed to be resolved. But, after sometime the dashboard got errored out with the same error.
    I went back to check the online rpd and saw the dynamic variable's default value as '2013.0d'
    I have tried making changes in offline rpd twice and ported the rpd via EM but the issue still persists.
    Thanks,
    Obul
    Edited by: obul on Nov 23, 2012 3:44 AM

    An easiy solution to this issue is to change the SQL for the initialization block to look like this:
    select cast(year as number (4,0)) from blah....
    The ,0 in the number specifier truncates any decimal data, and OBIEE then sees it as an integer type instead of decimal. Sorry, I posted this answer in another thread, but there seem to be quite a few threads about this issue.
    Hope it helps!
    Scott

  • How to assign a default value on a Tabular Report?

    version 3.2.1
    I have a column in a Tabular Report (SQL Query (updateable report) ) that I would like to default to a value every time that the Add Rows button is clicked. This column needs to have the same value for every row.
    How do I set a default value on the column?
    Thanks,
    Joe

    I've run into the same problem. The 'Default' value isn't even appearing in the form, let alone getting stored.
    I'm not 100% certain (I'm still new to Apex too), but I think that the 'Default Type' and 'Default' value fields of the 'Tabular Form Element' might only apply to new records, ie when using the Tabular Form to create new records.
    In my case, I'm displaying existing records and I've been trying to enter a default new value for a particular field, ie change the value in the field for existing records from null to today's date. I couldn't get it to work and the more I think about it the more I realise that it is probably not the right way to do it.
    One alternative would be to put the SYSDATE into the source SQL (noting that changing an existing tabular form definition would cause an error, so I would have to create a new tabular form). But another (and I think preferable for me) option is to create a trigger that will put the SYSDATE into the field as each record is updated.
    Regards,
    Peter

  • End of year as default value in date item [SOLVED]

    Hi
    I'd like the last day of the current year (i.e. 31.12.2008) to be the default value of an item (in Forms 6i) (Format dd.mm.rrrr).
    The default value in the database is
    TO_DATE('31.12.'||TO_CHAR(sysdate,'yyyy')) and there it works fine.
    In Forms I have a WHEN-CREATE-RECORD Trigger with:
    my_item := TO_DATE('31.12.'||TO_CHAR(sysdate,'yyyy'));
    (generated from Designer)
    However, whatwever I write there I always get some "crap" in the form, most of the time 20.12.0031.
    I can see that it has something to do with the language settings, but don't know where to make some changes.
    Can anybody help my on this, I am aware, trivial matter.
    Thanks
    Karine
    Message was edited by:
    kpa

    Try this:
    my_item := TO_DATE('31.12.'||TO_CHAR(sysdate,'yyyy'), 'dd.mm.yyyy');

  • Setting default value to af:inputdate in  jsf page.

    Is there a way to set the input date in  a form to some default value initially.
    I am finding no way to do this. If I set the value from a backing bean function it does not show the date picker next to input date and new values cannot be entered. Ideally, if i set some default  value initially i still should be able to change it to any date i want by using date picker next to input date.
    There is no other property like "Default Value" on input date component.
    Any suggestions ?
    using jdev 11.1.2.3

    User, you should be able to set the value your date field it's bound to. This value will then show up as default value in the ui.
    Don't try to use the component itself to set the value.
    Timo

  • Setting default value through a database function?

    I have a form to create and display records. When a new record is created, a certain field has to be filled out with a value generated by a database function. When the form is used to display an existing record, off course this function does not have to fill out this field.
    I tried to work with a computation with a query that calls the function, but I have problems assigning it to the item. I fiddled around with the Source option (Source used) with the result that either the field is always filled out (when I choose for "Only when current value in session state is null") by the function, or never (when I choose the other option).
    What am I doing wrong here? What is the best method to have a default value filled out in this form by a database function? Extra info: the result of this database function is based on the place in the application where the form is called. Sometimes the result is something like "ABC-123456789", sometimes it has to be something like "T-123456789".

    Hi ,
    is this you are expecting?
    default value
    type = function body return
    select seqname.nextval into :p1_id from dual
    select count(*) into :p2_total from emp;
    this will fill the form field with seq number.
    Thanks
    Mark Wyatt
    Edited by: Websoft on Oct 14, 2009 12:45 AM

  • Change default values of Dropdownlist

    Hi,
    I am using Sun Creator. When I creat Dropdownlist, there are three 3 default values: Item1, Item2, Item3.
    I want to change these values, but I do not know how? Could someone help me? Thanks.
    netsearcher2000

    ok mna u have to way to do that :
    1. make binding with objec in you Action bean, and you can make get and set that vule form that bindin oject
    2 . put that Value attrbiut in action, and when u change teh value in avtion bean .

  • Drop down default values

    I am using Acrobat XI PRO on a Windows 7 system.
    I am creating a questionnaire form that askes a lot of the same questions, such as name, address, etc.  For the name portion, I have a drop down box for the Prefix and Suffix.  In order not to have to type in all of the options of each one, I named them the same and I left my chosen field highlighted so that it would be the default value.  It is the default value when the form comes up in Reader, but once it is changed one time, the default value is the same as the new one.  For example, the default for the name suffix is "None" but after someone selects "Jr." that is the new default value for them.  It also seems to change the ones that have been filled in to the new one.
    To have the default stay the same and not to have the answers change, do I need to create a new name for each instance?  That will mean that I can't take advantage of it keeping the dane drapdown values.  It automatically changes the name by adding a number, so I thought that would not be a problem.
    Thanks.

    Moved to Forms

  • Reset default values - unfilter action

    Hi all,
    How can I reset  input UI elements( Input Text or Drop Down) to the default values ?
    I have a form that contains Drop Down, Date Picker etc.
    This form used as a filter for some dashboard.
    It contains 'filter' and 'unfilter' buttons.
    The question is how can I put the default values to the form UI elements while clicking the 'unfilter' button.
    Please note that unfilter action is working ( I pass default values to BAPI) but UI elements doesn't initilized to the default values.
    Thanks,
    Ola

    HI Ola,
    you cannot "reset" an input field to the default value. You have to re-enter the form that contains the input field, i.e. there must be a data flow into your form. This data flow must contain the default values.
    Another option is to use a drop down box instead, containing the possible filter values.
    The input field does not refresh a value automatically. Only an expression box does. There, however, you cannot enter texts.
    Best Regards,
      Benni

  • BEx Variable default value does not pass thru to Webi report

    Hi,
    It appears that the integration between BEx and BOBJ Webi does not support default values when the webi report is scheduled.  This means that if Webi/Infoview is the delivery method, than clients require 2 reports.  1 for adhoc and 1 for scheduling.  Is there another way around this so 2 reports are not required?  See SAP Knowledge Base Article  https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3030303136363534393826
    Regards,
    Dae Jin

    Hi,
    Yes it is not supported. you can achieve by writing customer exit for this.
    in istep 2,
    check whether the variable value is intial.
    if intial
    pass default value
    if not intial (else)
    dont do any change, just pass the user input to restriction.
    -Sriram

Maybe you are looking for