/build/static/layout/Breadcrumb_cap_w.png

list of printers

Hi,

I'm trying to create a report of printers installed on all computers. I've gone through the report wizard and select other.printers. My problem is that it seems to jumble the output (puts multiple printers on the same line)

Here's my sql query

SELECT MACHINE.USER_NAME AS MACHINE_USER_NAME, PRINTERS FROM MACHINE ORDER BY MACHINE.USER_NAME asc

Thanks

0 Comments   [ + ] Show comments

Answers (1)

Posted by: GillySpy 13 years ago
7th Degree Black Belt
0
The printers are all stored in one text field separated by carriage returns. To get a report of one line per printer you would have to make a list of your printers somewhere and join that to machine. Here's an example:

SELECT ID, PRINTERS, P1 FROM MACHINE M LEFT JOIN (select 'Microsoft XPS Document Writer' P1 UNION ALL select 'Adobe PDF' P1) PRINTER
ON FIND_IN_SET(P1,REPLACE(PRINTERS,'\n',','))>0
WHERE P1 IS NOT NULL
ORDER BY 1,3
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ