BI Publisher,,

SandeepTheeda
SandeepTheeda used Ask the Experts™
on
Hi, I am using BI Publisher with source os OBIEE. When I try to run this query, I am getting an error.

java.io.IOException: prepare query failed[nQSError: 27002] Near : Syntax error [nQSError: 26012] .

But when I remove this :
("- Nx_PAG0_Projects (Projects Views)"."Project_Number" = "- Nx_PAG0_Proj_User_Define_Attrs (Projects Views)"."Project_Number"

the query worls fine.

--------------------------------

SELECT "- Nx_PAG0_Projects (Projects Views)".Operating_Unit_Name saw_0, "- Nx_PAG0_Projects (Projects Views)".Carrying_Out_Organization saw_1, "- Nx_PAG0_Projects (Projects Views)".Project_Number saw_2, "- Nx_PAG0_Projects (Projects Views)".Project_Name saw_3, CAST("- Nx_PAG0_Proj_User_Define_Attrs (Projects Views)"."D_Ext$Activity_date" AS DATE) saw_4, "- Nx_PAG0_Proj_User_Define_Attrs (Projects Views)"."C_Ext$Rig_number" saw_5, "- Nx_PAG0_Proj_User_Define_Attrs (Projects Views)"."C_Ext$Shift" saw_6, "- Nx_PAG0_Proj_User_Define_Attrs (Projects Views)"."C_Ext$Hole_number" saw_7, CASE WHEN "- Nx_PAG0_Proj_Drilling_Attributes (Projects Views)"."C_Ext$Billable" ='Y' THEN 'Yes' ELSE 'No' END saw_8, "- Nx_PAG0_Proj_User_Define_Attrs (Projects Views)"."N_Ext$Total_depth" saw_9, "- Nx_PAG0_Tasks (Projects Views)".Task_Number saw_10, "- Nx_PAG0_Tasks (Projects Views)".Task_Name saw_11, "- Nx_PAG0_Tasks (Projects Views)".Task_Description saw_12, CASE WHEN "- Nx_PAG0_Tasks (Projects Views)".Billable_Flag ='Y' THEN 'Yes' ELSE 'No' END saw_13, "- Nx_PAG0_Proj_Billing_Attributes (Projects Views)"."C_Ext$Non_labor_resource" saw_14, "- Nx_PAG0_Proj_Billing_Attributes (Projects Views)"."C_Ext$Bit_type" saw_15, "- Nx_PAG0_Proj_Drilling_Attributes (Projects Views)"."N_Ext$From_depth" saw_16, "- Nx_PAG0_Proj_Drilling_Attributes (Projects Views)"."N_Ext$To_depth" saw_17, ("- Nx_PAG0_Proj_Drilling_Attributes (Projects Views)"."N_Ext$To_depth"-"- Nx_PAG0_Proj_Drilling_Attributes (Projects Views)"."N_Ext$From_depth") saw_18, "- Nx_PAG0_Proj_Billing_Attributes (Projects Views)"."C_Ext$UOM" saw_19, "- Nx_PAG0_Proj_Billing_Attributes (Projects Views)"."N_Ext$Bill_rate" saw_20, ("- Nx_PAG0_Proj_Drilling_Attributes (Projects Views)"."N_Ext$To_depth"-"- Nx_PAG0_Proj_Drilling_Attributes (Projects Views)"."N_Ext$From_depth")*"- Nx_PAG0_Proj_Billing_Attributes (Projects Views)"."N_Ext$Bill_rate" saw_21 FROM "[Operational] eBS_Projects"

WHERE ("- Nx_PAG0_Proj_Billing_Attributes (Projects Views)"."C_EXT$TASK_NUMBER" = "- Nx_PAG0_Tasks (Projects Views)"."Task_Number") AND ("- Nx_PAG0_Proj_Billing_Attributes (Projects Views)"."C_EXT$TASK_NUMBER" = "- Nx_PAG0_Proj_Drilling_Attributes (Projects Views)"."C_EXT$TASK_NUMBER") AND ("- Nx_PAG0_Proj_User_Define_Attrs (Projects Views)"."N_EXT$DAILY_ACTIVITY_ID"= "- Nx_PAG0_Proj_Drilling_Attributes (Projects Views)"."N_EXT$DAILY_ACTIVITY_ID") AND ("- Nx_PAG0_Proj_User_Define_Attrs (Projects Views)"."C_Ext$ATTR_GROUP_ID" = 204) AND ("- Nx_PAG0_Projects (Projects Views)"."Project_Number" = "- Nx_PAG0_Proj_User_Define_Attrs (Projects Views)"."Project_Number"

"- Nx_PAG0_Projects (Projects Views)"."Operating_Unit_Name"=:P_Region and
"- Nx_PAG0_Projects (Projects Views)"."Carrying_Out_Organization"=:P_Branch and
"- Nx_PAG0_Projects (Projects Views)"."Project_Name"=:P_Project


ORDER BY saw_0, saw_1, saw_2, saw_3, saw_4, saw_5, saw_6, saw_7, saw_8, saw_9, saw_10, saw_11, saw_12, saw_13, saw_14, saw_15, saw_16, saw_17, saw_18, saw_19, saw_20, saw_21, saw_22, saw_23, saw_24


Please help.


Thanks in Advance

Regards


Sandeep
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
programmer-analyst
Commented:
I think that the problem is caused by missing ")" at the end:
("- Nx_PAG0_Projects (Projects Views)"."Project_Number" = "- Nx_PAG0_Proj_User_Define_Attrs (Projects Views)"."Project_Number"
try this:
("- Nx_PAG0_Projects (Projects Views)"."Project_Number" = "- Nx_PAG0_Proj_User_Define_Attrs (Projects Views)"."Project_Number")

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial