Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtering netbios naming standard

Status
Not open for further replies.

Dijital

MIS
Mar 15, 2002
47
US
We have a naming standard that is like the following -

NJWARHQ0IT1234
NJ=STATE (2 LETTERS)
WAR=CITY/LOCATION (3 LETTERS)
HQ=BUILDING PURPOSE (2 LETTERS)
0IT=DEPARTMENT (3 LETTERS)
1234=LAST 4 OF MAC ADDRESS

I need to create a query that filters the netbios name to determine those that dont follow this convention. Anyone know how I can do this?

Thanks in advance!
-Jim
 
I think this would work for you (haven't tried it).

Create tables in the database listing acceptable values for state, location, purpose, and department. Then create WQL in a format similar to

SELECT NetbiosName FROM SMS_R_System WHERE
(MID(NetbiosName,1,2) <> STATES.STATECD) AND
(MID(NetbiosName,3,5) <> LOCATIONS.LOCATIONCD) AND
(MID(NetbiosName,6,7) <> PURPOSE.PURPOSECD) AND
(MID(NetbiosName,8,10) <> DEPT.DEPTCD) AND
(MID(NetbiosName,11,14) <> RIGHT(SMS_G_System_NETWORK_ADAPTER.MACAddress,4)


(You'll need to use Network_Adapter.MACAddress since System_Resource.MACAddresses is an array.)

Good luck :)


snyderj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top