
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2012 12:19 PM
Hi there,
Need help with an SQL query.
I want to enter a purchase date and warranty date for ALL computers of a particular model.
The model is DG41WV and the purchase date is 26/06/2011
Thank you in advance
Need help with an SQL query.
I want to enter a purchase date and warranty date for ALL computers of a particular model.
The model is DG41WV and the purchase date is 26/06/2011
Thank you in advance
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2012 04:26 PM
Worked a treat - thanks

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2012 12:42 PM
Execute the queries below in your Lansweeper configuration console under Lansweeper\Database Scripts.
Purchase date
Warranty date (Replace "YourWarrantyDate".)
Purchase date
INSERT INTO tblCompCustom (Computername)
SELECT Computername
FROM tblComputers
WHERE (Computername NOT IN (SELECT Computername FROM tblCompCustom AS tblCompCustom_1))
GO
UPDATE tblCompCustom
SET PurchaseDate = '06/26/2011'
FROM tblCompCustom INNER JOIN
tblComputersystem ON tblCompCustom.Computername = tblComputersystem.Computername
WHERE (tblComputersystem.Model LIKE 'DG41WV')
Warranty date (Replace "YourWarrantyDate".)
INSERT INTO tblCompCustom (Computername)
SELECT Computername
FROM tblComputers
WHERE (Computername NOT IN (SELECT Computername FROM tblCompCustom AS tblCompCustom_1))
GO
UPDATE tblCompCustom
SET Warrantydate = 'YourWarrantyDate'
FROM tblCompCustom INNER JOIN
tblComputersystem ON tblCompCustom.Computername = tblComputersystem.Computername
WHERE (tblComputersystem.Model LIKE 'DG41WV')
