Sql Syntax error (10713)

Rrao

New Member
Am getting Progress openedge wire protocal driver[openedge] syntax error in sql statement at or about Select "accounts_"."Account". The full sql statment is

{select "Time_Dimension"."DB-NAME" "DB_NAME" , "Time_Dimension"."Year_" "Year_" , "Time_Dimension"."Monthkey" "Monthkey" , min("Time_Dimension"."Month_") "Month_"
from "DWH"."PUB"."Time_Dimension" "Time_Dimension"
group by "Time_Dimension"."DB-NAME", "Time_Dimension"."Year_", "Time_Dimension"."Monthkey"
select "Accounts_"."Account_", "Accounts_"."Account_Description_", "Entities_"."Entity_", "Entities_"."Entity_Name_", "Budget_Details"."Amount_SRC_", "Budget_Details"."VS_Planned_Bookings", "Budget_Details"."VS_Cost_Amt_", "Budget_Details"."DB-NAME", "Sub_Accounts_"."Sub_Account_", "Sub_Accounts_"."Sub_Account_Description_", "Budget_Details"."Fiscal_Year_", "Budget_Details"."Fiscal_Period_"
from "DWH"."PUB"."Accounts_" "Accounts_", "DWH"."PUB"."Entities_" "Entities_", "DWH"."PUB"."Budget_Details_" "Budget_Details", "DWH"."PUB"."Sub_Accounts_" "Sub_Accounts_"
where "Accounts_"."DB-NAME" = "Budget_Details"."DB-NAME" and "Accounts_"."Account_" = "Budget_Details"."Account_" and "Sub_Accounts_"."DB-NAME" = "Budget_Details"."DB-NAME" and "Sub_Accounts_"."Sub_Account_" = "Budget_Details"."Sub_Account_" and "Entities_"."DB-NAME" = "Budget_Details"."DB-NAME" and "Entities_"."Entity_" = "Budget_Details"."Entity_"}

Using progress openedge 10.1b. Any help would be greatly appreciated.

Thanks!!!
 
It might help if you formatted and posted it between code tags so we had a better idea of the structure.

Do you really have field names ending in _ ?!!!!

Why is there a select following a group by?
 
Am getting Progress openedge wire protocal driver[openedge] syntax error in sql statement at or about Select "accounts_"."Account". The full sql statment is

Code:
{select "Time_Dimension"."DB-NAME" "DB_NAME" , "Time_Dimension"."Year_" "Year_" , "Time_Dimension"."Monthkey" "Monthkey" , min("Time_Dimension"."Month_") "Month_" 
from "DWH"."PUB"."Time_Dimension" "Time_Dimension"
group by "Time_Dimension"."DB-NAME", "Time_Dimension"."Year_", "Time_Dimension"."Monthkey"
 
select "Accounts_"."Account_", "Accounts_"."Account_Description_", "Entities_"."Entity_", "Entities_"."Entity_Name_", "Budget_Details"."Amount_SRC_", "Budget_Details"."VS_Planned_Bookings", "Budget_Details"."VS_Cost_Amt_", "Budget_Details"."DB-NAME", "Sub_Accounts_"."Sub_Account_", "Sub_Accounts_"."Sub_Account_Description_", "Budget_Details"."Fiscal_Year_", "Budget_Details"."Fiscal_Period_"
from "DWH"."PUB"."Accounts_" "Accounts_", "DWH"."PUB"."Entities_" "Entities_", "DWH"."PUB"."Budget_Details_" "Budget_Details", "DWH"."PUB"."Sub_Accounts_" "Sub_Accounts_"
where "Accounts_"."DB-NAME" = "Budget_Details"."DB-NAME" and "Accounts_"."Account_" = "Budget_Details"."Account_" and "Sub_Accounts_"."DB-NAME" = "Budget_Details"."DB-NAME" and "Sub_Accounts_"."Sub_Account_" = "Budget_Details"."Sub_Account_" and "Entities_"."DB-NAME" = "Budget_Details"."DB-NAME" and "Entities_"."Entity_" = "Budget_Details"."Entity_"}
Using progress openedge 10.1b. Any help would be greatly appreciated.

Thanks!!!

These are actual 2 queries.

Question: If you use aliasess why still give them awkward names?
Code:
...
from "DWH"."PUB"."Accounts_" "Accounts_", "DWH"."PUB"."Entities_" "Entities_", "DWH"."PUB"."Budget_Details_" "Budget_Details", "DWH"."PUB"."Sub_Accounts_" "Sub_Accounts_"
....
Casper.
 
These are sql generated by the Cognos BI transformer based on the links between tables. We have the table names ending with '_' as a standard in the datawarehouse so that we do not come across any conflict with the source database(which have tables with the same name except the '_') when we load data from the source to datawarehouse.
Am not clear on what is the correct syntax if the query has multiple select statements.
 
If this is generated SQL, it suggests there is something wrong with the report design.
 
Back
Top