How to assign default values for a timestamp column in a table?
Hi
Thank you for reading my post
how i can make a column in a table to be autofilled with current timestamp ?
for example when i create a table i want its timestamp field to be autofilled with current time stamp whenever a record generated.
Thanks
TEST@db102 SQL> create table test(a number primary key, b timestamp default systimestamp);
Table created.
TEST@db102 SQL> insert into test(a) values(1);
1 row created.
TEST@db102 SQL> select * from test;
A B
1 03-SEP-06 05.56.34.995319 PM
TEST@db102 SQL>
Similar Messages
-
How to set default values for boolean columns
I'm trying to deploy some content types and columns into a site with a feature. All it's ok, except that I'm trying to set a default value for boolean columns with no success.
I've tried to set default value at column level:
<Field ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DisplayName="Se publican noticias en español"
Type="Boolean" Hidden="FALSE" Group="Columnas ShaCon" >
<Default>TRUE</Default>
</Field>
and at content type level:
<FieldRef ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DefaultValue="TRUE" Required="TRUE" />
But in any case, when i create a new item with this content type, default value is applied.
Can anyone tell how to set default values for boolean columns?
Thanks in advance,
Regards,
SergioIn the field definition you can set
<Default>1</Default>
or
<Default>0</Default>
How to set the default value Null? -
Hi,
How to assign a value for Unit of measure (like PC, KG...) in ABAP program?
I want to assign PC in a field to execute the program, like wa-ENTRY_UOM = 'pc'.
But the system returen a message that "Unit of measure is not convertible to stockkeeping unit PC"
Could anyone tell me how to assign the value??
Thanks!hi,
first convert the quantity in the same unit ( like in you case ST to PC ) by using FM : MD_CONVERT_MATERIAL_UNIT
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = matnr
i_in_me = entry_uom
i_out_me = out_uom
i_menge = quantity
IMPORTING
E_MENGE = fp_l_v_quant
EXCEPTIONS
ERROR_IN_APPLICATION = 1
ERROR = 2
OTHERS = 3.
IF sy-subrc <> 0.
give error message here
ENDIF.
bcoz in ur program somewhere the quantities etc are compared and there units may be different... so that is why it is showing such error. so just convert convert the quantity in the same unit .
regards
rahul
Edited by: RAHUL SHARMA on Jun 17, 2009 9:31 AM -
Default values for files and columns when adding a discoverer porlet
Hi, i'd like to know how to configure the default value for numbers of columns and files when i add a new discoverer porlet in a portal page.
The actual default value is 10 files and 6 columns and i always have to increase it to at least 100x100.
Is there any config file where i can change that?
I've found a configuration.xml in $ORACLE_HOME/discoverer/config/configuration.xml
with a section
<!-- Discoverer Servlet configuration. Defines behaviour of both
discoverer/plus and discoverer/viewer servlets -->
but couldnt find a parameter for those items.
Thanks in advance.
Daniel PerezI think triggers are the best device.
Scott -
Max value for a TIMESTAMP column?
What is the max value for a TIMESTAMP column?
I'm using the ODP.NET provider 9.2.0.4. When i put C#'s DateTime.MaxValue (i.e. 12/31/9999 23:59:59,999) into a TIMESTAMP column, everything is ok. Retrieving this value (e.g. via SQL*Plus Worksheet) returns ora-01877 (string too long for internal buffer).
Any ideas?
Regards,
DanielMaybe you hit Bug 1782816 Select of TIMESTAMP gives ORA-1877 on some platforms
Product (Component) : SQL*Plus (SQL*Plus)
Range of versions believed to be affected: Versions >= 9.0 but < 9.2
Versions confirmed as being affected : 9.0.1.3
Platforms affected : Generic (all / most platforms affected) -
How to Set default value for taxonomywebtagging control with terms and nested terms
Hi,
I have created taxonomy control in custom aspx page and I am able to select terms but I am trying to setup default value to that control.
Can anybody let me know how to set the default value for TaxonomyWebTagging control in custom.aspx page with nested terms?
Any help would be greatly apprecited.
Control code in aspx page:
<td>
<asp:Label runat="server" ID="lblLanguages">Field A: </asp:Label><asp:Label runat="server" ID="rfvlblLanguages" CssClass="errorMsg" ForeColor="Red">*</asp:Label>
</td>
<td>
<Taxonomy:TaxonomyWebTaggingControl ID="term" Width="385px" runat="server" /></td>Mapping metedata code:TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
//Set the Business Unit Field
SPSite site = SPContext.Current.Web.Site;
TermStore termStore = session.TermStores["Managed Metadata Service"];
Group group = termStore.Groups["GROUPName"];
TermSet termSet = group.TermSets["TERMSETNAME"];
Term term = termSet.Terms["TermA"];
Guid termGuid = term.Id;
term.SspId.Add(termStore.Id);
term.TermSetId.Add(termSet.Id);
term.AllowFillIn = true;
term.AnchorId = countryGuid;
term.IsMulti = true;
Thank you.
AA.Hi,
According to your description, you want to set default value for TaxonomyWebTaggingControl.
I have a test in my environment. It could be achieved by setting the Text Property of TaxonomyWebTaggingControl.
Here is the code snippet:
TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
SPSite site = SPContext.Current.Web.Site;
TermStore termStore = session.TermStores["Managed Metadata Service"];
Group group = termStore.Groups["GroupA"];
TermSet termSet = group.TermSets["A"];
Term term = termSet.Terms["A1"];
TaxonomyWebTaggingControl1.SspId.Add(termStore.Id);
TaxonomyWebTaggingControl1.SSPList = termStore.Id.ToString();
TaxonomyWebTaggingControl1.TermSetId.Add(termSet.Id);
TaxonomyWebTaggingControl1.TermSetList = termSet.Id.ToString();
TaxonomyWebTaggingControl1.AllowFillIn = true;
TaxonomyWebTaggingControl1.IsAddTerms = true;
TaxonomyWebTaggingControl1.IsMulti = false;
TaxonomyWebTaggingControl1.Text = string.Format("{0}|{1}", term.Name, term.Id.ToString());
Here is a detailed article for your reference:
http://blog.bugrapostaci.com/2010/09/23/taxonomywebtaggingcontrol-sharepoint/
Feel free to Reply the test result.
Thanks
Patrick Liang
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Patrick Liang
TechNet Community Support -
How to set default value for vc2_255_arr in plsql parameter directive?
Hi,
I would like to set a default values for a plsql parameter which is of vc2_255_arr type. How to do that?
Below is the example from PL/SQL Server Page.
+" To set a default value, so that the parameter becomes optional, include a default="expression" attribute in the directive. The values for this attribute are substituted directly into a PL/SQL statement, so any strings must be single-quoted, and you can use special values such as null, as in the following example:+
+<%@ plsql parameter="p_last_name" default="null" %> "+
My plsql parameter is p_arr which is of "TYPE vc2_255_arr IS TABLE OF VARCHAR2(255) INDEX BY BINARY_INTEGER"
*<%@ plsql parameter="p_arr" type="PMP_LIB.VC2_255_ARR" %>*
Thanks in advance!
kwongMy plsql parameter is p_arr which is of "TYPE vc2_255_arr IS TABLE OF VARCHAR2(255) INDEX BY BINARY_INTEGER"You need to declare it in a package specification and initialize in the package body:
SQL> create or replace package pmp_lib
as
type vc2_255_arr is table of varchar2 (255)
index by binary_integer;
vc2_255_arr_default vc2_255_arr;
end pmp_lib;
Package created.
SQL> create or replace package body pmp_lib
as
begin
vc2_255_arr_default (1) := 'abc';
vc2_255_arr_default (2) := 'def';
end pmp_lib;
Package body created.
SQL> declare
arr pmp_lib.vc2_255_arr := pmp_lib.vc2_255_arr_default;
begin
for i in 1 .. arr.count
loop
dbms_output.put_line (arr (i));
end loop;
end;
abc
def
PL/SQL procedure successfully completed.so in your case it would probably be sth like (assuming pmp_lib is a package):
<%@ plsql parameter="p_arr" type="PMP_LIB.VC2_255_ARR" default = "PMP_LIB.vc2_255_arr_default" %> -
How to set default value for html:file in struts
hi
i am working on an application using struts situation is i am using the
<html:file property="" /> to allow the user to upload file. but i need that a default file should be set so that even if the user donot click browse ie the user wish to upload that default file the default file get uploaded on page submition. Is it possible to set any default value for html:file ...if yes plz provide any suggestion or links how to achieve this. thanks in advancewww.google.com?q=STRUTS+DOCUMENTATION
-
How to make default values for date range?
Dear Colleagues,
My customer is asking for a default value for a date range prompt.
The FromDate should contain the 1st of current month, the ToDate should contain current date.
Does anyone have any idea how I can meet this demand?
Regards SiljeHi Federico,
Thank you for the answer, we are back to the challenge after summer vacations!
I have created a variable in the universe: SELECT current date as TODAY FROM SYSIBM.SYSDUMMY1. I Called it TODAY.
Then I created a prompt in the query based on Date. In Prompt Properties I tagged for "Set Default Values" and I typed in TODAY.
When I try to run the query I get the error message: The date for the query filter based on 'Date' is invalid (WIS10704).
What is wrong? What do I have to do differently?
My goal is to have a default for Date that gives me today..
Regards Silje -
Select-options How to assign Default value as "Not equal to something"
My req. is to asssign default value for a select-option as <> "DS1" . I am able to give default value as DS1 But dont know how to give "<> DS1" . Please help me
Thanking u in advance ..INITIALIZATION.
s_lifnr-low = '0001'.
s_lifnr-high = '0002'.
s_LIFNR-sign = 'I'.
s_lifnr-option = 'NE'.
append s_lifnr.
Regards,
Subramanian V.
P.S. - Raja, still mode = BSP ??? :-P
Message was edited by: Subramanian Venkateswaran -
How to populate default values for BP (FPP1 is tcode in ECC 6.0)
Hello ,
I am creating BP in ECC 6.0 using Fpp1 tcode. How to populate default values when i hit create BP person. any badi triggers when we are creating BP in ECC.
guide me.Hi Premanand,
To default fields, you need to do the following steps :
1. Create a Z module e.g. : Z_DEFAULT_FIELDS_DIALOG.
2. Enter suppose you want to default fiels Name, title, country, write code as follows :
DATA : ls_busdefault LIKE busdefault.
ls_busdefault-title = '0002'.
ls_busdefault-mc_name1 = 'TEST'.
ls_busdefault-mc_name2 = 'Default'.
ls_busdefault-country = 'IN'.
CALL FUNCTION 'BUP_BUPA_FIELDVALUES_SET'
EXPORTING
i_busdefault = ls_busdefalut.
3. Now got to transaction BUS7, select event ISDAT, click on Event--> function modules.
4. Register your Z module Z_DEFAULT_FIELDS_DIALOG in this list, Save.
This should solve your problem. Please note : You can only default those fields contained in structure BUSDEFAULT.
Cheers,
Rishu. -
How to set default value for Zfeild using statusprofile
hi experts,
I need to set a default value for a zfeild using status profile.Although we can default the values,using getter and setter methods,but in my requirement,the feild will be defaulted when the page is locked,also in display mode,which will require me to write code to unlock then set the value and then write a commit,as there wont be any user action performed.
I have created a zstatus profile and have set the required status to inital,but no luck
please suggest if this canbe achived through status profile.
Regards
Anu.Hi,
You can check in the getter if the Page is locked and then display the value to want to display. Note that this will be just Displaying the default value for the Zfield and it will not set the default value into the Zfield in DB, because when the document is locked ( means locked for editing - mostly when system status is completed ) , setters are not called and so you can display the value but cant set it. This is fine if the value you want to display in Z field is just for user's informations and its not required to save this default value.
The best approach would be to set the value in the Zfield before the page is locking. For example, If you wat to set the zfield value when status is set to "Completed" , then you can configure an action that is 1) triggered during saving of the document with 2) start condition "When status is completed" ( both 1 and 2 you can mention in action defination ), then Implement this action badi in which you can set the Zfield to default value.
This will ensure that default value is always set whenever the page is getting locked for editing ( i assumed that page lock means status completed ).
Thanks & Regards
Suchita -
ADF 11g - Query Component - How to set default values for search criteria
I have defined a VO with named query (with 2 search criteria). I created a page and drop a query with table. It works just fine until this point. My requirement is to set a default values for the two search criteria. For example, I have release and category criteria where they are set to use a drop down. I would like to default the values for the drop down when the page is shown up the first time and query the result right away. Is there a way declaratively or I have to create a custom query?
Thanks.I figured this out. Thanks.
-
How to set default values for inputs?
I have several inputs which are always initialized with 0 when I start the VI. I'd like save own default values for them. I've already tried just setting the numbers and saving the VI but it did not work.
If you want to make any data in any controls, Arrays you can right click on it select >Data operations>Make current values default or you can select EDIT in tool bar, click on Make current values Default.
First, enter the data you want in the control or array and then follow the things Geeta said.
Post if any other help required.
Message Edited by mathan on 12-05-2008 12:07 AM -
How to insert into default values in onli 1 column of a table
if u create a table with onli 1 column
which can accept a default value of say
only 100.
then how do u actualli enter values into the table.
is there any data dictionary which stores details about default
values of a tableThe default value for a column is the value that will be stored
for that column if you do not provide one in your insert
statement. If you do provide a value, then it will be stored in
the column.
You can query user_tab_columns ( or all_ or dba_)to see the
default value assigned to a column.
Maybe you are looking for
-
Text Stroke Options Unavailable, All Black Grads
Can someone explain to me why the hell I have no stroke alignment options available to me for text? See the screenshot below... I am unable to select inside or outside alignment. Likewise there is nothing showing in the appearance panel for the selec
-
Get the value of a selected radio button within a ToggleGroup
All Please see the script below. All I'm trying to do is to identify the selected radio button within a ToggleGroup. This has been working in JavaFX 1.2. This is JavaFX 1.3 running on NetBeans 6.9 (beta) on Ubuntu 10.04 Does anyone know why this is n
-
Nw BPM error : JPR could not process the message error whie processing the request
Hi All, I am trying to implement the new NW BPM Scenario(I am fallowing the Williams Document as it is), When I try to trigger the message it's getting failed at BPM XI channel level , this is the below error . Delivery of the message to the applicat
-
Stored Procedure with CSV string as parameters
Hi, I have been tasked with this issue, but I have no real SQL/Oracle experience. My boss advises that the best way to do this would be to pass a CSV string into the stored proc for each parameter, What I need to do is parse the CSV string and use ea
-
Oracle 8i lite, iconnect with epoc
Does anyone know if oracle 8i lite will e able to use iconnect to an epoc os platform on a pda?