This topic is locked
[SOLVED]

 DISTINCT Error

7/24/2019 1:04:51 PM
ASPRunner.NET General questions
I
i.NoLim author

I'm attempting to make a report based on 2 different tables, "Alarms" and "AlarmsDetails." I tested the following code on MSSMS and it works.Copy-pasting the code into the SQL query portion of the app provides the right results. No errors are reported when building the application. Unfortunately, when trying to access the report I get the following error.

SELECT distinct

A.PermitNumberCopy,

A.AlarmInvoicepaidDateCopy,

A.AlarmInvoiceAmountCopy,

AD.[Business Name],

A.AlarmsUniqueID

FROM dbo.Alarms A, AlarmDetails AD

where A.PermitNumberCopy = AD.[Permit Number] and A.AlarmInvoicepaidDateCopy is null and year(A.AlarmDateCopy) = year(getdate())

order by AlarmsUniqueID




admin 7/24/2019

As you can see in the manual DISTINCT is not supported:

https://xlinesoft.com/asprunnernet/docs/sql.htm
You can create a view in the database though on the top of this SQL Query and use it as a datasource in ASPRunner.NET.

I
i.NoLim author 7/31/2019

Thank you very much for that information. I'll try that and will update with results.