This topic is locked
[SOLVED]

 Select Distinct

1/21/2013 12:15:23 PM
ASPRunnerPro General questions
M
marcove author

Hi,

I've a problem, I wrote a query with join between two tables, the 1th is the main, and the 2nd is linked by ID (one to many) on which I make a control.

Now if I look the results in ASPRUNNER (Query Manager) it's Ok, but after built the project, the referring list page have error, and it doesn't work.
Here you can find the query. If I delete (DISTINCT expression), the list page opens fine. Pls could you help me thanks.

M
SELECT DISTINCT

dbo.Paziente.Cognome,

dbo.Paziente.Nome,

dbo.Paziente.CodFisc,

dbo.Paziente.Indirizzo,

dbo.Paziente.Scala,

dbo.Paziente.Interno,

dbo.Paziente.Tel,

dbo.Paziente.Citofono,

dbo.Paziente.TelSupporto,

dbo.Paziente.Note,

dbo.Paziente.CAP,

dbo.Paziente.IDPaziente,

dbo.Distretti.Distretto AS Distretto1

FROM dbo.Paziente

INNER JOIN dbo.Distretti ON dbo.Paziente.Distretto = dbo.Distretti.IDDistretto

INNER JOIN dbo.Accettazione ON dbo.Paziente.IDPaziente = dbo.Accettazione.IDPaziente

WHERE (dbo.Accettazione.DataFAcc > '31/12/2012' OR dbo.Accettazione.DataFAcc IS null)

ORDER BY dbo.Paziente.Cognome, dbo.Paziente.Nome

Sergey Kornilov admin 1/21/2013

DISTINCT in SQL Query is not supported by ASPRunnerPro. Here is the article that explains what is supported and what is not:

http://xlinesoft.com/asprunnerpro/docs/query_designer.htm
As a workaround create a view in your database on the top of this query and use this view as a datasource in ASPRunnerPro.

M
marcove author 1/22/2013



DISTINCT in SQL Query is not supported by ASPRunnerPro. Here is the article that explains what is supported and what is not:

http://xlinesoft.com/asprunnerpro/docs/query_designer.htm
As a workaround create a view in your database on the top of this query and use this view as a datasource in ASPRunnerPro.


Thank you for information.

Have a nice day

M