query help


Posted on 16th Feb 2014 07:03 pm by admin

Hi experts.

i have a table rep2 like this
PROD_COD ACCT_NO DUE_DAYS BALANCE LIMIT
1 1 101 15 100 200
2 1 102 17 150 200
3 1 103 32 500 1000
4 2 201 30 250 300
5 2 202 60 800 1000
6 3 301 62 900 1500
7 3 302 90 400 800
8 3 303 98 600 1200

and i am running below query on the table

select '720+', prod_cod, count(acct_no), sum(balance), sum(limit)
from rep2
where due_days > 720
group by prod_cod;

but o/p is "0 rows selected".

how to show the o/p like this
720+ , null,0,0,0 .
in other words i want to show the record even if the condition doesn't satisfy.

thanks

No comments posted yet

Your Answer:

Login to answer
330 Like 40 Dislike
Previous forums Next forums
Other forums

Backflush
I am looking for a report in SAP that would give me a list of all parts that are populated with a ba

Attempt to assign property of non-object in...
I'm having issues with the following function in PHP 5...

function getTreeWithChildre

want to add a break after a certain amount of characters
i was wondering how to add a break in a blog post after a certain amount of characters... any idea o

Help with simple query
Hi,

I'm trying to do a Query with a Union where I want to print the number of rows $tc conta

returning data from an ssh2_exec()
here's what i got.


$conn = ssh2_connect($this->_host);
ssh2_auth_password($c

Deleting Partners on the Customer Master.
Does SAP handle removing the Partner from Open Sales Orders when a Partner is deleted in the Custome

mySQL and PHP search
Hello,
I am trying to code a project and ran into a brick wall with one of my pages. I am pretty

Mail functionality from localhost to server
Hi

I am facing problem of mail functionality.

When i tested mail functionality in my

Passing Variables
What I'm wanting to do is when the user clicks on Arenas it will know the name of the country it's w

Dynamic links in an include file
I am working on a small piece of code that counts records from a database and displays the result to

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash