indicates the column NULL values if I need display - (hifen or less symbol)
In the Obiee displays NULL values if I need display - (hifen or less symbol),Please someone help me...
Thank you
René-coral
If your column is around, then she can raise error. Try:
IFNULL (cast (column as a varchar (10)), '-')
Tags: Business Intelligence
Similar Questions
-
Newbie - sorting data at the top and bottom of the column, NULL values
I have this example:
drop table da;
create table (da)
ANAME varchar2 (10)
, number (3,0) db_ID
(, dc_ID number (3.0));
insert into da(aname,db_id,dc_ID) values('Apples',1,100);
drop table db;
Create table (db)
VARCHAR2 (10) aBBB
, rec_id number (3.0)
(, number (3.0)) db_id.
insert into db (aBBB, rec_id, db_id) values('B1test',1,1);
insert into db (aBBB, rec_id, db_id) values('B2test',2,1);
drop table dc;
Create table (dc)
VARCHAR2 (10) of the aCCC
, rec_id number (3.0)
(, dc_id number (3.0));
insert into dc (aCCC, rec_id, dc_id) values('C1test',10,100);
insert into dc (aCCC, rec_id, dc_id) values('C2test',20,100);
insert into dc (aCCC, rec_id, dc_id) values('C3test',30,100);
Select aname, db_id, dc_Id
abbb, accc null null
of da
where db_id = 1
Union of all the
Select A.aname, A.db_id, null dc_id
B.aBBB, accc null
DB B right outer join da A
ON B.db_id = A.db_id
Union of all the
Select A.aname, null db_id, A.dc_id
null aBBB, B.accc
Since DC B right outer join da A
ON B.dc_id = A.dc_id
I get results like:
ANAME DB_ID ABBB ACCC DC_ID
---------- ---------- ---------- ---------- --------
Apple 1 100
Apples 1 B1test
Apples 1 B2test
Apples 100 C1test
Apples 100 C2test
Apples 100 C3test
However, I want to be:
ANAME DB_ID ABBB ACCC DC_ID
---------- ---------- ---------- ---------- --------
C1test of B1test of 1 100 apples
C2test of B2test of 1 100 apples
Apple 1 100 C3test
Suggestions?
TIA.
Steve42Actually looking at your results once again, that don't necessarily look as a problem of sorting.
What is your version of Oracle?
Can you explain why these lines are your expected results? For example if I have run the following query I see these results:
SQL> SELECT DA.ANAME 2 , DA.DB_ID 3 , DA.DC_ID 4 , DB.ABBB 5 , DC.ACCC 6 FROM DA 7 JOIN DB ON DA.DB_ID = DB.DB_ID 8 JOIN DC ON DC.DC_ID = DA.DC_ID 9 ORDER BY 1, 2, 3, 4, 5 10 / ANAME DB_ID DC_ID ABBB ACCC ---------- -------------------- -------------------- ---------- ---------- Apples 1 100 B1test C1test Apples 1 100 B1test C2test Apples 1 100 B1test C3test Apples 1 100 B2test C1test Apples 1 100 B2test C2test Apples 1 100 B2test C3test
Yet in your results, you have your lines collapsed as B1TEST and C1TEST are in the SAME ROW, but B2TEST is not in the same line as C1TEST or C3TEST. Why?
Is that what you are looking for?
SQL> SELECT DA.ANAME 2 , DA.DB_ID 3 , DA.DC_ID 4 , DB.ABBB 5 , DC.ACCC 6 FROM DA 7 JOIN DC ON DC.DC_ID = DA.DC_ID 8 LEFT OUTER JOIN DB ON DA.DB_ID = DB.DB_ID AND SUBSTR(DB.ABBB,2,1) = SUBSTR(DC.ACCC,2,1) 9 ORDER BY 1, 2, 3, 4, 5 10 / ANAME DB_ID DC_ID ABBB ACCC ---------- -------------------- -------------------- ---------- ---------- Apples 1 100 B1test C1test Apples 1 100 B2test C2test Apples 1 100 C3test
Published by: Centinul on January 15, 2010 11:01
-
A statement UPDATE changes the line if the update changes the column even value?
HI -.
I have a main classification and the corresponding audit table. I have a trigger. I created using the suggestion:http://www.runningoracle.com/product_info.php?products_id=211
Now the problem that I am facing is that: if I run the same query (same value) update on the main table for n times (with the same data)... my audit table is updated with a new record every time. He is not able to determine that the value is the same.
My goal is to load the audit table data if the value in a cell in the main table is really have changed.
A statement UPDATE changes the line if the update changes the column even value?
Best regards
I have a main Table and the corresponding Audit Table. I have a trigger. I created using the suggestion:http://www.runningoracle.com/product_info.php?products_id=211
Why?
You try to resolve what made you what are the PROBLEM that select as the solution?
Now the problem that I am facing is that: if I run the same query (same value) update on the main table for n times (with the same data)... my audit table is updated with a new record every time.
Yes - it is EXACTLY what you say that you wanted to do and EXACTLY what the code does in this article.
He is not able to determine that the value is the same.
I think you mean that the code does NOT check if the value is the same. You can certainly change the code to do this check. But I have a question to start with your need for such a solution.
My goal is to load the audit table data if the value in a cell in the main table is really have changed.
OK - then modify the code to check EACH COLUMN and compare its NEW value to the OLD value and insert only the table of audit if SOME (or columns you care specifically) have changed.
A statement UPDATE changes the line if the update changes the column even value?
It depends on what you mean by 'change the line '. Of course to update a column with the SAME value does not change the resulting data value.
But the physical structure of the line, the location of the pieces of line and information in the header block (YVERT, etc.) will change. And, as others have said Oracle doesn't know and doesn't care, so if the new value of a column is the same as the old value will create redo, undo and the rest.
Start over and tell us what PROBLEM you're trying to solve. Then we can help you find the best way to solve it.
-
I have a table with a city of the column. Values are 'delhi' and 'hyderabad '.
I have a table with a city of the column. Values are 'delhi' and 'hyderabad '.
as
ID | City
---------------------------
1 | Delhi
----------------------------
2 | Hyderabad
Now, I have to update Delhi and Hyderabad Hyderabad with Delhi.
How to do this?
Hi Indi,
(1) why do you want what it? Requirements of companies?
(2) how much these values you want to reverse? Is it only "Delhi" and "Hyderabad", or there is a list, or other logic?
Update your_table
Set city = decode (lower (city), 'delhi', 'Hyderabad', 'hyderabad', 'Delhi')
where lower (city) ('Delhi', 'hyderabad');
Does that help?
-
Need to get the latest news for a group-max (value) of the non-null values
Hello
Here is my table and data
SQL > desc method
NUMBER OF SEQ_ID
EMP_ID NUMBER
ISSUE GUID
FIRST NAME VARCHAR2 (30)
LAST_NAME VARCHAR2 (30)
E-MAIL VARCHAR2 (45)
PHONENO VARCHAR2 (30)
SQL > Select * method;
SEQ_ID EMP_ID GUID FIRST_NAME LAST_NAME EMAIL PHONENO
------ - ----- ---- --------- --------------------------------------------------- ----------------------------------------- ------------------------------
1 100 20 RAJA HHH 686678
2 100 20 [email protected]
3 100 20 RAJA 134555
4 100 20 HAPPY [email protected]
5 200 20 RAM
6 200 20 JJJ 2345667
7 200 20 RM GGG [email protected] 1234557
8 200 20 [email protected] RRR
8 selected lines
I want the latest news on the employee, the group id comibnation for the rest of the columns.
So I want to get the following result.
100 20 RAVI HHH [email protected] 134555
200 20 RRR GGG [email protected] 1234557
If you note here for the family name, we take the previous value non-zero value Eg HHH column and is the same for all columns.
It's the value of line max (seqid) for empid, combination of guid and if the column values are null, we must get the previous maximum value non-zero.
The seqid is also there that the sequence.
Please help me to get the result set.
Thanks in advance.
mjhraja.SQL> select emp_id, guid, max(first_name) first_name, max(last_name) last_name 2 , max(email) email, max(phoneno) phoneno 3 from ( 4 select emp_id, guid 5 , first_value (first_name ignore nulls) 6 over (partition by emp_id, guid order by seq_id desc) first_name 7 , first_value (last_name ignore nulls) 8 over (partition by emp_id, guid order by seq_id desc) last_name 9 , first_value (email ignore nulls) 10 over (partition by emp_id, guid order by seq_id desc) email 11 , first_value (phoneno ignore nulls) 12 over (partition by emp_id, guid order by seq_id desc) phoneno 13 from emp_info 14 ) 15 group by emp_id, guid 16 / EMP_ID GUID FIRST_NAME LAST_NAME EMAIL PHONENO ---------- ---- ---------- ---------- -------------------- ---------- 100 20 RAVI HHH [email protected] 134555 200 20 RRR GGG [email protected] 1234557 SQL>
-
Jongware provided two ideas to force the table rows and columns in the heights and widths smaller than the Indesign predefined 1.058 mm.
For lines: app.selection [0] .properties = {autoGrow:false, height: "0.5 mm"};
And for columns he sugested: app.selection [0] .width = "0.5 mm;
The problem is that, while the code for lines works perfectly, for the columns return a error "Unit expected, but received 0.5 mm" I'm under Indesign cs6. Someone has ideas to help fixing such script, or maybe a different approach? Thank you!
HM, other than the use of InDesign CS5.5 or underneath with scripts?
Or export IDMS, open and edit (by script of course, it is just a plain text file in disguise), place IDMS and replace the table?(IDML as an alternative)
Laughing out loud
Uwe
-
ALTER TABLE with the column NULL time consuming
Hello
I have a table with nearly 2 million documents (about 10 GB size table) when I perform the following change statement its run fast
ALTER TABLE tbl_1 ADD (DEFAULT col_4 NUMBER 100 NOT NULL);
but when I do not give the NOT NULL in the alter its taking a long time to complete this i.e tbl_1 of ALTER TABLE ADD (NUMBER col_4 by DEFAULT 100); once I do the column as NOT NULL.
Can someone explain why is it happening like that regarding the execution point.
Thanks in advance.
I can reproduce the effect in 11.2.0.1 - but not in 12.1.0.1.
drop table tbl_1;
create table tbl_1
as
Select rownum id
, lpad ('* ', 50,' *') padding
of the double
connect by level<=>=>
ALTER TABLE tbl_1 ADD (NUMBER col_4 by DEFAULT 100);
--> slow in 11.2.0.1; fast 12.1.0.1
ALTER TABLE tbl_1 ADD (DEFAULT col_4 NUMBER 100 NOT NULL);
--> Quick 11.2.0.1 and 12.1.0.1
A SQL trace for two operations (11g) shows that the altar slow (without the constraint explicit non-null) made explicit (and tedious) update of any row in the table:
Update 'TBL_1"set"COL_4"= 100
call the query of disc elapsed to cpu count current lines
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.02 0 1 0 0
Run 1 11,63 33.56 8336 1016125 2053531 1000000
Fetch 0 0.00 0.00 0 0 0 0
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Total 2 11,63 33,58 8336 1016126 2053531 1000000
The other trace file does not contain the explicit Update. I guess in the optimized case that oracle stores somewhere that col_4 has the value 100 and updates only the line of the block after completing DML operations. But that's just a guess.
-
Select the column of values such as 1 row of values (separated by commas)
Hi all
I've got a column of values:
2062
2063
2072
2073
etc...
How to choose these values as a single line (separated by commas)?
Here is my test scenario:
select '2062' as bacc from dual union all select '2063' as bacc from dual union all select '2072' as bacc from dual union all select '2073' as bacc from dual
http://rogertroller.blogspot.com/2009/10/5-ways-to-aggregate-columns-into-comma.html
There is an option is missing... the new oracle 11g listagg function
HTH
-
Error trying to filter the column named 'value' in the tab data
I do not know it is because of the name of the column because all the other columns are working fine, but when I try to filter on the value = 60, I get an error:
ORA-01722 invalid number
Code provider 1722
Is there a way I can filter this column? I tried quotes around column name, 'value' = 60, but that did not help.
Thank you
-BillWhat is the column data type and details? What happens if you (single) quote "60" instead?
K.
Published by: - K - 10/28/2009 14:12: corrected apostrophes
-
Query that count only the column null lines
create table test
(a varchar2 (10))
b varchar2 (10),
c varchar2 (10),
d varchar2 (10),
e varchar2 (10));
SQL > DESC TEST
Name Null? Type
------------------------------- -------- ----
A VARCHAR2 (10)
B VARCHAR2 (10)
C VARCHAR2 (10)
D VARCHAR2 (10)
E VARCHAR2 (10)
SQL > SELECT * FROM TEST;
A B C D E
---------- ---------- ---------- ---------- ----------
A1 - A3 A4-
B1 - B3, B4-
C1 - C3 C4-
D1 - D4 D5
-E2 - E4 E5
I want an application that only count the rows of the column as null
A B C D E
--- ---- ----- ------ -------
1 4 2 0 3
Published by: Nilesh hole, Pune, India, on August 28, 2009 12:30select SUM(case when a is null then 1 else 0 end) ,SUM(case when b is null then 1 else 0 end) ,SUM(case when c is null then 1 else 0 end) ,SUM(case when d is null then 1 else 0 end) ,SUM(case when e is null then 1 else 0 end) from TEST /
Published by: Toon Koppelaars August 28, 2009 09:07
-
the non-null values insert select
Please could you help me on this:
INSERT INTO new_table (ID, hobby, country, internal_id, cat)
SELECT ID, hobby, country internal_id,
Max (CASE cat WHEN = 'ben' THEN 1
WHAT cat = 'ale' THEN 2
WHAT cat = 'inf' THEN 3
WHAT cat = "cad" THEN 4
WHAT cat = 'juv' THEN 5
WHAT cat = 'sen' THEN 6
WHAT cat = 'teacher' THEN 7
END)
Ancienne_table GROUP BY ID, hobby, country, internal_id;
the lines on ancienne_table have duplicates regs as follows:
ID Country Hobby Internal_ID CAT 1 Oman Rugby Union 63180 Juv 1 Oman Rugby Union 63180 Teacher 1 Oman Rugby Union 63180 Juv the request requires the output as follows:
ID Country Hobby Internal_ID CAT 1 Oman Rugby Union 63180 7 because cat = 'juv' (5) is less cat =' teacher (7).
all columns are not null and the primary key of the new_table is ID + hobby
The script displays the following output:
01400 00000 - 'impossible to insert NULL into (%s)' because does not recognize the function max.
Thanks in advance.
Kind regards.
Actually there are values not in the range of cat. There is an error in the old data table.
I proceeded to remove the lines out of reach in the cat because column that are not relevant in this case.
The parameters I use Oracle are:
Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
PL/SQL Release 11.2.0.1.0 - Production
"CORE 11.2.0.1.0 Production."
AMT for 64-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
Thank you very much. You are so helpful.
Kind regards.
-
update line and reset the value of the column
I have table (CORS_MTR) with 3 columns...
SEQ ID of the EPR the ID of the child / / desc 100 22 1 one 101 22 2 two new entry as 1 number , that means change the flow of child #
102 22 3 three When I enter the new line in number of children 1 instead of 2 and then the values of the column (child id, desc) another need to be reset as...
SEQ ID of the EPR the ID of the child / / desc 100 22 2 two 101 22 1 one 102 22 3 three 103 22 4 four SEQ PRT_ID CHILD_ID DESC_ 100 22 1 one 101 22 2 two 102 22 3 three declare
number of p_seq: = 103;
number of p_prt_id: = 22;
number of p_child_id: = 1;
p_desc varchar2 (25): = 'a ';
Start
Update cors_mtr
set seq = case when child_id = p_child_id
then seq + 1
other seq - 1
end
where prt_id = p_prt_id
and child_id (p_child_id, p_child_id + 1);
insert into cors_mtr (seq, prt_id)
values(p_seq,p_prt_id);
Update cors_mtr
Set child_id = (select max (child_id) + 1 of the cors_mtr).
desc_ = (select to_char (to_date (max (child_id) + 1, 'J'), 'jsp') of cors_mtr)
where child_id is null.
end;
SEQ PRT_ID CHILD_ID DESC_ 100 22 2 two 101 22 1 one 102 22 3 three 103 22 4 four Concerning
Etbin
-
Fill with the previous 'not null' value ' Null' known values
Hi all
I have the following requirement to fill in missing values (null values) with the "Not null" values known previously available.
Source of the example:
Emp_Id Start_Dt LOC Comm Grade A101
01/01/2013
NJ 4000 B A101
15/03/2013
CA 4800 A101
15/05/2013
3500 C A101
25/07/2013
2500 A101
20/12/2013
NY 5800 A A101
14/02/2013
5000 A101
20/05/2014
DC 6000 A A101
03/06/2014
3600 C A102
24/05/2013
THE 5000 A A102
15/12/2013 4300 Expected results values in columns LOC and grades:
Emp_Id Start_Dt LOC Comm Grade A101 01/01/2013
NJ 4000 B A101 15/03/2013
CA 4800 B A101 15/05/2013
CA 3500 C A101 25/07/2013
CA 2500 C A101 20/12/2013
NY 5800 A A101 14/02/2013
NY 5000 A A101 20/05/2014
DC 6000 A A101 03/06/2014
DC 3600 C A102 24/05/2013
THE 5000 A A102 15/12/2013
THE 4300 A Any suggestions would be helpful.
Kind regards
Arun
Also, I think that this is a case of analytics. Last_value is perhaps the most appropriate function for the given task:
Select emp_id
start_dt
last_value(loc ignore nulls) over (partition by emp_id arrested by start_dt) loc
comm
last_value(grade ignore nulls) about category (partition by emp_id arrested by start_dt)
t
-
Returns the null value in HasMap.get ().
Hi all.
Just read the docs of java on hashmap and was interested in this topic the get() method:
A NULL return value does not necessarily mean that the map contains no mapping for the key; It is also possible that the map explicitly maps the key null. The containsKey operation may be used to distinguish these two cases.
I took in a case, which has been talked about: If the map allow nulls, returned by get() null will be just one key of the pair-> null value. But the second case is not clear to me. Please, show me an example for the latter case, when get() can returned null.sphinks wrote:
I took in a case, which has been talked about: If the map permits null values, returned by get() null will be just a key pair-> null value. But the second case is not clear to me. Please, show me an example for the latter case, when get() can returned null.There is no second case. There is a single case, if you put a null value in a map, get() will return null. And because of that, if you need to know if a certain key is in the containsKey() worksheet should be used instead of the get() method.
-
Combine the rows based on the value of the column
I try to combine lines based on a common value.
Data in the table:
Result A
Here are my main request...Player_ID Player_Name Team_Name Points Sequence 99999 John Smith Bulls 50 1 99999 John Smith Pistons 14 2 What i want in the output Result B Player_ID Player_Name Team_Name Points 99999 John Smith Bulls 64 (50 for Bulls)
Current query gives me the result of the result of Aselect player_id, player_name, team_name, points from ( SELECT player_id, player_name, team_name, sum(points) sum_points FROM stats_data WHERE season_id = 2008 AND points > 0 GROUP BY player_id, player_name, team_name ) t ORDER BY sum_points DESC, last_name;
(1) not entirely sure how, to combine the player_id basic data
2) once I found 1, I'm sure that by adding the ("sum_points" for "team_name") to the output can be done with a case statement, I think?Hello
Thank you.
Let me make sure I understand: If a player on two or more teams, the one with the largest value of the sequence appears in the column team_name. Others will be displayed, in the order of sequence, in the points column.
This done:
WITH gb1 AS ( SELECT player_id, player_name, team_name, sequence , SUM (points) AS sum_points , ROW_NUMBER () OVER ( PARTITION BY player_id, player_name ORDER BY sequence DESC ) AS r_sequence , STRAGG (' ' || SUM (points) || ' for ' || team_name) OVER ( PARTITION BY player_id, player_name ORDER BY sequence ) AS all_points FROM game GROUP BY player_id, player_name, team_name, sequence ) SELECT player_id , player_name , MIN (team_name) KEEP (DENSE_RANK FIRST ORDER BY r_sequence) AS team_name , TO_CHAR (SUM (sum_points)) || MAX ( CASE WHEN r_sequence > 1 THEN ' (' || REGEXP_REPLACE ( SUBSTR (all_points, 2) , ' ,[^,]$' ) || ')' END ) AS points FROM gb1 GROUP BY player_id, player_name ORDER BY player_id, player_name;
The information listed in points (e.g. '(16 pour les TAUREAUX, 4 pour les PISTONS) ') requires the aggregation of the chain.
[AskTom.oracle.com | http://asktom.oracle.com/pls/asktom/f?p=100: 11:0:P11_QUESTION_ID:2196162600402] shows several ways to do so.
I used the first option on this page, the function defined by the user STRAGG, that you can copy from this page.You can have a similar function, the WM_CONCAT (property WMSYS), already installed.
WM_CONCAT is not documented, so you can't use it in your Production applications.
Maybe you are looking for
-
Camera driver not found on Satellite A200-130 Vista
In my new Satellite A200-130 (with built-in 1.3 m camera), impossible to find any software/driver of the camera installed.It presents Chicony USB 2.0 Camera in the device driver > imaging devices, but can't find the software anywhere shortcut in the
-
I'm looking for the narrow inverted comma without the curve!
original title: narrow inverted comma without the curve! Dear all Someone please show me how to type the comma inverted narrow except a right instead of a curve? I would be really grateful, as is the sign for the final accent in our language. I put
-
HP DeskJet Ink Advantage 1515: prodlem print text with black letters
Hello. I have the Hp DeskJet Ink Advantage 1515 AIO for 3 months. In the last month, I have a problem with the color black. When I print the text with black letters that some lines are not printed, but if the same row is a different color than black,
-
HP Pavilion a6712F: Windows vista says foxfire is still open when its ' not
Sometimes when I'm ready to work on the computer, a window appears & says that Foxfire is still running and to shut down before I could continue. As far as I know, it does not work. I have to restart to open a session. Using Windows Vista 64-bit. Tha
-
My PC requires a key code?
My PC crashed and could not be rebuted, I returned to the store where I bought it and they have replaced the hard drive and upgraded me to the software Vista system. It worked for a few days and then it wouldn't let me in the system. He aske for a ke