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
Did you know?Explore Trending and Topic pages for more stories like this.
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

array & querys help/advice.
Ok so here goes , I have a mysql database and basically here's what I need to do.

// foreach

check if string contain only a-z/A-Z
Is where any way to check if string contains only a-z/A-Z, without writing an array with all possibl

animation progress while uploading files?
Hello, i have some website form to upload few files to server. i want to put some gif animation whi

Php WordPress help
I am writing the following code for making a plugin

<?php
header("Content-Type

classic dynpro : hide area and auto adjust hights
Hi,

I want to develop a similar user interface as is used in standard transaction MIGO.

Find occurences of unicode characters in string
I need to prohibit filenames with everything but English characters and numbers but regexp and strin

How can you detect variable string in a massive string?
Ok guys, i need some help with this one.

I am going to be getting a large string, like 10-20

Reg Ex
Im trying to search for the string: srv_9 (Dead ???)

I thought to use preg_match, however I d

GET * FROM _____ Except?
I have a site that is for stock photography.

This section of the code calls images to display

Word Trimming
Hi Guys & Gals!!

Hope you are all ok....

I need some help with the following

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