06-12-2012 01:47 PM
06-14-2012 05:00 PM
06-14-2012 05:07 PM
Finn.Kopke wrote:
Thanks. I see an colom - identifier - how can I remove this?
Select Top 1000000 DERIVEDTBL.Contact, DERIVEDTBL.Domain, DERIVEDTBL.Name As
Sysname, DERIVEDTBL.Type, DERIVEDTBL.IP, DERIVEDTBL.IPLocation,
DERIVEDTBL.Lastseen, DERIVEDTBL.icon
From (Select Web40OSName.Compimage As icon, tblComputers.LastknownIP As IP,
web40AllIPLocations.IPLocation As IPLocation, tblComputers.Computer As
Name, Web40OSName.OSname As Type, tblComputers.Lastseen,
tblComputers.IPNumeric, tblComputers.Domain, tblCompCustom.Custom10 As
Contact
From tblComputers Inner Join
web40AllIPLocations On tblComputers.Computername =
web40AllIPLocations.Computername Inner Join
web40ActiveComputers On tblComputers.Computername =
web40ActiveComputers.Computername Inner Join
Web40OSName On tblComputers.Computername = Web40OSName.Computername
Inner Join
tblCompCustom On tblComputers.Computername = tblCompCustom.Computername
Union
Select tsysDevicetypes.ItemTypeIcon10 As icon, tblCustDevices.Ipaddress As
IP, web40AllIPLocationsDev.IPLocation As IPLocation,
tblCustDevices.Displayname As Name, tsysDevicetypes.ItemTypename As Type,
tblCustDevices.LastSeen, tblCustDevices.IPNumeric, '' As domain,
tblCustDevices.Contact As contact
From tsysDevicetypes Inner Join
tblCustDevices On tsysDevicetypes.ItemType = tblCustDevices.Devicetype
Inner Join
web40AllIPLocationsDev On tblCustDevices.DeviceKey =
web40AllIPLocationsDev.DeviceKey
Where tblCustDevices.State = 1) DERIVEDTBL
Order By DERIVEDTBL.Contact, DERIVEDTBL.IPNumeric
Finn.Kopke wrote:
Is it possible to select a user when you run the report eg. in a dropdown windows.
Select Top 1000000 DERIVEDTBL.Contact, DERIVEDTBL.Domain, DERIVEDTBL.Name As
Sysname, DERIVEDTBL.Type, DERIVEDTBL.IP, DERIVEDTBL.IPLocation,
DERIVEDTBL.Lastseen, DERIVEDTBL.icon
From (Select Web40OSName.Compimage As icon, tblComputers.LastknownIP As IP,
web40AllIPLocations.IPLocation As IPLocation, tblComputers.Computer As
Name, Web40OSName.OSname As Type, tblComputers.Lastseen,
tblComputers.IPNumeric, tblComputers.Domain, tblCompCustom.Custom10 As
Contact
From tblComputers Inner Join
web40AllIPLocations On tblComputers.Computername =
web40AllIPLocations.Computername Inner Join
web40ActiveComputers On tblComputers.Computername =
web40ActiveComputers.Computername Inner Join
Web40OSName On tblComputers.Computername = Web40OSName.Computername
Inner Join
tblCompCustom On tblComputers.Computername = tblCompCustom.Computername
Union
Select tsysDevicetypes.ItemTypeIcon10 As icon, tblCustDevices.Ipaddress As
IP, web40AllIPLocationsDev.IPLocation As IPLocation,
tblCustDevices.Displayname As Name, tsysDevicetypes.ItemTypename As Type,
tblCustDevices.LastSeen, tblCustDevices.IPNumeric, '' As domain,
tblCustDevices.Contact As contact
From tsysDevicetypes Inner Join
tblCustDevices On tsysDevicetypes.ItemType = tblCustDevices.Devicetype
Inner Join
web40AllIPLocationsDev On tblCustDevices.DeviceKey =
web40AllIPLocationsDev.DeviceKey
Where tblCustDevices.State = 1) DERIVEDTBL
Where DERIVEDTBL.Contact = 'YourUser'
Order By DERIVEDTBL.Contact, DERIVEDTBL.IPNumeric
06-14-2012 04:11 PM
Select Top 1000000 DERIVEDTBL.Contact, DERIVEDTBL.Domain, DERIVEDTBL.Name As
Sysname, DERIVEDTBL.Type, DERIVEDTBL.IP, DERIVEDTBL.IPLocation,
DERIVEDTBL.Lastseen, DERIVEDTBL.computername As Identifier, DERIVEDTBL.icon
From (Select Web40OSName.Compimage As icon, tblComputers.LastknownIP As IP,
web40AllIPLocations.IPLocation As IPLocation, tblComputers.Computer As
Name, Web40OSName.OSname As Type, tblComputers.Lastseen,
tblComputers.IPNumeric, Cast(tblComputers.Computername As varchar) As
computername, tblComputers.Domain, tblCompCustom.Custom10 As Contact
From tblComputers Inner Join
web40AllIPLocations On tblComputers.Computername =
web40AllIPLocations.Computername Inner Join
web40ActiveComputers On tblComputers.Computername =
web40ActiveComputers.Computername Inner Join
Web40OSName On tblComputers.Computername = Web40OSName.Computername
Inner Join
tblCompCustom On tblComputers.Computername = tblCompCustom.Computername
Union
Select tsysDevicetypes.ItemTypeIcon10 As icon, tblCustDevices.Ipaddress As
IP, web40AllIPLocationsDev.IPLocation As IPLocation,
tblCustDevices.Displayname As Name, tsysDevicetypes.ItemTypename As Type,
tblCustDevices.LastSeen, tblCustDevices.IPNumeric,
tblCustDevices.DeviceKey As computername, '' As domain,
tblCustDevices.Contact As contact
From tsysDevicetypes Inner Join
tblCustDevices On tsysDevicetypes.ItemType = tblCustDevices.Devicetype
Inner Join
web40AllIPLocationsDev On tblCustDevices.DeviceKey =
web40AllIPLocationsDev.DeviceKey
Where tblCustDevices.State = 1) DERIVEDTBL
Order By DERIVEDTBL.Contact, DERIVEDTBL.IPNumeric
06-14-2012 08:05 AM
06-13-2012 03:29 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now