→ The Lansweeper Customer Excellence Awards 2024 - Submit Your Project Now! Learn More & Enter Here
‎01-29-2015 04:11 PM
Solved! Go to Solution.
‎03-26-2015 05:00 PM
Select Top 1000000 tblLicenses.softwareName,
tblSublicensesOrders.Ordernumber,
Count(tblSerialnumber.ProductKey) As [In Use],
tblSublicensesOrders.Nrlicenses Purchased,
Cast(tblSublicensesOrders.Licensekey As nchar(300)) As [License Key]
From tblLicenses
Inner Join tblSublicensesOrders On tblLicenses.LicenseidID =
tblSublicensesOrders.LicenseidID
Inner Join tblSerialnumber On tblSerialnumber.ProductKey =
Cast(tblSublicensesOrders.Licensekey As nchar(300))
Group By tblLicenses.softwareName,
tblSublicensesOrders.Ordernumber,
tblSublicensesOrders.Nrlicenses,
Cast(tblSublicensesOrders.Licensekey As nchar(300))
‎03-26-2015 05:00 PM
Select Top 1000000 tblLicenses.softwareName,
tblSublicensesOrders.Ordernumber,
Count(tblSerialnumber.ProductKey) As [In Use],
tblSublicensesOrders.Nrlicenses Purchased,
Cast(tblSublicensesOrders.Licensekey As nchar(300)) As [License Key]
From tblLicenses
Inner Join tblSublicensesOrders On tblLicenses.LicenseidID =
tblSublicensesOrders.LicenseidID
Inner Join tblSerialnumber On tblSerialnumber.ProductKey =
Cast(tblSublicensesOrders.Licensekey As nchar(300))
Group By tblLicenses.softwareName,
tblSublicensesOrders.Ordernumber,
tblSublicensesOrders.Nrlicenses,
Cast(tblSublicensesOrders.Licensekey As nchar(300))
‎03-26-2015 05:15 PM
sukaitsu wrote:
Ah ok that is the issue. You are running SQL Compact instead of SQL Express, but I think you can get the report to run if you take out the var in nvarchar with the code above. Try that and see if it works.Select Top 1000000 tblLicenses.softwareName,
tblSublicensesOrders.Ordernumber,
Count(tblSerialnumber.ProductKey) As [In Use],
tblSublicensesOrders.Nrlicenses Purchased,
Cast(tblSublicensesOrders.Licensekey As nchar(300)) As [License Key]
From tblLicenses
Inner Join tblSublicensesOrders On tblLicenses.LicenseidID =
tblSublicensesOrders.LicenseidID
Inner Join tblSerialnumber On tblSerialnumber.ProductKey =
Cast(tblSublicensesOrders.Licensekey As nchar(300))
Group By tblLicenses.softwareName,
tblSublicensesOrders.Ordernumber,
tblSublicensesOrders.Nrlicenses,
Cast(tblSublicensesOrders.Licensekey As nchar(300))
Thank you,
Jeffrey
‎03-26-2015 03:29 PM
‎03-26-2015 04:55 PM
sukaitsu wrote:
It seems to be that error is related to the version SQL you have Lansweeper running on. Even if you installed SQL Express on your server/machine, it looks like Lansweeper is running on a SQL Lite / SQL CE database. SQL Server Compact database doesn't support the char/varchardata types as it's purely unicode based. Can you go to Configuration --> Database scripts and tell me what it says under Database Information.
Thank you,
Jeffrey
‎03-26-2015 02:20 PM
‎03-26-2015 02:50 PM
sukaitsu wrote:
Hmmm. Lets try this. Install SQL Server Management Studio and I can walk you through how to troubleshoot using it. Also try these steps when creating the report.
- Copy all of the code from the query above
- Create a new report in Lansweeper and delete the prefilled/default code before pasting
- Paste the copied code and then click into a blank area in the top column, where the tables prefill
- The tables should update after a few seconds to reflect the pasted query
- Name the report
- Save & Run
Let me know if these steps help.
Thank you,
Jeffrey
‎03-25-2015 07:53 PM
‎03-26-2015 01:58 PM
sukaitsu wrote:
Sure thing. Which version of SQL are you running and what edition?
Thank you,
Jeffrey
‎03-25-2015 07:45 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now