How to replace NULL values from main table
Dear all,
I like to remove the NULL values from a main table field. Or the question is how to replace any part of the string field in MDM repository main table field.
e.g. I have a middle name field partly the value is NULL in some hundreds of records, I like to replace NULL values with Space
any recommendation.
Regards,
Naeem
Hi Naeem,
You can try using Workflows for automatically replacing NULLs with any specific value.
What you can do is: Create a workflow and set trigger action as Record Import, Record Create and Record Update. So, that whenever any change will occur in the repository; that workflow will trigger.
Now create an assignment expression for replacing NULLs with any specific value and use that assignment expression in your workflow by using Assign Step in workflow.
For exiting records, you will have to replace NULLs manually using the process given by Preethi else you can export those records in an Excel spreadsheet which have NULLs and then replace all NULLs with any string value and then reimport those records in your MDM repository.
Hope this will solve your problem.
Regards,
Varun
Edited by: Varun Agarwal on Dec 2, 2008 3:12 PM
Similar Messages
-
How to fetch null values from a table
Hi,
This is a Attendance report
Table Name : Attn_details ( Only 3 records stored in this table )
EDate Etype
04/03/2010 A
05/03/2010 C
06/03/2010 X
user Enter From date : 01/03/2010
To date : 10/03/2010
I need the output 01/03/2010 to 10/03/2010
01/03/2010 Null
02/03/2010 Null
03/03/2010 Null
07/03/2010 Null
08/03/2010 Null
09/03/2010 Null
10/03/2010 Null
How to write a sql query, this is Urgent requirement, Help Me.EDate Etype Empcode
01/03/2010 A 001
02/03/2010 C 001
04/03/2010 X 001
02/03/2010 A 002
01/03/2010 P 003
5 records Like this stored in that table.
user Enter From date : 01/03/2010
To date : 04/03/2010
for that employee code attendance date not marking that date only should come into the report.
ECode 002 attendance not marked in the date of 01/03/2010 , 03/03/2010,04/03/2010
003 attendance not marked in the date of 02/03/2010 , 03/03/2010,04/03/2010
I need the output 01/03/2010 to 04/03/2010
03/03/2010 Null 001
01/03/2010 Null 002
03/03/2010 Null 002
04/03/2010 Null 002
02/03/2010 Null 003
03/03/2010 Null 003
04/03/2010 Null 003
i think now u clear the my requirement. how can i write the query. -
How to Replace Null Value as 0 in an OBIEE11g Pivot Table? it's working 10g
Hi,
How to Replace Null Value as 0 in an OBIEE11g Pivot Table? it's working in obiee10g version.
We have tried below methods
1) criteria tab and edit the ‘column properties’ associated with your fact measure. Choose the ‘Data Format’ tab, tick to override the default format and choose ‘Custom’.
It seems that the syntax for this custom format is positive-value-mask (semi colon) negative-value-mask (semi colon) null-mask. So this means we have a few options.
E.g. if you want zeros (0) instead of null then enter:
#,##0;-#,##0;0
2) in that formula columns we have put it below case condition also ,
Measure Column: Nom_amt --> edit formulas
CASE WHEN Nom_amt IS NULL THEN 0 ELSE Nom_amt END
3) we have uncheked IS NULL check box in the admin tool also
I tried above formats still it's not working for me..kindly help me on this..
thanks to do the needfull
Best Regards,
R.DevarasuHi,
Null value in database displaying as 0 in report, I need to keep value as in database, and I have one calculated row which is based on null values should also null in report.
but it showing 0 for null values also so, my calculated row showing wrong result.
my report is like
col1 col2
ABC 0
BCD 12
DEF -12 --this is calculated row.
I require result like:
col1 col2
ABC null
BCD 12
DEF null --this is calculated row.
Please let me know how I can achieve this.
Thanks,
Rahul -
How to Replace Null Value as 0 in an OBIEE11g Pivot Table?
Hi,
How to Replace Null Value as 0 in an OBIEE11g Pivot Table? it's working in obiee10g version.
We have tried below methods
1) criteria tab and edit the ‘column properties’ associated with your fact measure. Choose the ‘Data Format’ tab, tick to override the default format and choose ‘Custom’.
It seems that the syntax for this custom format is positive-value-mask (semi colon) negative-value-mask (semi colon) null-mask. So this means we have a few options.
E.g. if you want zeros (0) instead of null then enter:
#,##0;-#,##0;0
2) in that formula columns we have put it below case condition also ,
Measure Column: Nom_amt --> edit formulas
CASE WHEN Nom_amt IS NULL THEN 0 ELSE Nom_amt END
3) we have uncheked IS NULL check box in the admin tool also
I tried above formats still it's not working for me..kindly help me on this..
thanks in advance...
Best Regards,
R.DevarasuHi Amith,
I have update your suggested one,but it's working few of the rows only..remainings rows some of cells still NULL only
Measure colmns is : Nom_SGD
IFNULL(Nom_SGD,0.00)
Movment : dynamic date calc by using $2-$1 oracle formula's
Actually i am doing below things only,
31/12/2011 31/03/2011 Movment
Country
India 100 -50 -150
Singapore 200 200
UK 1200 -1200
USA 0.00 0.00 0.00 (here changed null as 0)
Helpmeon this... -
How to delete null values in a table
hi all,
tell me please any one how to delete null values in a table
example:
in emp table is there
empno ename job mgr sal deptno
7900 scott 7902 2000 10
7499 clerk 7900 20
7834 james manager 3000 30
like this in the above emp table there are some null values are there
so how to delete the null values in emp table
thanks,
regards.
Edited by: user9195968 on Feb 25, 2010 6:30 AMnot too sure what you mean, perhaps you could supply a table description and some sample data
but, consider
delete from table_1 where column_1 is null
commit
/ -
How to retrieve the values from a table if they differ in Unit of Measure
How to retrieve the values from a table if they differ in Unit of Measure?
If no data is read
- Insure that you use internal code in SELECT statement, check via SE16 desactivating conversion exit on table T006A. ([ref|http://help.sap.com/saphelp_nw70/helpdata/en/2a/fa0122493111d182b70000e829fbfe/frameset.htm])
If no quanity in result internal table
- There is no adqntp field in the internal table, so no quantity is copied in itab ([ref|http://help.sap.com /abapdocu_70/en/ABAPINTO_CLAUSE.htm#&ABAP_ALTERNATIVE_1@1@]).
- - Remove the CORRESPONDING, so quantity will fill the first field adqntp1. ([ref|http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_WA.htm])
- - Then loop at the internal table and move the quantity when necessary to the 2 other fields.
* Fill the internal table
SELECT msehi adqntp
INTO TABLE internal table
FROM lipso2
WHERE vbeln = wrk_doc1
AND msehi IN ('KL','K15','MT').
* If required move the read quantity in the appropriate column.
LOOP AT internal_table ASSIGNING <fs>.
CASE <fs>-msehi.
WHEN 'K15'.
<fs>-adqnt2 = <fs>-adqnt1.
CLEAR <fs>-adqnt1.
WHEN 'MT'.
<fs>-adqnt3 = <fs>-adqnt1.
CLEAR <fs>-adqnt1.
ENDCASE.
ENDLOOP.
- You could also create another table with only fields msehi and adqntp and then collect ([ref|http://help.sap.com/abapdocu_70/en/ABAPCOLLECT.htm]) the data to another table.
Regards,
Raymond -
Replacing Null Values From existing values in table.
Hi
Using 9i R(2).
Tbl_1
Col_A varchar2
Col_B varchar2
Col_C varchar3
(no PK/FK)
I want to inset the missing values (null values) of columns B & C by taking values from filled values from same table on base of Col_A.
Examples
Col_A || Col_B || Col_C
Item_1 || Red || 2Kg
Item_2 || Blue || 1.5 Kg
Item_1 || Null || Null
I want to inset values in the Null value fields of Row3 (Col_B & CoL_C) from Row1 as Col_A is same at both rows.
Please advise how to do it efficiently.
Thanks
Jawadhttp://www.orafaq.com/forum/m/160947/42768/#msg_160947
-
How to get string value from database table using Visual Studio 2005?
Hi,
Im developing plugin in illustrator cs3 using visual studio 2005. I need to get the values eneterd in database. Im able to get the integer values. But while getting string values it is returning empty value.
Im using the below code to get the values from database table
bool Table::Get(char* FieldName,int& FieldValue)
try
_variant_t vtValue;
vtValue = m_Rec->Fields->GetItem(FieldName)->GetValue();
FieldValue=vtValue.intVal;
CATCHERRGET
sprintf(m_ErrStr,"Success");
return 1;
Im using the below code to get the values.
AIErr getProjects()
char buf[5000];
int i;
std::string catName;
::CoInitialize(NULL);
Database db;
Table tbl;
errno_t err;
err = fopen(&file,"c:\\DBResult.txt","w");
fprintf(file, "Before Connection Established\n");
//MessageBox(NULL,CnnStr,"Connection String",0);
if(!db.Open(g->username,g->password,CnnStr))
db.GetErrorErrStr(ErrStr);
fprintf(file,"Error: %s\n",ErrStr);
fprintf(file, "After Connection Established\n");
if(!db.Execute("select ProjectID,ProjectName from projectsample",tbl))
db.GetErrorErrStr(ErrStr);
fprintf(file,"Error: %s\n",ErrStr);
int ProjectID;
int UserID;
int ProjectTitle;
char ProjectName[ProjectNameSize];
if(!tbl.ISEOF())
tbl.MoveFirst();
ProjectArrCnt=0;
for(i=0;i<128;i++)
buf[i]='\0';
int j=0;
while(!tbl.ISEOF())
if(tbl.Get("ProjectID",ProjectID))
fprintf(file,"Project ID: %d ",ProjectID);
ProjectInfo[ProjectArrCnt].ProjectID = ProjectID;
sprintf(buf,"%d",ProjectID);
//MessageBox(NULL, buf,"f ID", 0);
j++;
else
tbl.GetErrorErrStr(ErrStr);
fprintf(file,"Error: %s\n",ErrStr);
break;
//if(tbl.Get("ProjectTitle",ProjectName))
if(tbl.Get("ProjectName",ProjectName))
MessageBox(NULL,"Inside","",0);
fprintf(file,"ProjectTitle: %s\n",ProjectName);
//catName=CategoryName;
ProjectInfo[ProjectArrCnt].ProjectName=ProjectName;
//sprintf(buf,"%s",ProjectName);
MessageBox(NULL,(LPCSTR)ProjectName,"",0);
else
tbl.GetErrorErrStr(ErrStr);
fprintf(file,"Error: %s\n",ErrStr);
break;
ProjectArrCnt++;
//MessageBox(NULL, "While", "WIN API Test",0);
tbl.MoveNext();
//MessageBox(NULL, ProjectInfo[i].ProjectName.c_str(),"f Name", 0);
::CoUninitialize();
//sprintf(buf,"%s",file);
//MessageBox(NULL,buf,"File",0);
fprintf(file, "Connection closed\n");
fclose(file);
for(i=0;i<ProjectArrCnt;i++)
sprintf(buf,"%i",ProjectInfo[i].ProjectID);
//MessageBox(NULL,buf,"Proj ID",0);
//MessageBox(NULL,ProjectInfo[i].ProjectName.c_str(),"Project Name",0);
return 0;
In the above code im geeting project D which is an integer value. But not able to get the project name.
Please some one guide me.As I said in the other thread, this really isn't the place to ask questions about a database API unrelated to the Illustrator SDK. You're far more like to find people familliar with your problem on a forum that is dedicated to answering those kinds of questions instead.
-
How to retrieve 2 values from a table in a LOV
Hi
I'm pretty new to APEX. I try to retrieve two values from a table using a LOV. I have a table named DEBIT with then columns SITE, NAME and KEY
I want to display NAME to the user in a list. When the user select an item from the list, I want to retrieve the data of the SITE and KEY column of this item in order to launch an SQL command based on this two values.
How to retrieve thes two values whant the user chooses an item from the list ?
I apologize for my english, being french.
Regards.
ChristianChristian,
From what I understood about your requirement, you want a 'select list with submit' which displays "NAME" and based on the value selected, you want to get the corresponding values for "SITE" and "KEY" from the table.
<b>Step 1: Create a select list with submit, say P1_MYSELECT </b><br><br>
Use something like this in the dynamic list of values for the select list: <br>
SELECT NAME display_value, NAME return_value
FROM DEBIT<br><br>
<b>Step 2: Create a page process of type PL/SQL block. Also create 2 hidden items P1_KEY and P1_SITE. </b><br><br>
In the PL/sQL, write something like:
DECLARE
v_key DEBIT.KEY%TYPE;
v_site DEBIT.SITE%TYPE;
CURSOR v_cur_myvals IS
SELECT KEY, SITE
FROM DEBIT
WHERE NAME = :P1_MYSELECT;
BEGIN
OPEN v_cur_myvals;
LOOP
FETCH v_cur_myvals
INTO v_key,v_site;
EXIT WHEN v_cur_myvals%NOTFOUND;
:P1_KEY := v_key;
:P1_SITE := v_site;
END LOOP;
CLOSE v_cur_myvals;
END; <br><br>
Then you can use these values for whatever purpose you need to.
Hope this helps. -
How to post null values from h:inputText?
Hello,
I have a form made of h:inputText fields that map to an entity class as the backing bean. Whenever I post the form from a web page, all the fields that I did not fill out and that are mapped to String fields in the entity class are set to "" (empty string) instead of null.
However, I would like to post null values to my entity, because that would indicate that the user did not fill out the field. In other contexts (outside of the web app) it is possible to set the fields to empty strings, but from the web app it should always be null. How can I get JSF to do this correctly?
Also, when reading entitys with null values from the database, these are converted to empty h:inputText fields, so this direction works as expected.
UlrichI haven't seen a solution for this as far.
This is how I do it:
public void action() {
if (isEmpty(inputValue)) {
// do your thing
} else {
// do your thing
public static boolean isEmpty(Object value) {
if (value == null) {
return true;
if (value instanceof String && ((String) value).trim().length() == 0) {
return true;
if (value instanceof Collection && ((Collection) value).size() == 0) {
return true;
// And go so on .. make it an utility method.
return false;
} -
How to truncate the values from the table
Hi All,
I am working on an issue..where we are first deleting all the records from the table and then based on few conditions we are putting the records back in that table...when we tried to run this program along with few others those who are doing almost the same stuff we are having issues...we tried to schedule few jobs related to these programs only...but after a ceratin amount of time couple of jobs got canceled...I was talking to my basis guy and he said the problem is ratehr then truncating the records from the table we are deleting the records and it's taking lots and lots of space to execute...so we need to truncate the records from the table insted of deleting it...we are using the following the statement right now:
DELETE FROM ZTUS_PG.
COMMIT WORK.
So can you please tell me how can we truncate the values from this table instead of just deleting them and what would be effect of this.
Thanks,
Rajeev GuptaI don't think basis is saying you should delete all the records from the table. They are saying remove the table and it's contents (a much faster thing to do). I'm not sure this the right thing to do, but you can have a look at:
http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.apdv.sample.doc/doc/admin_scripts/s-truncate-db2.htm
Something like:
EXEC SQL.
TRUNCATE TABLE ZTUS_PG REUSE STORAGE
ENDEXEC.
COMMIT WORK. "Empty table is committed here
Rob
Edited by: Rob Burbank on Dec 1, 2008 4:06 PM -
How to select distinct values from a table when it has composite primary ke
Hi
I have the requirement like , I need to select distinct one column values from the table which has composite primary key. How to acheive this functioinality using view object.
Eg : Table 1 has col1 and col2, col3
col1 col2 col3
1 A NA
1 B NA
2 A NA
3 C NA
2 D NA
primary key (col1,col2)
I have to select distinct col1.
ThanksHi
I got the solution for above. By Creating the read only view object we can acheive this.
thanks -
How to extract the values from WPBP table
Hi experts,
We are in preparation of a custom report.
In the report we want to have a value from WPBP table.
We want to extract the value of Capacity utilization level from WPBP table.
Could you please let me know the way to extract the value.
Please advice.
Regards,
Sairam.Hi Sairam,
Why do you try to get capacity utilization level from WBPB. Even if there is split in payroll capacity utilizatian level in WPBP shows the value in IT0008 basic pay.
So instead you can get the required information from table PA0008 Field for capacity utilization level is BSGRD
Regards;
Okan -
How to display the values from the table in the screen
Hi,
I have created a screen where i will enter the values for the field treshold amount and desc and if i press update button .it will update the new values by overriting the existing values .
Now i have got requirement i need to create a button show which will display the existing value from the table. always there will be only one entry...in this table
Please can one give me idea...to do this
or sample code...thanks in advance
regards
paveeeeeeDefine a function code 'SHOW' for your button. In your PAI module, when you check for various sy-ucomms, check for 'SHOW' also.
Your code will be like this:
Case sy-ucomm.
when 'SHOW'.
perform show_details.
endcase.
In the perform, you can fetch the data from the table and put it in global variables. In the PBO, move the data from the global variables to the screen fields so that they get displayed on the screen.
Hope this helps. Reward points for useful answers.
Regards
Nithya -
Replace NULL values from PIVOT query
Hi,
I'm querying a table for sales, for some values, when now columns, the finish with a null value. How can I handle these values as 0 (zeros).
WITH PIVOT_DATA AS (
SELECT S.ZONE_CODE,Z.ZONE_NAME,S.YEAR,S.PERIOD,S.SALES
FROM STAT_TABLE_SALES VTA
JOIN ZONES Z ON S.COMP=Z.COMP AND S.ZONE_CODE=Z.ZONE_CODE
WHERE S.COMP = '001'
AND S.BRAND_CODE = '001'
SELECT *
FROM PIVOT_DATA
PIVOT(
SUM(SALES) FOR (YEAR,PERIOD) IN ((2009,1),
(2009,2),
(2009,3),
(2009,4),
(2009,5),
(2009,6),
(2009,7),
(2009,8),
(2009,9),
(2009,10),
(2009,11),
(2009,12),
(2010,1),
(2010,2),
(2010,3),
(2010,4),
(2010,5),
(2010,6),
(2010,7))
ORDER BY 14 DESC NULLS LAST;
This query returns the following:
COD_ZONA NOM_ZONA 2009_1 2009_2 2009_3
01 YEDUSIJH. 1382367.75 1559943.27 1441279.64
02 DO,ASKAK 711897.82 865854.05 1583232.3
03 ASDFG 130443.03 205409.84 178633.69
04 OSOIDSD 320118.32 439008.83 409251.18
05 ODFSDF 300908.21 276301.59 260188.53
06 CH 242749.65 325196.71 464938.9
07 SOA 610312.31 606312.93 754569.82
08 SAN 89426.8 81360.04 61649.27
09 YP 284487.79 328281.31 267210.85
10 TC 87043.28 158594.43 85195.8
11 BAGNN 76778.78 68180.76 118530.04
12 CRTS 122023.7 143442.21 134744.85
13 OCC 209992.79 196477.03 185222.14
14 IDLB
15 YA 23870.41 4137.33 16660.53
**These are not all the columns and rows, but this is a piece of what it returns.
How can I replace these NULLS with 0(zeros).Still not sure why nvl shouldn't suit your needs:
SQL> select ename, nvl (clerk_20, 0) clerk_20, nvl (sal_30, 0) sal_30
from emp pivot (sum (sal)
for (job, deptno)
in ( ('CLERK', 20) clerk_20, ('SALESMAN', 30) sal_30))
ENAME CLERK_20 SAL_30
WARD 0 1250
JONES 0 0
TURNER 0 1500
ADAMS 1100 0
ALLEN 0 1600
SMITH 800 0
CLARK 0 0
KING 0 0
BLAKE 0 0
JAMES 0 0
FORD 0 0
SCOTT 0 0
MARTIN 0 1250
MILLER 0 0
14 rows selected.
Maybe you are looking for
-
Script to Submit XFDF in the background?
I was wondering if anyone has any hints or techniques on how to submit a pdf as XFDF in the background using javascript on a web instance of Adobe Reader. Right now, I have a button that when the user hits save, submits the XFDF to another web page t
-
A window is popping up everytime I open firefox. It says "Want more options? Right click the app" It will not let me close it and won't let me continue on firefox until I give it an answer
-
Optimisation -Solid state drives
Log Name: Application Source: Microsoft-Windows-Defrag Date: 5.1.14 15:27:29 Event ID: 257 Level: Error Description: The volume System Reserved was not optimised because an error was encountered: The parameter is inc
-
Why are there 2 iPhoto icons in launch pad
In launch pad, there are 2 iPhoto (v9.3.1) icons; in Finder Applications folder there is one iPhoto icon. Both icons start in the same library and both appear identical v9.3.1. Why does this happen, and what can I do to remove one of the iPhoto ico
-
i had problem in my z3......so i submitted it to service centre.....after 50 days....they told me that company is going to replace my handset..... but when i got my new mobile(not sure)...i found there was a problem with phone speaker.....now i think