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

Ignore html and bbcode?
I've created a function to limit the amount of text according to the amount of words.

However

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

Price in PR
Dear Experts,
Why we have to enter the price in the PR, and why there is no free goods indicato

insert Multiple rows into the table from that table data
Hi All,

I have a requirement like to insert mulitple rows into the table from that

GIS appliction help
I found some tutorials in the internet to develop a map application I don't want to use google maps

IIS & NW MII on the same server
Hi,

We're weighing the possibility to run both IIS and MII (NetWeaver) on the same server

Multidimensional $_POST
Hello

How to get a single array from array of array (2 - dimension).
For example I have a

Comparing MySql data and arrays.
I have a mysql table set up like this:
idsubjectbodyuseriddatetimetags1blog subjectblog body111|2

php calculate
this code echoes correctly the sum but the inserted result is 0??
Code: <?php
$TotalNum

FTP issues
Hi all,


I am currently facing some serious problems with a script and really need some ad

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