Home > Default > Need sql for this logic

Need sql for this logic

November 30Hits:0
Below is my table with columns like a,b,c
a      b       c
1     null   null
null   2     null
null  null   3
I need output like a b c
                          1 2 3


Here's one way
,       MIN (b)  AS b
,       MIN (c)  AS c
FROM    my_table;
I hope this answers your question.
If not, post  a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data.
Point out where the query above is giving the wrong results, and explain, using specific examples, how you get the correct results from the given data in those places.  If you changed the query at all, post your code.Always say which version of Oracle you're using (e.g.,
See the forum FAQ: https://forums.oracle.com/message/9362002

Read other 2 answers


Related Articles

  • Future support for using PL/SQL core business logic with ADF BCOctober 11

    We want to migrate our large Forms client/server (6i) application to ADF, possibly using a migration tool like Ciphersoft Exodus. One scenario could be to use ADF BC and ADF-Faces or a different JSF-Implementation for presentation and business layer

  • Sql to create logical partitionsOctober 11

    Oracle: I am working with another group and they are pulling data from one of the databases I work on. They are using what they call 'logical partitions'. Basically it is a sql statement with a MOD function in the where clause. select * from

  • Slow SQL Apply on Logical Standby Database in Oracle10gOctober 11

    Hi, We are using Oracle 10g Logical Standby database in our production farm but whenever there is bulk data load (5-6 GB data) on the primary database, the logical standby seems to be hung. It takes days to apply the 5-6 GB data on the logical standb

  • Oracle SQL and PL/SQL Exam question (Logic Tables)November 30

    Hi! I'm preparing to Oracle SQL Exam. And I would like to know what is "Logic Table" in "Writing Control Structures" Topic. http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=41&p_org_id=1001&lang=US&

  • SQL Compilation in Logical APPSNovember 30

    Hi I want to restrict the length of supplier addres in vendor form to 35 using Logical APPS. I had given the form, block and the when validate record event and given the condition in the SQL tab. I had compiled the SQL. But while using the vendor for

  • Sql for database logical segment details...November 30

    db: 11g OS: unix friends.. I am trying to get database logical segment details along with datafile id and tablespace name... just want to confirm I'm progressing in right direction... trying to get following 1. owner, 2. segment_name, 3. partition_na

  • How to construct a SQL for this logic.November 30

    Hi, I have a requirement like, i need to derive a column with a calculation. Here is the psedocode, count of occurance (deptno=10)/count (deptno=10) Desired result: If the deptno =10 occurs 3 times in the table then at the fist time the calcuation sh

  • Need sql for this logicNovember 30

    Hi, Below is my table with columns like a,b,c a      b       c 1     null   null null   2     null null  null   3 I need output like a b c                           1 2 3Hi, Here's one way SELECT  MIN (a)  AS a ,       MIN (b)  AS b ,       MIN (c) 

  • How to specify custom SQL in polling db adapter with logical delete optionOctober 11

    Hi all, I am writing a SOA composite app using JDeveloper SOA Suite connecting to a SQL Server db using a polling DB Adapter with the logical delete option to send data to a BPEL process. I have requirements which go beyond what is supported

  • PL/SQL reuse in ADFOctober 11

    Is disabling the use of application module pooling good practice for intranet applications where the number of users are known in advance (although in the thousands)? This was suggested as a solution to limit the amount of recoding that will be requi

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.643 s.