/build/static/layout/Breadcrumb_cap_w.png

Patching report for a specific label

Would someone please give me a hand with a report I have been fighting with? I simply need to generate a detailed patching report for a specific label. What was requested of me is that for each patch, it would show the patch status for all computers that are assigned to a specific label. I was able to get the report to run for all computers in my domain, but when I try to add narrow the SQL down to a specific label, things go sour.

I took this logic (that works but is not specific to a particular label):

select P.TITLE AS PatchName, MACHINE.NAME as ServerName, IP, S.STATUS
from PATCHLINK_MACHINE_STATUS S, MACHINE, KBSYS.PATCHLINK_PATCH P
where
MACHINE.ID = S.MACHINE_ID and
S.PATCHUID = P.UID and
P.IMPACTID = 'CRITICAL'
order by P.TITLE


And tried to insert label logic...so this part is what needs help. I am receiving: mysql error: [1054: Unknown column 'Label.Name' in 'field list'

select P.TITLE AS PatchName, MACHINE.NAME as ServerName, Label.Name, IP, S.STATUS
from PATCHLINK_MACHINE_STATUS S, MACHINE, KBSYS.PATCHLINK_PATCH P, MACHINE_LABEL_JT, LABEL
where
MACHINE.ID = S.MACHINE_ID and
S.PATCHUID = P.UID and
P.IMPACTID = 'CRITICAL' and
MACHINE.ID = MACHINE_LABEL_JT.MACHINE_ID and
MACHINE_LABEL_JT.LABEL_ID = Label.ID and
Label.Name = 'Application Servers'
order by P.TITLE


I break on PatchName. Is there something dumb I am overlooking? SQL and I have a strained relationship.

Thanks for any and all help!
Mike

0 Comments   [ + ] Show comments

Answers (6)

Posted by: dchristian 12 years ago
Red Belt
0
MySQL is case sensitive on table names.

Change all references of label to LABEL all uppercase.
Posted by: mbretzke 12 years ago
Senior Yellow Belt
0
OMG! Thank you very much! I had a feeling it was something minor. I was definitely over-thinking this one! Works great now. Thanks again!
Posted by: dchristian 12 years ago
Red Belt
0
lol, its always the little things.
Posted by: Mariusja 12 years ago
Second Degree Green Belt
0
My SQL query look like this:

select P.TITLE AS PATCHNAME, MACHINE.NAME as SERVERNAME, LABEL.NAME, IP, S.STATUS
from PATCHLINK_MACHINE_STATUS S, MACHINE, KBSYS.PATCHLINK_PATCH P, MACHINE_LABEL_JT, LABEL
where
MACHINE.ID = S.MACHINE_ID and
S.PATCHUID = P.UID and
P.IMPACTID = 'CRITICAL' and
MACHINE.ID = MACHINE_LABEL_JT.MACHINE_ID and
MACHINE_LABEL_JT.LABEL_ID = LABEL.ID and
LABLE.Name = '1068-HF-STONERIDGE (1068-Refreshed)'
order by P.TITLE

I am getting this error :mysql error: [1054: Unknown column 'LABLE.Name' in 'where clause'] in EXECUTE(

Can anyone assist me please?

THX
Posted by: mbretzke 12 years ago
Senior Yellow Belt
0
There is a typo is this line:

LABLE.Name = '1068-HF-STONERIDGE (1068-Refreshed)'

should be:
LABEL.Name = '1068-HF-STONERIDGE (1068-Refreshed)'
Posted by: Mariusja 12 years ago
Second Degree Green Belt
0
Thanks it is working loke a charm. Can't believe I missed a spelling error.....
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