Home » SQL & PL/SQL » SQL & PL/SQL » complex count
complex count [message #301513] Wed, 20 February 2008 22:51 Go to next message
nagaa
Messages: 33
Registered: August 2007
Location: chennai
Member
i'm having 4 coulns in my table.

deliq_cnt_1 upto 4

i have to get the count of each filed if deliq>2 .

For ex,

assume
deliq=3
deliq=4
deliq=5
deliq=5

now the output is 4.
becoz all the four fileds are >2.
i need only one output from all the four fields
i need ths output in single query
Re: complex count [message #301525 is a reply to message #301513] Wed, 20 February 2008 23:41 Go to previous messageGo to next message
dhananjay
Messages: 635
Registered: March 2002
Location: Mumbai
Senior Member
couldn't quite understand your requirement.
deliq 3,4,5,5

is this how you want your output to be displayed.then search for the keyword PIVOT.

And next time provide a test case with CREATE TABLE and INSERT statements and format your post.

regards,
Re: complex count [message #301528 is a reply to message #301525] Wed, 20 February 2008 23:58 Go to previous message
nagaa
Messages: 33
Registered: August 2007
Location: chennai
Member
k.....
i got it through decode.....
Previous Topic: Conditional full outer join
Next Topic: Displaying the entered parameter
Goto Forum:
  


Current Time: Tue Feb 18 14:11:10 CST 2025