Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: How to add columns with new row name using perl from mysql query?

by finddata (Sexton)
on Apr 07, 2017 at 05:52 UTC ( #1187368=note: print w/replies, xml ) Need Help??


in reply to Re^3: How to add columns with new row name using perl from mysql query?
in thread How to add columns with new row name using perl from mysql query?

Hai,
Here the row others prints as NULL which as follows.How can i add data type for the others row in the below sql query.
| others | NULL | NULL |
SELECT queue_name, jobs_pend, jobs_run FROM ( SELECT queue_name, jobs_pend, jobs_run FROM queues ORDER BY queue_name LIMIT 5 ) UNION ALL SELECT 'others', SUM(jobs_pend) AS jobs_pend, SUM(jobs_run) AS jobs_ru +n FROM ( SELECT jobs_pend, jobs_run FROM queues ORDER BY queue_name LIMIT 5 OFFSET 5 )

Replies are listed 'Best First'.
Re^5: How to add columns with new row name using perl from mysql query?
by huck (Parson) on Apr 07, 2017 at 07:12 UTC

    At Google no one can hear you grovel. (apologies to Alien)

    Proper indentation makes it much easier to make sure everything is balanced doesnt it?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1187368]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2019-12-15 15:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?