Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 ( [id://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 (Prior) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1187368]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-24 06:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found