This topic is locked

Problems with UNION in SQL Statement

6/7/2010 9:58:02 AM
ASPRunnerPro General questions
F
firebrandwebmaster author

Hello everyone,
I'm having trouble using UNION when trying to combine the contents of two SQL Statements.
On the Edit SQL Query page there are three tabs. If I add the Following Query into the SQL tab, then click the Results tab I see the correct output from my tables. So the SQL Query works fine. However if I then Save and click through to the Query Designer tab then back to the SQL tab my statement reverts back to the default.
So to clarify, my statement works, but ASPRunner doesn't seem to be able to keep my chnages.
Any help would be appreciated.
Thanks
SELECT

dbo.tblModule.ID AS ID1,

dbo.tblModule.description AS Descr

FROM dbo.tblModule

UNION

SELECT

dbo.tblLocations.id AS id1,

dbo.tblLocations.locName AS Descr

FROM dbo.tblLocations

UNION

SELECT

dbo.tblThemes.ThemeID AS id1,

dbo.tblThemes.ThemeDescription AS Descr

FROM dbo.tblThemes

Sergey Kornilov admin 6/7/2010

ASPRunnerPro does not support UNION queries. Take a look at what is supported at http://xlinesoft.com/asprunnerpro/docs/sql.htm
As a workaround you can create a view right in SQL Server on the top of this query and use this view as a datasource in ASPRunnerPro.

F
firebrandwebmaster author 6/10/2010



ASPRunnerPro does not support UNION queries. Take a look at what is supported at http://xlinesoft.com/asprunnerpro/docs/sql.htm
As a workaround you can create a view right in SQL Server on the top of this query and use this view as a datasource in ASPRunnerPro.


Thank you, your suggestion works really well, and is probably a better way of working.