Need to fetch the column value which is not null
Hi All,
I have table
please find the table with the values
emp
eno ename addr1 addr2 addr3 postcode phone Default
1 null null null null null null Abc
null name null null null null null Abc
null null null null null null 123 Abc
5 null null abcdef null null 123 Abc
i need select the column with value alone.
Is it possible with a query.
My output for 1 row should be
eno,default
1, abc
I dont want to fetch the null value columns. I need to query to fetch for whole table.
Regards,
Mohanarangan K
Table values
eno ename addr1 addr2 addr3 postcode phone Default
1 null null null null null null Abc
null NAME null null null null null Abc
null null null null null null 123 XYZ
5 null null abcdef null null 123 XYZ
select from emp where default = 'XYZ'
It should fetch the
O/P:
phone default
123 XYZ
eno addr2 default
5 abcdef xyz
this way my output should appear. can you help me in this
Similar Messages
-
How to change the column value which is coming from DO by a calculated field?
Hi all,
I want to change a column value based on my calculated field value. I have a column which is coming from DO which is based on External Data Source. I have a calculated field in my report. When there is any change in the calculated field then the column which is coming from DO needs to be changed. It means the DO needs to get updated when there is a change in the calculated field. Or like if the calculated field meets some condition then I need to change/update the same in the DO. This has to be done on the fly. the report should not submitted for this. when there is a change in the calculated column the DO column needs to get updated.
Thanks,
Venky.Ok, I've been a customer for very many years, I'm on a fixed retirement
income. I need to reduce my bills, my contract ends in Dec. I will be
pursuing other options unless I can get some concessions from Verizon. My
future son-in-law was given this loyalty plan, so I know this is a
reasonable request. My phone number is (removed) acct number
(removed)
>> Personal information removed to comply with the Verizon Wireless Terms of Service <<
Edited by: Verizon Moderator -
How to pass column value which is not present in source criteria
Hi,
In one of my report I want to pass a column value from Source report(a pivot table) to target report. The column which I want to pass is not present in the sorce report criteria. Is there any work around for this issue.
I added this column in criteria and hidden the column. But the issue is not solved.
Best Regards,
TKB.Swati,
I am navigating from Summary report to detail report. I am prompting the required fields in detail report. But I want to pass one more column value explicitly, which is not present in source request.
Best Regards,
TKB. -
To display the column value though it is null
Hi all,
lineItems.ShipToCustomer.VName is having null in this case
When I execute this query I get zero records returned,the problem lies in lineItems.ShipToCustomer.VName :
select lineItems.ShipToCustomer.VName,C.VDealNumber CPRNumber, W.created SubmitDate, lineItems.VLineID LineItemNumber,lineItems.VProduct.Description Product from com.eastman.pricing.CprForm C,com.vendavo.platform.workflow.VWorkflow W where C.objectId=W.VWorkflowEntity.objectId and VID = 'CPR-013005'
When I execute after removing lineItems.ShipToCustomer.VName then the query returns one record:
select C.VDealNumber CPRNumber, W.created SubmitDate, lineItems.VLineID LineItemNumber,lineItems.VProduct.Description Product from com.eastman.pricing.CprForm C,com.vendavo.platform.workflow.VWorkflow W where C.objectId=W.VWorkflowEntity.objectId and VID = 'CPR-013005'
One more observation is when I include the column as lineItems.ShipToCustomer i.e after omitting only vname then I get one record returned.ShipToCustomer is a vector field.Anything to do with vector.
How do I get one row returned even though the lineItems.ShipToCustomer.VName is included in the query?
Thanks in advanceThis query is specific to the project i'm working it is called VQL which mostly follows the SQL standards that is why i'm not able to use nvl() which is not implemented in VQL....
The problem which i'm facing i have explained below:
lineItems.ShipToCustomer.VName is having null in this case
When I execute this query I get zero records returned,the problem lies in lineItems.ShipToCustomer.VName :
select lineItems.ShipToCustomer.VName,C.VDealNumber CPRNumber, W.created SubmitDate, lineItems.VLineID LineItemNumber,lineItems.VProduct.Description Product from com.eastman.pricing.CprForm C,com.vendavo.platform.workflow.VWorkflow W where C.objectId=W.VWorkflowEntity.objectId and VID = 'CPR-013005'
When I execute after removing lineItems.ShipToCustomer.VName then the query returns one record:
select C.VDealNumber CPRNumber, W.created SubmitDate, lineItems.VLineID LineItemNumber,lineItems.VProduct.Description Product from com.eastman.pricing.CprForm C,com.vendavo.platform.workflow.VWorkflow W where C.objectId=W.VWorkflowEntity.objectId and VID = 'CPR-013005'
One more observation is when I include the column as lineItems.ShipToCustomer i.e after omitting only vname then I get one record returned.ShipToCustomer is a vector field.Anything to do with vector.
How do I get one row returned even though the lineItems.ShipToCustomer.VName is included in the query? -
APEX 3.0 Displaying the URL link for a column value ( only when not null )
Consider the example :
I have the following table with a column that may have urls to documents
Row Column ( url_column )
1 http://xyx.com/doc/doc1.pdf
2 http://xyx.com/doc/doc2.pdf
3 (null)
How do i display the column so that a the link shows up only if a value exists.
Setting the URL to #URL_COLUMN# in the 'Column Attributes' screen creates a problem when the value is null ( for Row 3 in above eg.)
Thanks for your helpI would handle it in the query itself, something like
select x, y, z,
decode(url_column, null, null,
'<a href="'||url_column||'">'||
url_column||'</a>') as url_column
from wherever -
I cannot shut down or restart my computer. The message tells me to close my mailbox, but I cannot open my mailbox, so I am stuck - can't reboot nor can I open my mail to quit mail. HELP!!
Use Force Quit under the Apple, or by clicking the Mail icon. You might also try force quitting the finder.
-
How to fetch the maximum values of 2 columns
Hi All,
I need to fetch the maximum value of 2 columns. For example I need to fetch the latest record for which i have to fetch the latest date and time. Date and time fields are 2 different columns. As of now am doing it the crude fetching the latest date records and then fetching the latest time record.
Is there any other smarter way to do it. The one am doing rite now is turning out to be very performance intensive at the moment for me. Also I could not apply max condition for two fields together.
Please guide.
Thanks,
NagrajHi Jaspreet,
Thanks for your response. But the problem am facing with this approach is I have to do this for n number of records in another internal table which is making it to cumbersome and affecting performance.
Please suggest is there any better way to do it.
Thanks,
Nagraj -
How to fetch the junk values of a column and the column name in oracle
Hello,
Can anyone help me in writing a procedure/dynamic SQL to fetch the column where the junk values appears and its value. Eg: If emp table contains ID and Name columns, and ID column contains junk values, the result should be the Id column and the junk value/s. It should be dynamic because next time if the other column contains junk values(like $,%...), the query should display the other column too..
Thanks in advance..Try this, I'm not sure if it'll help... and get some idea...
try to modify it as per your requirement -
select * from junk_vals;
1 ranit1
2# ranit2
3 ranit3
4$ ranit@4
5 ranit5
6 r^anit6
select 'ID', id, val from junk_vals
where regexp_like(id,'[^a-zA-Z0-9]')
UNION
select 'VALUE', id, val from junk_vals
where regexp_like(val,'[^a-zA-Z0-9]');
-- "Output :"
ID 2# ranit2
ID 4$ ranit@4
VALUE 4$ ranit@4
VALUE 6 r^anit6
NOTE - I've considered anything other than Alphabets and Numbers as a Junk Value
Edited by: ranit B on Jan 4, 2013 5:07 PM
-- o/p added -
How to get the column values from a BC4J View Table in UIXML?
I am using a default UiXML Application for Order Entry system with Orders & Order Lines & Customers. I have a uix file OrdersView1_View.uix which displays (no updateable columns) all the Orders. How do I get the column value of a selected row in a BC4J Table (example:OrdersId) when a Submit button is pressed using UIXML or Java Classes?
I appreciate any help on this.Hi,
You need to use keyStamp, an example:
<bc4j table name="orders">
<bc4j:keyStamp>
<bc4j:rowKey name="key" />
</bc4j:keyStamp>
Furthermore, you can automatically send the selected row key using the go event handler, so in the handlers section you could send the key to an orderInfo page:
<event name="show">
<!-- forward to the update page, passing
the selected key as a page property -->
<ctrl:go name="orderInfo" redirect="true">
<ctrl:property name="key">
<ctrl:selection name="orders" key="key" />
</ctrl:property>
</ctrl:go>
</event> -
Find the Column Name which gives Invalid Number Error
Hi,
There are about 150 columns in a table and data to this table is from a external source like flat file. when these data are loaded to the table for a particular column it gives Invalid Number Error. So need to find for Which Numeric Column a String Value is about to be inserted.
since we are sure not whether the proper Values are coming from Source in Front End we pass the Value within ' quotes.
So how do we get the Column for which the error is raised :-)If you are using SQL*Loader, the log will tell you which row and column has the error.
Otherwise you may need to code your own debugging statements. -
Cursor not fetching the latest value in the loop.
Hi!
I'm facing a peculear problem. I've a procedure which will check the total number of records in a loop. It will fetch that value. If that value mathced with certain condition then the outer loop execution need to stop. Here is my script -
<<Outer Loop Script>>
declare
j number(5);
begin
j := 1;
dbms_output.enable(100000);
while j <> 3 and j <=3
loop
sel_pri(3,j);
dbms_output.put_line('J is : '||j);
end loop;
dbms_output.put_line('Executes.....');
exception
when others then
dbms_output.put_line(sqlerrm);
end;
-- Procedure Script --
create or replace procedure sel_pri(x in number,y out number)
is
pragma autonomous_transaction;
begin
select count(a.flg) cnt
into y
from (
select flg
from t_priority
where flg <= x
and flg < 4
union
select flg
from t_priority
where flg > x
and flg < 4
) a;
--commit;
end; Now, the problem is -
Suppose i've two records are there in t_priority table. So, when i run my anonymous pl/sql block it won't satisfy the condition - as a result the loop will iterate untill the condition satisfiy. Now, if i insert data from a different session and commit the value in table t_priority which have only one field named flg and if count is 3. Then the process of the while loop should be stopped. But, it that is not happening. Infact it is fetching the old value. Why is it so?
Thanks in advance for your reply.
Regards.
Satyaki De.sir i cannot understand your example.
SQL> declare
2
3 cursor bc is
4 select ename from emp;
5
6 procedure change_in_another_trans
7 is
8 pragma autonomous_transaction;
9 begin
10 update emp set ename = ename || '?';
11 commit;
12 end;
13 begin
14
15 for v in bc loop
16
17 if bc%rowcount = 3 then
18 change_in_another_trans;
19 end if;
20
21 dbms_output.put_line(v.ename);
22
23 end loop;
24
25 end;
26 /
SMITH
ALLEN
WARD
JONES
MARTIN
BLAKE
CLARK
SCOTT
KING
TURNER
ADAMS
JAMES
FORD
MILLER
PL/SQL procedure successfully completed.
Procedure change_in_another_trans is autonomous and is executed
only once in the loop - when I fetched 3 rows from cursor. It updates
the data I fetch in cursor loop and commits autonomous transaction.
If Oracle would not support the read consistency for queries you had
SMITH
ALLEN
WARD
JONES?
MARTIN?
BLAKE?
CLARK?
SCOTT?
KING?
TURNER?
ADAMS?
JAMES?
FORD?
MILLER?
But you see the data as they were at the moment (exactly SCN - System Change Number) of the query issue dispite they have been changed by another transaction after the cursor has been open. Hope I'm clear now.
Rgds. -
Hi,
I have to change the column values in a table. The values in the column are to be updated.
For e.g. If the old value is
"xxxxxxxxxx", I need to take that and update into "xxxyyyxxxx".
The column values is so long as its a description field, so its a combination of many other table fields. Its just I need to add one more field.
How can I do that? Any help appreciated.
ThanksHi,
See this:
I have got table with DESCRIPTION column which will be updated. Table structure is:
SQL> DESC SOLD_ITEMS;
Nazwa Wartość NULL? Typ
COMPONENT VARCHAR2(255)
SUBCOMPONENT VARCHAR2(255)
YEAR NUMBER(4)
MONTH NUMBER(2)
DAY NUMBER(2)
DEFECTS NUMBER(10)
DESCRIPTION VARCHAR2(200)
Table description contains values from (component, year, month, day & defects) column. I would like to add subcomponent value to this column.
SQL> SELECT * FROM SOLD_ITEMS;
COMPONENT SUBCOMPONENT YEAR MONTH DAY DEFECTS DESCRIPTION
graph bar 2006 4 3 10 graph 2006/4/3
graph bar 2006 4 1 1 graph 2006/4/1
search user search 2006 4 2 23 search 2006/4/2
search user search 2006 4 1 54 search 2006/4/1
search product search 2006 3 20 0 search 2006/3/20
search product search 2006 3 16 3 search 2006/3/16
6 wierszy zostało wybranych.
SQL> EDIT
Zapisano plik afiedt.buf
I use the SUBSTR and LENGTH function to place SUBCOMPONENT value between COMPONENT value and YEAR value. That's how I done it:
1 UPDATE SOLD_ITEMS
2* SET DESCRIPTION = SUBSTR(DESCRIPTION,1,LENGTH(COMPONENT)) || ' ' || SUBCOMPONENT || ' ' || SUBSTR(DESCRIPTION,LENGTH(YEAR))
SQL> /
6 wierszy zostało zmodyfikowanych.
SQL> SELECT DESCRIPTION FROM SOLD_ITEMS;
DESCRIPTION
graph bar 2006/4/3
graph bar 2006/4/1
search user search 2006/4/2
search user search 2006/4/1
search product search 2006/3/20
search product search 2006/3/16
6 wierszy zostało wybranych.
SQL> SPOOL OFF;
Peter D. -
hi
i am new to programming... i would like to know how to get the column values... i have a resultset object
i need code .... asap
thnx@OP: It is always good to type complete sentences and describe your problem at length. It helps in letting people know what you really need instead of making wild guesses or silly jokes. You post mentions that you get the ResultSet. Then you should look up the API docs for java.sql.ResultSet and take a look at the getxxx() method signatures. Use the ones which suit the specific case.
Besides, it is good to refrain from using asap and urgent. Even if something is urgent to you, it need not be urgent to others. Wording a question properly would attract better replies.
Finally, would you mind getting down to specifics of your problem? From what I perceived, the JDBC tutorial and the API docs should provide all the information you need. -
Can I filter by value which is not displayed in grid columns?
In excel it is possible to filter by value of measure which is not displayed in the report.
How can I possibly do this in Performance Point Grid? (in filter by value there I only see the measures in columns).
Please advise
NamnamiI found it is possible to filter by value by changing the MDX in the query tab.
(I filtered by certain existing value in design, then switched to Query and changed to the measure which is not displayed). I shows up correctly.
The problem is, once I change the query, I get an error when tring to connect a filter on a grid column:
"consumer parameter no-longer exists in the consumer webpart"
The grid looks "frozen"- cannot drill up / down etc.
How can I filter by value which is not displayed without loosing the ability to attach a filter to the grid?
Namnami -
How to fetch the condition value per line item in PO o/p
Dear Experts ,
I need to fetch the value of the all valid condition types in the PO item , for its o/p .
For this i should know
1.what all are the condition types involved in the item .
2.what is the condition rate
3. what is the condition value .
Pleas etell me how do i fetch this data ??
Thanks in advance
Regards
AnisHi Anis,
At first collect the doc.condition-KNUMV from EKKO table.
Later enter the above doc.condition no in KONV and KONP to get the details.
Regards
Ramesh Ch
Maybe you are looking for
-
We have a requirement where we have to load paid invoices to AP. Oracle does not provide any functionality for this. on metalink they ask us to contact oracle consulting for solution. 1. Import invoices into AP invoice interface tables, 2. Run Open I
-
is there a SQL server tool or database utility that allows to automatically synchronize data between a table in SQL server and a table(same structure) residing in Oracle on a different server... Ashish
-
Hi gurus, When creating Key Figures in Adminstration workbench in the tabs <b>AGGREGATION</b> and <b>ADDITIONAL PROPERTIES</b> can somebody kindly explain the below contents and how do they affect and where do they affect, if we select. <b>AGGREGATIO
-
Is there any way to disable that "could not activate data network" pop-up? It's really annoying to have that appear when you're using your iDevice as a GPS when you hit a temporary no-data-coverage area. It would also be OK if it went away on it's
-
Hi I am getting below error on my MAC OSX 10.6 Server
Hi, I am getting below error on my MAC OSX 10.6 server MAC Pro machine. Please let me know what this means? Interval Since Last Panic Report: 8518861 sec Panics Since Last Report: 1 Anonymous UUID: F1F85B83-6DC2-4E6C-B02C-D1D42F15F321 Wed J