I have 400 computers that can have between 1 to 4 printers allocated. From a list of 20 printers. And also another column showing which one of those 4 is the default printer. This is queried in a VBS logon script.
I just need the table layout and SQL query not any vbs sript.
Being new to sql I dont know the best way to make the tables. I assume I would need 2 with a join.
first table 'Printer_List'
2nd table PC_List
pc_name pr1 pr2 pr3 pr4 default_printer where default would be = 1 to 4
room1 1 0 0 0 1
class77 3 2 0 0 2
pc99 4 0 0 0 4
a zero means no printer allocated
so for instance the pc called class77 has two printers allocated, konicaxyz and hpthingy22
and the hpthingy22 is to be the default printer.
eventually 6 variables
pr3=0 or null
pr4=0 or null
I hope that makes sense .