Behaviour of default value of METHOD_OPT
Hello,
I was trying to test the impact of extended statistics feature of 11g when I was puzzled by another observation.
I created a table (from ALL_OBJECTS view). The data in this table was such that it had lots of rows where OWNER = 'PUBLIC'
and lots of rows where OBJECT_TYPE = 'JAVA CLASS' but no rows where OWNER = 'PUBLIC' AND OBJECT_TYPE = 'JAVA CLASS'.
I also create an index on the combination of (OWNER, OBJECT_TYPE).
Now, after collecting statistics on table and index, I queried the table for above condition (OWNER = 'PUBLIC' AND OBJECT_TYPE = 'JAVA CLASS').
To my surprise (or not), the query used the index.
Then I recollected the statistics on the table and index and now the same query started to do a full table scan.
Only creation of extended statistics ensured that the plan changed to indexed access subsequently. While this proved the use of extended stats,
I am not sure how oracle was able to use indexed access path initially but not afterwards.
Is this due to column usage monitoring info? Can anybody help?
Here is my test case:
SQL> select * from v$version ;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
5 rows selected.
SQL> show parameter optimizer
NAME TYPE VALUE
optimizer_capture_sql_plan_baselines boolean FALSE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 11.2.0.1
optimizer_index_caching integer 0
optimizer_index_cost_adj integer 100
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean TRUE
optimizer_use_invisible_indexes boolean FALSE
optimizer_use_pending_statistics boolean FALSE
optimizer_use_sql_plan_baselines boolean TRUE
SQL> create table t1 nologging as select * from all_objects ;
Table created.
SQL> exec dbms_stats.gather_table_stats(user, 'T1', no_invalidate=>false) ;
PL/SQL procedure successfully completed.
SQL> select * from t1 where owner = 'PUBLIC' and object_type = 'JAVA CLASS' ;
no rows selected
SQL> select * from table(dbms_xplan.display_cursor) ;
PLAN_TABLE_OUTPUT
SQL_ID bnrj3cac3upfd, child number 0
select * from t1 where owner = 'PUBLIC' and object_type = 'JAVA CLASS'
Plan hash value: 3617692013
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | | | 226 (100)| |
|* 1 | TABLE ACCESS FULL| T1 | 155 | 15190 | 226 (1)| 00:00:03 |
Predicate Information (identified by operation id):
1 - filter(("OBJECT_TYPE"='JAVA CLASS' AND "OWNER"='PUBLIC'))
18 rows selected.
SQL> create index t1_idx on t1(owner, object_type) nologging ;
Index created.
SQL> select * from t1 where owner = 'PUBLIC' and object_type = 'JAVA CLASS' ;
no rows selected
SQL> select * from table(dbms_xplan.display_cursor) ;
PLAN_TABLE_OUTPUT
SQL_ID bnrj3cac3upfd, child number 0
select * from t1 where owner = 'PUBLIC' and object_type = 'JAVA CLASS'
Plan hash value: 546753835
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | | | 23 (100)| |
| 1 | TABLE ACCESS BY INDEX ROWID| T1 | 633 | 62034 | 23 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | T1_IDX | 633 | | 3 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("OWNER"='PUBLIC' AND "OBJECT_TYPE"='JAVA CLASS')
19 rows selected.
SQL> REM This shows that CBO decided to use the index even when there are no extended statistics
SQL> REM Now, we will gather statistics on the table again and see what happens
SQL> exec dbms_stats.gather_table_stats(user, 'T1', no_invalidate=>false) ;
PL/SQL procedure successfully completed.
SQL> select * from t1 where owner = 'PUBLIC' and object_type = 'JAVA CLASS' ;
no rows selected
SQL> select * from table(dbms_xplan.display_cursor) ;
PLAN_TABLE_OUTPUT
SQL_ID bnrj3cac3upfd, child number 0
select * from t1 where owner = 'PUBLIC' and object_type = 'JAVA CLASS'
Plan hash value: 3617692013
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | | | 226 (100)| |
|* 1 | TABLE ACCESS FULL| T1 | 11170 | 1069K| 226 (1)| 00:00:03 |
Predicate Information (identified by operation id):
1 - filter(("OBJECT_TYPE"='JAVA CLASS' AND "OWNER"='PUBLIC'))
18 rows selected.
SQL> REM And the plan changes to Full Table scan. Why?
user503699 wrote:
Hemant K Chitale wrote:
A change in statistics drives a change in expected cardinality which drives a change in plan.In that case, how does one explain the same execution plan but huge difference in cardinalities between first and third execution ?1) Oracle sometimes can use index statistics. This most likely explains difference in cardinality estimates between 1st and 2nd statements
2) You didn't specify estimate_percent - and that is not a good practice. You can get different sets of statistics gathered with different DBMS_STATS runs even when data isn't changed
3) As already pointed out previously, histograms make CBO behave quite differently. Most likely you have histograms in presence in the 3rd statement, which is quite possible the result of not specifying estimate_percent
Similar Messages
-
Default Value in Formula Variable - Inconsistent behaviour
Hi,
I am facing a very strange issue in a formula variable.
I had created three formula variables with default values and the user (Power user who has the Bex access) was able to change the default value themselves for two of these variables.
Now he wants to change all the three, so I have tried to check the issue and changed all the three for testing purpose.
Now, he is unable to change any of them!!! Sad, now I cant even say that "You dont have the Auth to do so"
Any clue? Anyone has faced similar issue.
Any thoughts are highy welcome! Suddenly users wants to get this one URGENTLY, usually he used to access the report once in month. Now he wants to use the same once in half an hour
We are on BI 7.0 with SP 24
Any thoughts PLS
Regardshi,
probably you can refer to SAP Note 1413030 - SAPBWNews NW 7.x BW Add-On Frontend Patch 1300 - GUI 7.10 or maybe SAP Note 1294382 - SAPBINews NW7.0 BI Add-On Frontend SP900 - GUI 7.1 that might help you in sorting out your problem, plus you can buy more time from the user as well
regards
laksh -
Default value of BeX customer Exit variable not Displayed in WeBI??
Hello Experts,
We are stuck with a problem where WeBI report is created on top of BeX query and we are not able to see the default value of Bex Customer exit variable in WeBI run. Here is the complete scenario:
1. One restricted KF is created in BeX, restricted with Customer exit variable on net Due date. And this variable is mandatory, ready for input, and Default value in calculated is user exit as current Week's Monday.
2. So, by default KF data should be restricted to Monday of current week, if user does not change this value.
3. Now, WeBI report is created on top of this Bex query, and all is working fine, i.e. we are getting variable as Prompt in WeBI, but Default value is not shown while Running the Webi Report.
So, need your inputs on the same, if default values from BeX in WeBI is supported or not? If yes, why this is happening, and how to resolve it?
Please notice, the restrcition is in KF only, it is not a separate restrcition on Net Due date in Filter area or in Defualt area of BeX
and we are on SAP BW 7.1 and BOXI 3.1 SP4.
Regards,
Vipul
Edited by: VIPUL GOYAL on Nov 23, 2011 9:44 PMHi,
See 1285993 - Support of Customer Exit Variables from BEx query into WebIntelligence via OLAP universe
WebI will prompt when executed, but the default values calculated by the user exit - do not appear.
Note: If the BEx variable has property 'ready for input' set / enabled, then its WebI prompt shows ok, but no default value appears.
Cause
This behaviour expected 'by design' (in the context of the product's current limitations) as explained in the online guide below:
Please refer to Chapter 7, page 44, document link here: http://help.sap.com/businessobject/product_guides/boexir3/en/xi3_sap_olap_universes_en.pdf
Characteristic variable > processing type > Customer Exit is "Supported, without user entry"
--> This should be understood as meaning "User will not be shown a prompt"
regards,
H -
Report Builder 2.0 loses parameter Null default value when deployed
When a parameter is set to a default value of (Null) and the report is saved to the sever, the default is lost when the report is re-opened in RB2. This problem doesn't seem to occur in BIDS. I've tried to use an expression to set the value to System.DBNull but this can no longer be done.
Any ideas for a work-around?
Is there a bug report open for this? I couldn't find an open bug on the Connections site and there's an issue on that site right now when submitting feedback.Paul Turley [Hitachi Consulting]
SQLServerBIBlog.comHi All,
I just had an almost identical issue using report builder 3.0 so I don't believe it is fixed. I had 4 parameters set to default to (Null) and I added a new one with identical settings but it would continually come up blank and not check the null box automatically
when going into my sub report.
To make matters worse I experimented changing one of the old parameters and it then started exhibiting the same behaviour. Using Luke's post above solved the issue (though it was Manage in my version not Administrate).
Using System.DBNull.Value resulted in it being treated as a literal string "System.DBNull.Value" and putting that in the filter for me.
Hope it helps. -
Assigning default values to root and subnode attributes
Hello,
I created a BO with a root node. In order to assign some default values after a root instance is created, I've implemented a determination. Everything is working as expected. When the instance is created (and only then) the init method is processed and the default values get assigned.
As a next step, I added a subnode. I need to assign some default values to a new instance as well. So, I've created a determination for this subnode, in the same way as I did it for the root node.
Now, when a new instance is created, the init method of the root is processed, but not the init method of the subnode. Only when I change a value of a subnode attribute and do a save, the init method of the subnode is processed and the init method of the root node as well (overwriting any changes with the default values, which is wrong).
How can I achieve that after instance creation (and only at this point), the init method of the root and then the init method of the subnode are processed?
Thanks for any advice.
regards,
UlliHi Ulli,
It should work if you have configured as rightly mentioned by Tilmann.
but If you want to debug the framework to understand the behaviour, you have to go to class - /BOBF/CL_FRW.
Put a break-point in any of these method - CHECK_AND_DETERMINE / DO_DETERMINATIONS
/ DO_DETERMINATIONS_RETRIEVE
/ DO_DETVAL
Thanks,
Bharath. -
Setting default values in a php dynamic list
I have a drop down list that is populated by a recordset consisting of two fields, company (a text field shown in the drop down list) and company_ID (an integer key )
The default value for the field Company should be "unknown", and the form should not submit if the sleted value is "unknown"
The selection once made is used to insert the value into a new record, along with many others on the full form..
The code is complicated by the fact that it also includes some java script code from a check form behaviour, shown in orange for completeness.
How do I change the PHP code so that it shows the default value of "unknown" in the select box when run, instead of showing the last item in the companies list?
Should be simple enough, but I am too close to see the solution.
<td>
<select name="Companies_ID" size="1" class="contclass" id="Companies_ID" >
<%
while (!compny.EOF) {
%>
<option value="<%=(compny.Fields.Item("ID").Value)%>" <%=((compny.Fields.Item("ID").Value == (compny.Fields.Item("ID").unknown))?"SELECTED":"")%> <?php if (!(strcmp("<%=(compny.Fields.Item(\"ID\").Value)%>", $row_rsCompany['ID']))) {echo "selected=\"selected\"";} ?>><%=(compny.Fields.Item("company").Value)%></option>
<%
compny.MoveNext();
if (compny.CursorType > 0) {
if (!compny.BOF) compny.MoveFirst();
} else {
compny.Requery();
%>
<?php
do {
?>
<option value="<?php echo $row_rsCompany['ID']?>"<?php if (!(strcmp($row_rsCompany['ID'], $row_rsCompany['ID']))) {echo "selected=\"selected\"";} ?>><?php echo $row_rsCompany['company']?></option>
<?php
} while ($row_rsCompany = mysql_fetch_assoc($rsCompany));
$rows = mysql_num_rows($rsCompany);
if($rows > 0) {
mysql_data_seek($rsCompany, 0);
$row_rsCompany = mysql_fetch_assoc($rsCompany);
?>
</select>
<input name="company" type="hidden" id="company" value="<?php echo $row_rsCompany['company']; ?>" /></td>
<td>Select from list. If it does not exist, add a Company. </td>
mysql_data_seek($rsTypes, 0);
$row_rsTypes = mysql_fetch_assoc($rsTypes);
?>
</select>
<input name="company" type="hidden" id="company" value="<?php echo $row_rsCompany['company']; ?>" />Thanks Bregent - your comment made me think again, and now the problem does not exist - in fact it never really did.
I did not explain it properly.
The form that I am using has many different items on it, some of which are static and some that are not.
All the static fields show the word "unknown" when the page loads.
None of the dynamic fields do, but I would like them to.
Here is a section of newly created code as a test. I first created a drop down list with a default of "unknown" and then dynamically populated it. This produced the following code:
<form action="" method="get">
<select name="testing" size="1">
<option value="unknown" <?php if (!(strcmp("unknown", $row_Recordset1['ID']))) {echo "selected=\"selected\"";} ?>>unknown</option>
<?php
do {
?>
<option value="<?php echo $row_Recordset1['ID']?>"<?php if (!(strcmp($row_Recordset1['ID'], $row_Recordset1['ID']))) {echo "selected=\"selected\"";} ?>><?php echo $row_Recordset1['type']?></option>
<?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
$rows = mysql_num_rows($Recordset1);
if($rows > 0) {
mysql_data_seek($Recordset1, 0);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
?>
</select>
</form>
When I am in split view, all I see is a box with "unknown" in it, which is what I want.
When I switch to live view, or view it in a browser, It shows the word "Z Smith & Co" - which is the last record on file in the current sort order.
What I was trying to attain, was to put the static text "unknown" in this field, so that if the user does not select anything then the word "unknown" goes into the record of the (different) table that is being created.
However, on reflection, I must allow the user to select whatever he likes into this field. If he does not know the company that should be there, he selects unknown from the list.
Just shows how thinking wrongly can cause lots of problems.
Have a merry Christmas and a Prosperous New Year. -
Setting Default values for field using custom.pll
Hi All,
I have an rquirement to set the default values on Meterial Tranasction screen for some condition
I tried it in both ways via Form Personalization and using custom.pll
i m using the following code in custom.pll
form_name varchar2(30):= name_in('system.current_form');
block_name varchar2(30):= name_in('system.cursor_block');
trx_type varchar2(30);
subinv varchar2(30);
begin
if form_name='WIPTXMAT' and block_name ='MTL_TRX_LINE' then
if event_name ='WHEN-VALIDATE-RECORD' then
trx_type:=name_in('WIPTXMAT.TRANSACTION_TYPE');
if trx_type ='WIP Return' THEN
copy(10,'MTL_TRX_LINE.TRANSACTION_QUANTITY');
copy(10,'MTL_TRX_LINE.NUMBER_OF_LOTS_ENTERED');
sinv:=trim(name_in('MTL_TRX_LINE.SUBINVENTORY_CODE'));
if sinv is null then
copy(subinv,'MTL_TRX_LINE.SUBINVENTORY_CODE');
copy(fr_locator,'MTL_TRX_LINE.LOCATOR');
FND_MESSAGE.SET_STRING(sinv);
FND_MESSAGE.SHOW;
end if;
end if;
end if;
end if;
end event;
Problem is that default values are getting set but not for all rows . if there are 4 records then values are set for only first 2 rows and if there are 2 rows then defaults are set for 1st row only.
Same behaviour happens when i do it via form personalization
i couldn't understand the behaviour of WHILE-VALIDATE-RECORD event..
Please provide some suggestion on it. its really urgent.
Thanks in Advance
RenuWorks Now...
-
Multi Select Prompt DEFAULT VALUE
Hi, i have following problem:
I have two multiselect prompt Country with all Countries and Day with values from 1 to 31. When i load dashboard page, the first and second prompt are empty. First and second prompt have as default value "Report Default". But, when i load the page, the real value of first prompt is ALL Values, in fact report shows all Countries, indeed the second prompt has as default value 1. In fact i see day 1 for all countries. Because two prompts have the different behaviour? How can i set as default value of the second prompt All Choices as the first?
Thanks
Giancarlohow did you resolve it..?
-
IProcurement Requisition Distribution DFF attributes not defaulting value
Hi All,
DB:10.2.0.4.0
Oracle Apps:12.0.l6
O/S:AIX 5.3 L
Problem Description:
We have enabled Requisition Distribution DFF on iProcurement page and it has 4 attributes. In DFF configuration we have set Attribute3 and attribute4 to have a default value of type SQL Statement. When user selects/changes Attribute1 and attribute2 values on requisition distribution DFF in iProcurement, rest of the attributes should default. This happens in core purchasing.
But in iProcurement when user goes for editing requisition lines and tries to change attribute1 and/or attribute2 on distributions rest of the attributes on that DFF do not default according to default value setup in DFF configuration. We believe that as same DFF is used on core purchasing and iProcurement, DFF behaviour should be same on both applications.
Workaround:
User has to explicitly click on each LOV attached to the DFF attributes and select correct value from LOV. Values do not get defaulted as expected.
Could anyone please share resolution on the above issue faced before.
Thanks for your time!
Regards,Here are the steps to enable Dist DFF on iProcuremet page
1. Setup the attributes and DFF's from Application Developer Flexfields and freeze
2. Enable personalization for OAF Pages
3. From iProcurement, while submitting Requistion, go to Edit Lines --> Account tab
4. Click on Charge Account link
5. Click "Personalize Stack Layout: (AccountsDistsRN)"
6. Find "Column: (ReqDistDFFOnAcctCol)"
7. Change the "Rendered" property to True.
I'm sure you will find some metalink notes on the above. But this the desinged approach to show DFF on iProcurement pages.
Hope this helps. -
FP default-values and diagram "constants" can change in LabVIEW 6.1 and 7.1
Hi Folks,
I'm posting here [instead of bug report] first, in case this isn't really a bug.
I created a bunch of similier VIs with type-def cluster inputs, and, on each VI, gave the clusters a default-value. I'm finding that when these typedefs are changed by removing an element, the default FP values are corrupted. In my case it gets worse. When I used these VIs on diagrams, I frequently created a cluster-constant - derived from the VI's cluster-control (described above.) The remaining elements in the diagram-"constants" are also changing.
Regards
P.S. Sorry if topic has already been discussed! (I did search a "bit", first...)
Message Edited by Dynamik on 10-28-2005 10:44 PM
When they give imbeciles handicap-parking, I won't have so far to walk!
Attachments:
Untitled12.vi 17 KB
Untitled.ctl 7 KBThis sounds like it could be a bug AND normal operation.
There are bugs in LV 7.1, 7.0 and possibly earlier that cuases LV to choose the wrong value when bundling and un-bundling by name.
I have been told these are fixed in LV 8.0
See this thread for more details on the bug.
http://forums.ni.com/ni/board/message?board.id=170&message.id=105455&jump=true
Now as far as the constants that are based on the typedef changing, tht is normal behaviour. As Odd_Modem mentioned, doing an explicit bundle by name is the way to handle this. If you use the same "constant" repeatedly in your code, a sub-VI that does the bundling makes your code a lot easier to read.
Here is a code snippet
and the source for that example can be ound in this thread.
http://forums.ni.com/ni/board/message?board.id=170&message.id=148471#M148471
Ben
Message Edited by Ben on 10-29-2005 10:42 AM
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction -
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 -
Default Value is not getting displayed in SUN ONE Ldap
Hello,
I have created an attribute in slapd.user_at.conf and it is associated in slapd.user_oc.conf.
The attribute default value is given through SUN ONE Console. But, In our application the default value is not getting displayed.
We need the default value to run our applicatin. Can anyone help me for this issue
Regards,
K. Senthil KumarHi anandkumar,
I belive this issue can be resolved by changing the Query proprties for the perticular field.
Kindly check the Field proerties in query designer and ensure that Text is enabled ather than Key.
__Field property check up:__Go to query designer->click onn the field-> Right hand side in properties click on display tab-> select Text in drop down menu of Display as tab.
FURTHER CHECK UP: check the master data avaiulability for the perticular info object, if masterdata is not available, do the text data for txt data availability in report level.
Hope this helps you!!
Best Regards,
Maruthi -
How to load a default value in to a column when using sql loader
Im trying to load from a flat file using sql loader.
for 1 column i need to update using a default value
how to go about this?Hi!
try this code --
LOAD DATA
INFILE 'sample.dat'
REPLACE
INTO TABLE emp
empno POSITION(01:04) INTEGER EXTERNAL NULLIF empno=BLANKS,
ename POSITION(06:15) CHAR,
job POSITION(17:25) CHAR,
mgr POSITION(27:30) INTEGER EXTERNAL NULLIF mgr=BLANKS,
sal POSITION(32:39) DECIMAL EXTERNAL NULLIF sal=BLANKS,
comm POSITION(41:48) DECIMAL EXTERNAL DEFAULTIF comm = 100,
deptno POSITION(50:51) INTEGER EXTERNAL NULLIF deptno=BLANKS,
hiredate POSITION(52:62) CONSTANT SYSDATE
)-hope this will solve ur purpose.
Regards.
Satyaki De. -
Assigning a default value to a field
Hello Everyone,
Could you please tell me how to assign a default value to a field in a transparent table, so that while creating an entry even if we don't enter the value, a default value will be assigned.
Thanks,
Anbu.Like this
DATA: BEGIN OF itab OCCURS 0,
field1 TYPE c VALUE 'X'
field2 TYPE c,
END OF itab.
append itab.
append itab.
You will have by default X set in both rows for field1.
Regards
Marcin
PS: Ooops I just noticed you meant transparent table but I wrote about internal one. As long as you maintain that table using maintenance view you can use event 05 - When Creating a New Entry and set fixed value for a field there. So whenever you create new entry it will receive that value.
Edited by: Marcin Pciak on Jun 23, 2010 8:57 AM -
SQLLDR - how to set a default value for an empty string
I'm using SQLLDR to load data from a flat file on Oracle 10g 10.2.0.4 EE, Linux RHEL 4 update 6. Seems like my question is simple, but darned if I can't find the solution.
My source file (comma delimited extracted form a different RDBMS) has some (not all) rows where the output for a string is "", and not NULL. How do I check for empty string and add a default value in the control file? The target column is non-nullable
Here's my current control file - however, the column attributeName where sometimes the source record is "" does not get evaluated as NULL.
load data
infile 'mydata.del'
badfile 'mydata.bad'
discardfile 'mydata.dsc'
into table mydata
fields terminated by "," optionally enclosed by '"'
TRAILING NULLCOLS
(l_metadata,
company,
className,
attributeName "decode(:vc_attributeName,null, 'none')",
attributeDefault)
{code}
When I tried decode with "", I received the following error:
{code}SQL*Loader-350: Syntax error at line 11.
Expecting "," or ")", found ", 'none')".
attributeName "decode(:vc_attributeName,"", 'none')", {code}
This does not work either:
{code}
load data
infile 'mydata.del'
badfile 'mydata.bad'
discardfile 'mydata.dsc'
into table mydata
fields terminated by "," optionally enclosed by '"'
TRAILING NULLCOLS
(l_metadata,
company,
className,
attributeName NULLIF attributeName = BLANKS ,"decode(:vc_attributeName,null, 'none')",
attributeDefault) I get the following in the log:
Table COMPANYMETADATA, loaded from every logical record.
Insert option in effect for this table: INSERT
TRAILING NULLCOLS option in effect
Column Name Position Len Term Encl Datatype
L_METADATA FIRST * , O(") CHARACTER
COMPANY NEXT * , O(") CHARACTER
CLASSNAME NEXT * , O(") CHARACTER
ATTRIBUTENAME NEXT * , O(") CHARACTER
NULL if ATTRIBUTENAME = BLANKS
SQL string for column : "decode(:attributeName,null, 'none')"
ATTRIBUTEDEFAULT NEXT * , O(") CHARACTER
Record 1: Rejected - Error on table COMPANYMETADATA, column ATTRIBUTENAME.
ORA-01400: cannot insert NULL into ("SRV5"."COMPANYMETADATA"."ATTRIBUTENAME")
{code}
Any help is appreciated -
Edited by: kpw on Feb 9, 2009 11:10 AMHello,
I just loaded following data successfully in my_data table using the same control file I posted. Yes it will evaluate "" as null and replace with none, remember in control file you have this option, "optionally enclosed by '"'.
#my_data.dat
"myname1", "attribname1"
"myname2", "attribname2"
"myname3", "attribname3"
"myname4", ""
#my_data.ctl
load data
into table my_data
fields terminated by "," optionally enclosed by '"'
TRAILING NULLCOLS
my_name char(30),
vc_attributeName "decode(:vc_attributeName,null, 'none', :vc_attributeName)"
{code}
Here is the output log file
{code}
Control File: my_data.ctl
Data File: mydata.dat
Bad File: mydata.bad
Discard File: none specified
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table MY_DATA, loaded from every logical record.
Insert option in effect for this table: INSERT
TRAILING NULLCOLS option in effect
Column Name Position Len Term Encl Datatype
MY_NAME FIRST 30 , O(") CHARACTER
VC_ATTRIBUTENAME NEXT * , O(") CHARACTER
SQL string for column : "decode(:vc_attributeName,null, 'none', :vc_attributeName)"
Table MY_DATA:
4 Rows successfully loaded.
0 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 18560 bytes(64 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 4
Total logical records rejected: 0
Total logical records discarded: 0
Run began on Mon Feb 09 18:17:35 2009
Run ended on Mon Feb 09 18:17:36 2009
Elapsed time was: 00:00:00.98
CPU time was: 00:00:00.10
{code}
Hope this helps clearing your dobuts
Regards
Maybe you are looking for
-
Disk Utility won't let me do anything with broken flash drive?
Hi there, I own an 8GB SanDisk flashdrive that recently, and out of nowhere, changed permissions to write only. I feel like this may have something to do with the fact that when it was in my old Macbook I would close the screen with it still inserted
-
Transferring file from my old iBook
I've searched for the instructions to transfer files from my iBook to my MacBook but have come up empty. Would someone be kind enough to give me instructions?
-
Encrypted Sd card on BB Q10 now cant use it!!
Hey! I did the mistake and encypted my SD card on my BB Q10. One day i woke up and the phone just died on me. I tried everything to bring it back to life but the only life it gets is when i plug the charger into the phone without a battery the let li
-
I have not seen any physical attribute that makes the third gen iPad look different than the iPad 2. I am sure the serial number would give it away ... are there any obvious features or markings? Like the placement of buttons or camera
-
Which SharingReference I need to add at a portal service for these packages
Hello, I have written a portal service, not at the Dynpro, environment which uses these imports: com.sap.tc.webdynpro.progmodel.api.IWDNode; com.sap.tc.webdynpro.progmodel.api.IWDNodeElement; com.sap.tc.webdynpro.services.sal.url.api.IWDCachedWebReso