Order is getting Syntax Error ????

I am receiving and error message regarding syntax of the ORDER command. I have attached the code, error message and DDLs for the tables.
select COALESCE(a.[Material],b.[Part_Number],c.[Part_Number])                 AS [Material],
COALESCE(a.[Description],b.[Description],c.[Description])                     AS [Description],
COALESCE(a.[LD],b.[LD],c.[LD])                                                AS [LD],
COALESCE(a.[SalesOrder],b.[SalesOrder],c.[SalesOrder])                        As [SalesOrder],
COALESCE(a.[Ln],b.[Ln],c.[Ln])                                                As [Ln],
COALESCE(a.[S/J],b.[S/J],c.[S/J])                                             As [Type],
COALESCE(a.[Job],b.[Job],c.[Job])                                             AS [Job], 
COALESCE(a.[SalesCode],b.[SalesCode],c.[SalesCode])                           As [SalesCode],
COALESCE(a.[OpenQty],0) + COALESCE(b.[OpenQty],0) + COALESCE(c.[OpenQty],0)   As [OpenQty],
COALESCE(a.[OrderDate],b.[OrderDate],c.[OrderDate])                           As [OrderDate],
(Case when b.[PromDate] = '1900-01-01' then '' else a.[PromDate] end)         As [PromDate],
SUBSTRING(ISNULL(c.[WorkCenter],''),4,11)                                     AS [WorkCenter]
from
Select a.Material                                                             As [Material]
       ,Ma.Description                                                        As [Description]
       ,Ma.Lead_Days                                                          As [LD]
       ,a.Sales_Order                                                         As [SalesOrder]
       ,a.SO_Line                                                             As [Ln]
       ,'S'                                                                  
As [S/J]
       ,a.Job                                                                
As [Job]
       ,a.Sales_Code                                                          AS [SalesCode]
       ,Sum(a.Order_Qty - a.Picked_Qty - a.Shipped_Qty)                       AS [OpenQty]
       ,Cast(SH.Order_Date As Date)                                           AS [OrderDate]
       ,Cast(a.Promised_Date As Date)                                         AS [PromDate]
 As [WorkCenter]
       from [PRODUCTION].dbo.SO_Detail as a
inner join [PRODUCTION].dbo.Material As Ma
      on a.Material = Ma.Material 
inner join [PRODUCTION].dbo.SO_Header As SH
      on a.Sales_Order = SH.Sales_Order
Where (a.Status = 'Open' or a.Status = 'Backorder') 
and a.Job <> ''
and (a.Order_Qty - a.Picked_Qty - a.Shipped_Qty > 0)
GROUP BY a.Material, a.Job, [S-J], Ma.Sales_Code, Ma.Lead_Days, SH.Order_Date, a.Promised_Date, Ma.Description, a.Sales_Order, a.SO_Line/JBSettings, -J
)a
full join
Select b.Part_Number                                                          As [Part_Number]
       ,ISNULL(b.Description,'')                                              As [Description]
       ,Mb.Lead_Days                                                          As [LD]
       ,'00000'                                                               As [SalesOrder]
 As [Ln]
       ,'J'                                                                  
As [S/J]
       ,b.Job                                                                
As [Job]
       ,Mb.Sales_Code                                                         As [SalesCode]
       ,Sum(b.Order_Quantity - b.Shipped_Quantity)                            As [OpenQty]
       ,Cast(b.Order_Date As Date)                                            As [OrderDate]
 As [PromDate] 
 As [WorkCenter] 
from [PRODUCTION].dbo.Job As b
left outer join [PRODUCTION].dbo.Material As Mb
      on b.Part_Number = Mb.Material
Where b.Status = 'Active' and Mb.Type = 'F' and b.Job Not like '%MASTER%' and b.Customer IS null
GROUP BY b.Part_Number, b.Job, [S-J], Mb.Sales_Code, Mb.Lead_Days, b.Order_Date, b.Description
)b
full join
Select c.Part_Number                                                          As [Part_Number]
       ,ISNULL(c.Description,'')                                              As [Description]
       ,Mc.Lead_Days                                                          As [LD]
       ,'00000'                                                               As [SalesOrder]
 As [Ln]
       ,'J'                                                                  
As [S/J]
       ,c.Job                                                                
As [Job]
       ,Mc.Sales_Code                                                         As [SalesCode]
       ,'0'                                                                  
As [OpenQty]
       ,Cast(c.Order_Date As Date)                                            As [OrderDate]
 As [PromDate]  
       ,Max(Case when JO.Work_Center = 'INSPECTION'                                         and JO.Status = 'O'        
               then '00 NOT STARTED'
                 when JO.Work_Center = 'INSPECTION'                                         and JO.Status = 'S'
                       then '90 INSPECTION'
                 when JO.Work_Center = 'INSPECTION'                                         and JO.Status = 'C'
                       then '95 COMPLETED'
                 When JO.Work_Center like '%WELD%'                                          and JO.Status =
'O'                        then '05 NOT STARTED'
                 when JO.Work_Center like '%WELD%'                                          and JO.Status =
'S'                        then '70 WELD'
                 when JO.Work_Center like '%WELD%'                                          and JO.Status =
'C'                        then '75 WELD'
                 when JO.Work_Center = 'KITTING'                                            and JO.Status
= 'O'                        then '05 NOT STARTED'
                 when JO.Work_Center = 'KITTING'                                            and JO.Status
= 'S'                        then '60 KITTING'
                 when JO.Work_Center = 'KITTING'                                            and JO.Status
= 'C'                        then '65 KITTED'
                 when JO.Work_Center = 'WIREBENDER'                                         and JO.Status = 'O'
                       then '15 NOT STARTED'
                 when JO.Work_Center = 'WIREBENDER'                                         and JO.Status = 'S'
                       then '50 WIRE BENDING'
                 when JO.Work_Center = 'WIREBENDER'                                         and JO.Status = 'C'
                       then '55 WIRE BENT'
                 when JO.Work_Center = 'TUBEBENDER' and JO.Operation_Service = 'BEND TUBES' and JO.Status = 'O'                        then '20 NOT STARTED'
                 when JO.WOrk_Center = 'TUBEBENDER' and JO.Operation_Service = 'BEND TUBES' and JO.Status = 'S'                        then '40 BENDING
TUBES'
                 when JO.Work_Center = 'TUBEBENDER' and JO.Operation_Service = 'BEND TUBES' and JO.Status = 'C'                        then '45 TUBES BENT'
                 when JO.Work_Center = 'TUBEBENDER' and JO.Operation_Service = 'CUT TUBES'  and JO.Status = 'O'                        then '25 NOT
STARTED'
                 when JO.Work_Center = 'TUBEBENDER' and JO.Operation_Service = 'CUT TUBES'  and JO.Status = 'S'                        then '30 CUTTING
TUBES'
                 when JO.Work_Center = 'TUBEBEnder' and JO.Operation_Service = 'CUT TUBES'  and JO.Status = 'C'                        then '35 TUBES
CUT'
       else '' end) [WorkCenter]
from [PRODUCTION].dbo.Job_Operation As JO
left outer join [PRODUCTION].dbo.Job as c
      on c.Job = JO.Job
left outer join [PRODUCTION].dbo.Material As Mc
      on c.Part_Number = Mc.Material
Where c.Status = 'Active' and Mc.Type = 'F' and c.Job Not like '%MASTER%' and c.Customer IS null
GROUP BY c.Part_Number, c.Job, [S/J], Mc.SalesCode, Mc.Lead_Days, c.Order_Date, c.Description
)c
on a.[Material] = b.[Part_Number] and a.[Material] = c.[Part_Number] and a.[Job] = b.[Job] and a.[Job] = c.[Job] and a.[PromDate] = b.[PromDate] and a.[PromDate] = c.[PromDate]
Order by COALESCE(b.[Part_Number],a.[Material],c.[Part_Number],b.[Job],a.[Job],c.[Job],b.[S/J],a.[S/J],c.[S/J])
ERROR MESSAGE **********************************************************************************************
Msg 156, Level 15, State 1, Line 99
Incorrect syntax near the keyword 'Order'.
DDL SO_DETAIL *********************************************************************************************
USE [PRODUCTION]
GO
/****** Object:  Table [dbo].[SO_Detail]    Script Date: 05/22/2014 11:41:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SO_Detail](
[SO_DetailKey] [dbo].[KeyNum] IDENTITY(1,1) NOT NULL,
[SO_Detail] [dbo].[KeyNum] NULL,
[Sales_Order] [dbo].[Key10] NOT NULL,
[SO_Line] [dbo].[T_6] NOT NULL,
[PO] [dbo].[Key8] NULL,
[Line] [dbo].[T_6] NULL,
[Material] [dbo].[T_30] NULL,
[Ship_To] [int] NULL,
[Drop_Ship] [bit] NOT NULL,
[Quote] [varchar](50) NULL,
[Job] [dbo].[Key10] NULL,
[Status] [dbo].[T_9] NOT NULL,
[Make_Buy] [dbo].[T_1] NOT NULL,
[Unit_Price] [float] NOT NULL,
[Discount_Pct] [float] NOT NULL,
[Price_UofM] [dbo].[UofM] NOT NULL,
[Total_Price] [money] NOT NULL,
[Deferred_Qty] [float] NOT NULL,
[Prepaid_Amt] [money] NOT NULL,
[Unit_Cost] [float] NOT NULL,
[Order_Qty] [float] NOT NULL,
[Stock_UofM] [dbo].[UofM] NOT NULL,
[Backorder_Qty] [float] NOT NULL,
[Picked_Qty] [float] NOT NULL,
[Shipped_Qty] [float] NOT NULL,
[Returned_Qty] [float] NOT NULL,
[Certs_Required] [bit] NOT NULL,
[Taxable] [bit] NOT NULL,
[Commissionable] [bit] NOT NULL,
[Commission_Pct] [float] NOT NULL,
[Sales_Code] [dbo].[T_UCode] NULL,
[Note_Text] [text] NULL,
[Promised_Date] [datetime] NULL,
[Last_Updated] [datetime] NOT NULL,
[Description] [dbo].[T_30] NULL,
[Price_Unit_Conv] [float] NULL,
[Rev] [dbo].[T_8] NULL,
[Tax_Code] [dbo].[T_15] NULL,
[Ext_Description] [text] NULL,
[Cost_UofM] [dbo].[T_4] NULL,
[Cost_Unit_Conv] [float] NULL,
[Res_Type] [smallint] NULL,
[Res_ID] [dbo].[T_50] NULL,
[Res_Qty] [float] NULL,
[Partial_Res] [bit] NULL,
[Prepaid_Trade_Amt] [money] NULL,
[ObjectID] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_SO_Detail] PRIMARY KEY NONCLUSTERED 
[SO_DetailKey] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[SO_Detail]  WITH NOCHECK ADD  CONSTRAINT [FK_SOH_on_SODetl] FOREIGN KEY([Sales_Order])
REFERENCES [dbo].[SO_Header] ([Sales_Order])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[SO_Detail] NOCHECK CONSTRAINT [FK_SOH_on_SODetl]
GO
ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Drop_Ship]  DEFAULT ((0)) FOR [Drop_Ship]
GO
ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Status]  DEFAULT ('Open') FOR [Status]
GO
ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Make_Buy]  DEFAULT ('M') FOR [Make_Buy]
GO
ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Discount_Pct]  DEFAULT ((0)) FOR [Discount_Pct]
GO
ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Price_UofM]  DEFAULT ('ea') FOR [Price_UofM]
GO
ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Deferred_Qty]  DEFAULT ((0)) FOR [Deferred_Qty]
GO
ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Prepaid_Amt]  DEFAULT ((0)) FOR [Prepaid_Amt]
GO
ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Order_Qty]  DEFAULT ((0)) FOR [Order_Qty]
GO
ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Backorder_Qty]  DEFAULT ((0)) FOR [Backorder_Qty]
GO
ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Picked_Qty]  DEFAULT ((0)) FOR [Picked_Qty]
GO
ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Certs_Required]  DEFAULT ((0)) FOR [Certs_Required]
GO
ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Taxable]  DEFAULT ((0)) FOR [Taxable]
GO
ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Commissionable]  DEFAULT ((0)) FOR [Commissionable]
GO
ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Commission_Pct]  DEFAULT ((0)) FOR [Commission_Pct]
GO
ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Last_Updated]  DEFAULT (getdate()) FOR [Last_Updated]
GO
ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SODetail_PriceUofM]  DEFAULT ((1)) FOR [Price_Unit_Conv]
GO
ALTER TABLE [dbo].[SO_Detail] ADD  DEFAULT ((0)) FOR [Prepaid_Trade_Amt]
GO
DDL Material ************************************************************************************************************************************
USE [PRODUCTION]
GO
/****** Object:  Table [dbo].[Material]    Script Date: 05/22/2014 11:42:02 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Material](
[Material] [dbo].[Key30] NOT NULL,
[Primary_Vendor] [dbo].[Key10] NULL,
[User_Values] [dbo].[KeyNum] NULL,
[Shape] [dbo].[Key10] NULL,
[Location_ID] [dbo].[Key10] NOT NULL,
[Sales_Code] [dbo].[T_15] NULL,
[Description] [dbo].[T_30] NULL,
[Type] [dbo].[T_1] NOT NULL,
[Status] [dbo].[T_8] NOT NULL,
[Pick_Buy_Indicator] [dbo].[T_1] NOT NULL,
[Class] [varchar](10) NULL,
[Rev] [dbo].[T_8] NULL,
[Stocked_UofM] [dbo].[UofM] NOT NULL,
[Purchase_UofM] [dbo].[UofM] NOT NULL,
[Cost_UofM] [dbo].[UofM] NOT NULL,
[Price_UofM] [dbo].[UofM] NOT NULL,
[Selling_Price] [float] NULL,
[Standard_Cost] [float] NOT NULL,
[Average_Cost] [float] NULL,
[Last_Cost] [float] NULL,
[On_Order_Qty] [float] NULL,
[Order_Point] [float] NULL,
[Reorder_Qty] [float] NOT NULL,
[Lead_Days] [smallint] NOT NULL,
[UofM_Conv_Factor] [float] NOT NULL,
[Lot_Trace] [bit] NOT NULL,
[Rd_Whole_Unit] [bit] NOT NULL,
[Ext_Description] [text] NULL,
[Make_Buy] [dbo].[T_1] NOT NULL,
[Vendor_Reference] [dbo].[T_30] NULL,
[Drawing] [varchar](30) NULL,
[Use_Price_Breaks] [bit] NOT NULL,
[Note_Text] [text] NULL,
[Last_Updated] [datetime] NOT NULL,
[GL_Account] [dbo].[T_100] NULL,
[Price_Unit_Conv] [float] NULL,
[Holder_ID] [dbo].[T_50] NULL,
[Job] [dbo].[T_10] NULL,
[Tax_Code] [dbo].[T_15] NULL,
[Taxable] [bit] NULL,
[IS_Length] [float] NULL,
[IS_Width] [float] NULL,
[IS_Weight_Factor] [float] NULL,
[IS_Thickness] [float] NULL,
[Stock_Item] [dbo].[T_50] NULL,
[Affects_Schedule] [bit] NULL,
[ObjectID] [uniqueidentifier] NOT NULL,
[Shape_OID] [uniqueidentifier] NULL,
[Tooling] [bit] NULL,
[IsSerialized] [bit] NOT NULL,
[MaxUsage] [int] NULL,
[ShelfLife] [float] NULL,
[ShelfLifeUofM] [varchar](10) NULL,
 CONSTRAINT [PK_Material] PRIMARY KEY NONCLUSTERED 
[Material] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[Material]  WITH NOCHECK ADD  CONSTRAINT [FK_Loc_on_Matl] FOREIGN KEY([Location_ID])
REFERENCES [dbo].[Location] ([Location_ID])
GO
ALTER TABLE [dbo].[Material] NOCHECK CONSTRAINT [FK_Loc_on_Matl]
GO
ALTER TABLE [dbo].[Material]  WITH NOCHECK ADD  CONSTRAINT [FK_Shap_on_Matl] FOREIGN KEY([Shape])
REFERENCES [dbo].[Shapes] ([Shape])
GO
ALTER TABLE [dbo].[Material] NOCHECK CONSTRAINT [FK_Shap_on_Matl]
GO
ALTER TABLE [dbo].[Material]  WITH NOCHECK ADD  CONSTRAINT [FK_UVal_on_Matl] FOREIGN KEY([User_Values])
REFERENCES [dbo].[User_Values] ([User_Values])
GO
ALTER TABLE [dbo].[Material] NOCHECK CONSTRAINT [FK_UVal_on_Matl]
GO
ALTER TABLE [dbo].[Material]  WITH NOCHECK ADD  CONSTRAINT [FK_Vend_on_Matl] FOREIGN KEY([Primary_Vendor])
REFERENCES [dbo].[Vendor] ([Vendor])
GO
ALTER TABLE [dbo].[Material] NOCHECK CONSTRAINT [FK_Vend_on_Matl]
GO
ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Selling_Price]  DEFAULT ((0)) FOR [Selling_Price]
GO
ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Standard_Cost]  DEFAULT ((0)) FOR [Standard_Cost]
GO
ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Average_Cost]  DEFAULT ((0)) FOR [Average_Cost]
GO
ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Last_Cost]  DEFAULT ((0)) FOR [Last_Cost]
GO
ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_On_Order_Qty]  DEFAULT ((0)) FOR [On_Order_Qty]
GO
ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Order_Point]  DEFAULT ((0)) FOR [Order_Point]
GO
ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Reorder_Qty]  DEFAULT ((0)) FOR [Reorder_Qty]
GO
ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Lead_Days]  DEFAULT ((0)) FOR [Lead_Days]
GO
ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_UofM_Conv_Factor]  DEFAULT ((0)) FOR [UofM_Conv_Factor]
GO
ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Lot_Trace]  DEFAULT ((0)) FOR [Lot_Trace]
GO
ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Rd_Whole_Unit]  DEFAULT ((0)) FOR [Rd_Whole_Unit]
GO
ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Use_Price_Break]  DEFAULT ((0)) FOR [Use_Price_Breaks]
GO
ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Last_Updated]  DEFAULT (getdate()) FOR [Last_Updated]
GO
ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_PriceUofM]  DEFAULT ((1)) FOR [Price_Unit_Conv]
GO
ALTER TABLE [dbo].[Material] ADD  DEFAULT ((0)) FOR [IsSerialized]
GO
ALTER TABLE [dbo].[Material] ADD  DEFAULT ((0)) FOR [MaxUsage]
GO
ALTER TABLE [dbo].[Material] ADD  DEFAULT ((0)) FOR [ShelfLife]
GO
DDL SO_HEADER ***************************************************************************************************************
USE [PRODUCTION]
GO
/****** Object:  Table [dbo].[SO_Header]    Script Date: 05/22/2014 11:43:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SO_Header](
[Sales_Order] [dbo].[Key10] NOT NULL,
[Customer] [dbo].[Key10] NOT NULL,
[Ship_To] [dbo].[KeyNum] NULL,
[Contact] [dbo].[KeyNum] NULL,
[Sales_Rep] [dbo].[Key6] NULL,
[Order_Taken_By] [dbo].[Key6] NULL,
[Ship_Via] [dbo].[T_UCode] NULL,
[Tax_Code] [dbo].[T_UCode] NULL,
[Terms] [dbo].[T_UCode] NULL,
[Sales_Tax_Amt] [money] NOT NULL,
[Sales_Tax_Rate] [float] NOT NULL,
[Order_Date] [datetime] NOT NULL,
[Promised_Date] [datetime] NULL,
[Customer_PO] [dbo].[T_20] NULL,
[Status] [dbo].[T_8] NOT NULL,
[Total_Price] [money] NOT NULL,
[Currency_Conv_Rate] [float] NOT NULL,
[Trade_Currency] [dbo].[KeyNum] NULL,
[Fixed_Rate] [bit] NOT NULL,
[Trade_Date] [datetime] NULL,
[Note_Text] [text] NULL,
[Comment] [text] NULL,
[Last_Updated] [datetime] NOT NULL,
[User_Values] [int] NULL,
[Source] [dbo].[T_20] NULL,
[Prepaid_Tax_Amount] [money] NULL,
 CONSTRAINT [PK_SO_Header] PRIMARY KEY NONCLUSTERED 
[Sales_Order] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Sales_Tax_Amt]  DEFAULT ((0)) FOR [Sales_Tax_Amt]
GO
ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Sales_Tax_Rate]  DEFAULT ((0)) FOR [Sales_Tax_Rate]
GO
ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Total_Price]  DEFAULT ((0)) FOR [Total_Price]
GO
ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Currency_Conv_Rate]  DEFAULT ((1)) FOR [Currency_Conv_Rate]
GO
ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Fixed_Rate]  DEFAULT ((1)) FOR [Fixed_Rate]
GO
ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Last_Updated]  DEFAULT (getdate()) FOR [Last_Updated]
GO
ALTER TABLE [dbo].[SO_Header] ADD  DEFAULT ((0)) FOR [Prepaid_Tax_Amount]
GO
DDL JOB *******************************************************************************************************************************
USE [PRODUCTION]
GO
/****** Object:  Table [dbo].[Job]    Script Date: 05/22/2014 11:44:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Job](
[Job] [dbo].[Key10] NOT NULL,
[Sales_Rep] [dbo].[Key6] NULL,
[Customer] [dbo].[Key10] NULL,
[Ship_To] [dbo].[KeyNum] NULL,
[User_Values] [dbo].[KeyNum] NULL,
[Quote] [dbo].[Key10] NULL,
[Contact] [dbo].[KeyNum] NULL,
[Ship_Via] [dbo].[T_15] NULL,
[Terms] [dbo].[T_15] NULL,
[Tax_Code] [dbo].[T_15] NULL,
[Sales_Code] [dbo].[T_15] NULL,
[Top_Lvl_Job] [dbo].[T_10] NULL,
[Type] [dbo].[T_8] NOT NULL,
[Order_Date] [datetime] NOT NULL,
[Status] [dbo].[T_8] NOT NULL,
[Status_Date] [datetime] NOT NULL,
[Part_Number] [dbo].[T_30] NULL,
[Rev] [dbo].[T_10] NULL,
[Description] [dbo].[T_30] NULL,
[Ext_Description] [text] NULL,
[Drawing] [varchar](30) NULL,
[Build_To_Stock] [bit] NOT NULL,
[Order_Quantity] [int] NOT NULL,
[Extra_Quantity] [int] NULL,
[Pick_Quantity] [int] NULL,
[Make_Quantity] [int] NOT NULL,
[Split_Quantity] [int] NULL,
[Completed_Quantity] [int] NULL,
[Shipped_Quantity] [int] NULL,
[FG_Transfer_Qty] [int] NULL,
[Returned_Quantity] [int] NULL,
[In_Production_Quantity] [int] NOT NULL,
[Assembly_Level] [smallint] NULL,
[Certs_Required] [bit] NOT NULL,
[Time_And_Materials] [bit] NOT NULL,
[Open_Operations] [smallint] NULL,
[Scrap_Pct] [float] NOT NULL,
[Est_Scrap_Qty] [int] NULL,
[Est_Rem_Hrs] [float] NULL,
[Est_Total_Hrs] [float] NULL,
[Est_Labor] [money] NULL,
[Est_Material] [money] NULL,
[Est_Service] [money] NULL,
[Est_Labor_Burden] [money] NULL,
[Est_Machine_Burden] [money] NULL,
[Est_GA_Burden] [money] NULL,
[Act_Revenue] [money] NULL,
[Act_Scrap_Quantity] [int] NULL,
[Act_Total_Hrs] [float] NULL,
[Act_Labor] [money] NULL,
[Act_Material] [money] NULL,
[Act_Service] [money] NULL,
[Act_Labor_Burden] [money] NULL,
[Act_Machine_Burden] [money] NULL,
[Act_GA_Burden] [money] NULL,
[Priority] [smallint] NULL,
[Unit_Price] [float] NULL,
[Total_Price] [money] NULL,
[Price_UofM] [dbo].[T_4] NULL,
[Currency_Conv_Rate] [float] NOT NULL,
[Trade_Currency] [dbo].[KeyNum] NULL,
[Fixed_Rate] [bit] NOT NULL,
[Trade_Date] [datetime] NULL,
[Commission_Pct] [float] NULL,
[Customer_PO] [dbo].[T_20] NULL,
[Customer_PO_LN] [dbo].[T_6] NULL,
[Sched_End] [datetime] NULL,
[Sched_Start] [datetime] NULL,
[Quantity_Per] [float] NULL,
[Profit_Pct] [float] NULL,
[Labor_Markup_Pct] [float] NOT NULL,
[Mat_Markup_Pct] [float] NOT NULL,
[Serv_Markup_Pct] [float] NOT NULL,
[Labor_Burden_Markup_Pct] [float] NOT NULL,
[Machine_Burden_Markup_Pct] [float] NOT NULL,
[GA_Burden_Markup_Pct] [float] NOT NULL,
[Lead_Days] [smallint] NULL,
[Profit_Markup] [dbo].[T_1] NULL,
[Prepaid_Amt] [money] NULL,
[Split_To_Job] [bit] NOT NULL,
[Note_Text] [text] NULL,
[Comment] [text] NULL,
[Last_Updated] [datetime] NOT NULL,
[Order_Unit] [dbo].[T_4] NULL,
[Price_Unit_Conv] [float] NULL,
[Holder_ID] [dbo].[T_50] NULL,
[Source] [dbo].[T_20] NULL,
[Order_Taken_By] [dbo].[T_50] NULL,
[Plan_Modified] [bit] NULL,
[ObjectID] [uniqueidentifier] NOT NULL,
[Released_Date] [datetime] NULL,
[Prepaid_Tax_Amount] [money] NULL,
[Prepaid_Trade_Amt] [money] NULL,
[Last_Updated_By] [dbo].[T_50] NULL,
 CONSTRAINT [PK_Job] PRIMARY KEY NONCLUSTERED 
[Job] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[Job]  WITH NOCHECK ADD  CONSTRAINT [FK_Addr_on_Job] FOREIGN KEY([Ship_To])
REFERENCES [dbo].[Address] ([Address])
GO
ALTER TABLE [dbo].[Job] NOCHECK CONSTRAINT [FK_Addr_on_Job]
GO
ALTER TABLE [dbo].[Job]  WITH NOCHECK ADD  CONSTRAINT [FK_Cust_on_Job] FOREIGN KEY([Customer])
REFERENCES [dbo].[Customer] ([Customer])
GO
ALTER TABLE [dbo].[Job] NOCHECK CONSTRAINT [FK_Cust_on_Job]
GO
ALTER TABLE [dbo].[Job]  WITH NOCHECK ADD  CONSTRAINT [FK_Empl_on_Job] FOREIGN KEY([Sales_Rep])
REFERENCES [dbo].[Employee] ([Employee])
GO
ALTER TABLE [dbo].[Job] NOCHECK CONSTRAINT [FK_Empl_on_Job]
GO
ALTER TABLE [dbo].[Job]  WITH NOCHECK ADD  CONSTRAINT [FK_UVal_on_Job] FOREIGN KEY([User_Values])
REFERENCES [dbo].[User_Values] ([User_Values])
GO
ALTER TABLE [dbo].[Job] NOCHECK CONSTRAINT [FK_UVal_on_Job]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Build_To_Stock]  DEFAULT ((0)) FOR [Build_To_Stock]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Order_Quantity]  DEFAULT ((0)) FOR [Order_Quantity]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Extra_Quantity]  DEFAULT ((0)) FOR [Extra_Quantity]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Pick_Quantity]  DEFAULT ((0)) FOR [Pick_Quantity]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Make_Quantity]  DEFAULT ((0)) FOR [Make_Quantity]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Split_Quantity]  DEFAULT ((0)) FOR [Split_Quantity]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Completed_Quantity]  DEFAULT ((0)) FOR [Completed_Quantity]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Shipped_Quantity]  DEFAULT ((0)) FOR [Shipped_Quantity]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_FG_Transfer_Qty]  DEFAULT ((0)) FOR [FG_Transfer_Qty]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Returned_Quantity]  DEFAULT ((0)) FOR [Returned_Quantity]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_In_Production_Quantity]  DEFAULT ((0)) FOR [In_Production_Quantity]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Assembly_Level]  DEFAULT ((0)) FOR [Assembly_Level]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Certs_Required]  DEFAULT ((0)) FOR [Certs_Required]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Time_And_Materials]  DEFAULT ((0)) FOR [Time_And_Materials]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Open_Operations]  DEFAULT ((0)) FOR [Open_Operations]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Scrap_Pct]  DEFAULT ((0)) FOR [Scrap_Pct]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Scrap_Qty]  DEFAULT ((0)) FOR [Est_Scrap_Qty]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Rem_Hrs]  DEFAULT ((0)) FOR [Est_Rem_Hrs]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Total_Hrs]  DEFAULT ((0)) FOR [Est_Total_Hrs]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Labor]  DEFAULT ((0)) FOR [Est_Labor]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Material]  DEFAULT ((0)) FOR [Est_Material]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Service]  DEFAULT ((0)) FOR [Est_Service]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Labor_Burden]  DEFAULT ((0)) FOR [Est_Labor_Burden]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Machine_Burden]  DEFAULT ((0)) FOR [Est_Machine_Burden]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_GA_Burden]  DEFAULT ((0)) FOR [Est_GA_Burden]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Revenue]  DEFAULT ((0)) FOR [Act_Revenue]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Scrap_Quantity]  DEFAULT ((0)) FOR [Act_Scrap_Quantity]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Total_Hrs]  DEFAULT ((0)) FOR [Act_Total_Hrs]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Labor]  DEFAULT ((0)) FOR [Act_Labor]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Material]  DEFAULT ((0)) FOR [Act_Material]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Service]  DEFAULT ((0)) FOR [Act_Service]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Labor_Burden]  DEFAULT ((0)) FOR [Act_Labor_Burden]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Machine_Burden]  DEFAULT ((0)) FOR [Act_Machine_Burden]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_GA_Burden]  DEFAULT ((0)) FOR [Act_GA_Burden]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Priority]  DEFAULT ((5)) FOR [Priority]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Unit_Price]  DEFAULT ((0)) FOR [Unit_Price]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Total_Price]  DEFAULT ((0)) FOR [Total_Price]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Currency_Conv_Rate]  DEFAULT ((1)) FOR [Currency_Conv_Rate]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Fixed_Rate]  DEFAULT ((1)) FOR [Fixed_Rate]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Commission_Pct]  DEFAULT ((0)) FOR [Commission_Pct]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Quantity_Per]  DEFAULT ((1)) FOR [Quantity_Per]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Profit_Pct]  DEFAULT ((0)) FOR [Profit_Pct]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Labor_Markup_Pct]  DEFAULT ((0)) FOR [Labor_Markup_Pct]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Mat_Markup_Pct]  DEFAULT ((0)) FOR [Mat_Markup_Pct]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Serv_Markup_Pct]  DEFAULT ((0)) FOR [Serv_Markup_Pct]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Labor_Burden_Markup_Pct]  DEFAULT ((0)) FOR [Labor_Burden_Markup_Pct]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Machine_Burden_Markup_Pct]  DEFAULT ((0)) FOR [Machine_Burden_Markup_Pct]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_GA_Burden_Markup_Pct]  DEFAULT ((0)) FOR [GA_Burden_Markup_Pct]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Lead_Days]  DEFAULT ((0)) FOR [Lead_Days]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Prepaid_Amt]  DEFAULT ((0)) FOR [Prepaid_Amt]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Split_To_Job]  DEFAULT ((0)) FOR [Split_To_Job]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Last_Updated]  DEFAULT (getdate()) FOR [Last_Updated]
GO
ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_JOB_PriceUofM]  DEFAULT ((1)) FOR [Price_Unit_Conv]
GO
ALTER TABLE [dbo].[Job] ADD  DEFAULT ((0)) FOR [Prepaid_Tax_Amount]
GO
ALTER TABLE [dbo].[Job] ADD  DEFAULT ((0)) FOR [Prepaid_Trade_Amt]
GO
Order by COALESCE(b.[Part_Number],a.[Material],c.[Part_Number],b.[Job],a.[Job],c.[Job],b.[S/J],a.[S/J],c.[S/J])
SWProduction

Given exactly what you posted, there is a stray order by clause in the last batch of your script and it is the only statement in the batch.  Unfortunately, it is likely that something was mangled - which is why it is better to use the [insert code block]
function as opposed to just copying the entire script into the text of the post.
To short circuit things a bit, your join syntax is off.  You are joining a to b to c, so the basic structure of your statement should be:
select
from a join b on ...
join c on ...
where ...
If you used CTEs instead of derived tables it might be easier for you to visually see that.  As a simple demonstration, consider:
with ctea as (select 1 as id union all select 2),
cteb as (select 1 as id union all select 3),
ctec as (select 1 as id union all select 2 union all select 5)
select *
from ctea
full join cteb on ctea.id = cteb.id
full join ctec on ctea.id = ctec.id
order by coalesce(cteb.id, ctea.id, ctec.id);
go
with ctea as (select 1 as id union all select 2),
cteb as (select 1 as id union all select 3),
ctec as (select 1 as id union all select 2 union all select 5)
select *
from ctea
full join cteb
full join ctec on ctea.id = cteb.id and ctea.id = ctec.id
order by coalesce(cteb.id, ctea.id, ctec.id);
 And a last comment which I leave as a hint - do you really need those left joins in your derived tables?

Similar Messages

  • Getting syntax error in "SAPLBBP_PDH_CUF" in shopping cart/RFx/PO creation process in SRM7.0.Is it Patch issue?

    Getting syntax error in "SAPLBBP_PDH_CUF" in shopping cart/RFx/PO creation process in SRM7.0.Is it Patch issue?

    Hi, something wrong with your customer fields...
    Please, check them...

  • I'm getting syntax error on a python instruction.  it looks good but crashes. (print "Odd",num) becomes (print ‚Äúodd ‚Äú, num) 70 72 69 6E 74 20 E2 80 9C 6F 64 64 20 E2 80 9C 2C 20 6E 75 6D  I've rebooted and changed keyboard

    I’m getting syntax error on a python instruction.  it looks good but crashes. (print “Odd",num) becomes (print ‚Äúodd ‚Äú, num) 70 72 69 6E 74 20 E2 80 9C 6F 64 64 20 E2 80 9C 2C 20 6E 75 6D  I’ve rebooted and changed keyboard

    It worked when typed in from the command line.  Doesn't when its pasted in from Text Edit, rtf or txt. 

  • Beginner: Getting syntax error on WHERE clause in SELECT

    I'm very new to php and mySQL.  Am using DW master/detail to generate to basic code I need.  One thing I need to do is modify a select statement in the master to include a WHERE clause to limit the selection to a particular value in one field.
    I'm getting a syntax error with the WHERE clause I'm adding to the map select statement.
    This is the portion of the error message showing the error location:
    'WHERE Group='Community' LIMIT 0, 10'
    The php that generated the select is:
    $query_maps = "SELECT * FROM tblmaps ORDER BY tblmaps.DispSeq";
    $query_limit_maps = sprintf("%s WHERE Group='%s' LIMIT %d, %d", $query_maps, $selectGroup, $startRow_maps, $maxRows_maps);
    This approach to creating the select statement is from the code generated for the master page.  It adds the LIMIT clause.  All I did was add the "WHERE Group='%s' and the $selectGroup variable which comes from earlier code.  You can see that the $selectGroup variable is equal to the "Community: group.
    I've scanned the web to see what syntax error I might be making but haven't found anything that explains it.
    The full resolved select statement is:
    SELECT * FROM tblmaps ORDER BY tblmaps.DispSeq WHERE Group='Community' LIMIT 0,10
    What am I not seeing?
    Tom

    Thanks.  Make sense but changing that didn't help.
    Here's the error message I'm getting:
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Group='Community' ORDER BY tblmaps.DispSeq LIMIT 0, 10' at line 1
    The full select (from a debugging ECHO I inserted) is:
    SELECT * FROM tblmaps WHERE Group='Community' ORDER BY tblmaps.DispSeq LIMIT 0, 10
    Note that when I take the WHERE clause out, there is no syntax error.

  • Getting syntax error while executing keyfigure routine BI 7.0

    Hello,
    I am writing a very simple keyfigure routine to calculate sales revune using sales quantity and sales price, I am getting error as follows
    - I am in 'Rules Details' screen and I have selected 'Routine' as the rule type. I enter the following code in routine
         RESULT = SOURCE_FIELDS_RULE-/BIC/IO_VB_QU *
         SOURCE_FIELDS_RULE-/BIC/IO_VB_PRC .
    - I hit the check button on the routine page, it says no syntax errors
    - Now I am back in the 'Rules Details' page and I hit the 'Check' button it gives me the following error
    Rule(target IO_VB_REV, group: Standard Group): Syntax error in routine
    Please tell me what is wrong. what should i check

    Hi Vaibhav,
    Here are the details
    - I am loading data from flatfile to an Infocube with 3 keyfigures: IO_VB_PRC (Sales Price) , IO_VB_QU (Sales Quantity), IO_VB_REV (Sales Revune). Getting values for IO_VB_QU and IO_Vb_PRC from flatfile and calculating for IO_VB_REV using routine
    - I created Transformations, and under  Rule Group: Standard Group box I see 'X' sign against 'IO_VB_REV' field, meaning not mapped to any datasource field
    - In rules detail screen, I add two source fields of Rule , IO_VB_QU and IO_VB_PRC. I see IO_VB_REV already added under 'Target fields of Rule' section
    - I then add the only following line to routine
    RESULT = SOURCE_FIELDS_RULE-/BIC/IO_VB_QU *    SOURCE_FIELDS_RULE-/BIC/IO_VB_PRC .
    Clicking on check button it gives no syntax error message. I save and exit back to Rule Details page.
    - I specify 'USD' as the Conversion Type and then click on check button it initially gives me 'Incorrect Input'  written in an information message box and then error that Syntax error in routine
    Let me know what is that I am missing
    Thanks for helping

  • Getting syntax error in Crystal Report Viewer

    The web application that I am supporting has reports that are presented through CR Viewer. The problem that I am facing is that if I pass a value to get the report, its giving the following error.
    The syntax of the value of prompt 'name_of_paramente_passing' is incorrect. Please check the syntax and try again.
    I am not getting this error if I run the same report through the actual Crystal report program.
    So when I pass 123.1 to the crystal web viewer it wont give me any trouble. But If I pass 123.1(a) , it throws that error.
    somehow the combination of pareanthesis and the alphabet is causing some trouble....
    Is this a bug or some other problem.?
    Version that I have:
    Crystal Report web Viewer Control 11.5
    Crystal Developer 11.0.0.1282
    Please reply if you have any work around for this.
    Thank you,
    Santhosh

    Thanks Mohammed. But our application is trying to pass a parameter which contains user data like section numbers....
    So when we pass the value 123.1(a) , here what is happening behind the scene of CR viewer
    webSource0.AddParameter "promptex-NAMEOFPARAMETER", "123.1%28a%29"
    and it throws up the error
    "The syntax of the value for prompt 'NAMEOFPARAMETER' is incorrect. Please correct the syntax and try again"
    I have no idea why it is throwing up this errror....

  • Since updating to v17, I'm getting syntax errors on every site I go to. 2 windows everytime. ok twice and they are gone.

    This is the 1st small window that comes up "evalInSandbox:SyntaxError: syntax error"
    I click "OK" then the next window comes up "syntax error". I click "ok" and it goes away until I go to another web page.

    Sorry I didn't get back in here. "Social Fixer" was the problem. I ungraded it and the problem went away. Thanks for responding Kiraela.

  • Getting syntax error when i using INSERT command

    Hi,
    i am using MS Access DB. Table name is "Timesheet". the table has the following Fields,
    uname - Text
    date - Text
    intime - Text
    outtime - Text
    duration - Text
    desc - Text
    i am using preparedStatment,
    String accessDBURLPrefix = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
    String accessDBURLSuffix = ";DriverID=22;READONLY=false}";
    String filename="D:\\TimeSheet\\TimeDB.mdb"
    String databaseURL = accessDBURLPrefix + filename + accessDBURLSuffix;
    Connection con = DriverManager.getConnection(databaseURL);
    PreparedStatment st = con.prepareStatement("INSERT INTO (uname, date, intime) TimeSheet VALUES (?,?,?)");
    st.setString(1,user);
    st.setString(2,date);
    st.setString(3,intime);
    st.executeUpdate();
    }if i am going to compile this code i will get SQLException
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
         at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
         at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
         at sun.jdbc.odbc.JdbcOdbc.SQLExecute(JdbcOdbc.java:3150)
         at sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute(JdbcOdbcPreparedStatement.java:214)
         at sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeUpdate(JdbcOdbcPreparedStatement.java:136)
         at TimeSheetDemo.writeToDB(TimeSheetDemo.java:84)
         at TimeSheetDemo.main(TimeSheetDemo.java:37)
    Really i have tired to figure out this problem. please help me anyone.
    thank you

    Thank you. it was my careless mistake. i changed that mistake. but still it is not working, get same exception.
    st = con.prepareStatement("INSERT INTO  TimeSheet (uname, date, intime) VALUES (?,?,?)");suppose, if i will give values for all fields, it will work fine, example
    st = con.prepareStatement("INSERT INTO  TimeSheet  VALUES (?,?,?,?,?,?)");
    st.setString(1,user);
    st.setString(2,date);
    st.setString(3,intime);
    st.setString(4,outtime);
    st.setString(5,duration);
    st.setString(6,descrip);
    st.executeUpdate();But my problem is i want to insert the values for only 3 fields.
    give me the solution for inserting values for specified fields

  • Keep getting syntax errors

    When I write formulas, I sometimes get a syntax error. However when I quit Numbers, open my document again, click on the syntax error and then press "enter," the syntax error has been corrected. Because I've done this many times, I know it's not that I'm incorrectly entering the formula. Can anyone shed any light on this? Thanks!

    As you are using Numbers '08, we can't use SUMIFS so :
    (1) I will assume that there is a records table for each year.
    (2) an auxiliary column (here column D) is required in the main table.
    In cells of this auxiliary column, the formula is:
    =MONTH(A)&B
    Now, I describes the table named "resume"
    In the row 1 which is an header one,
    cell A1 is blank (it may contain the year)
    in cell B1 the formula is :
    =MONTHNAME(COLUMN()-1)
    and I used fill to the right to get the other names of months.
    I used a formula so that the names match the language in use.
    In cells A2 thru A7 are the names of recorded items.
    In cell B2, the formula is:
    =SUMIF(main :: $D,"="&COLUMN()-1&$A,main :: $C)
    Then I used fill_down and fillto_theright.
    With Numbers '09 we would be allowed to use SUMIFS (which treats several conditions) so it would be easy to test: the year, the month, the item.
    Yvan KOENIG (VALLAURIS, France) vendredi 26 mars 2010 18:57:15
    Oops, I built the doc in Numbers '09 and forgot that MONTHNAME is unavailable in Numbers '08.
    So you will have to type the names of months in row 1.
    Message was edited by: KOENIG Yvan

  • Always getting syntax error when using RANK formula. Please help!!

    i am desperate! tried EVERYTHING. so as a last try, I tested the very same Example that Apple gives to elaborate how the "RANK" formula works...and you guessed it....NOT WORKING.
    not even a reconstruction 1 to 1 of the apple example worked, giving me a syntax error.
    thus i am assuming that i am doing something wrong on a very basic level i would have never thought of (maybe a setting i have wrong?, maybe if you have blue as background formulas don't work?).
    i would be sooooo grateful for any help!!!

    Thank you very much for answering this quickly.
    but unfortunately it doesnt work
    i made some screenshots, maybe this way someone sees a maybe obvious mistake i am making
    and
    Message was edited by: Apolloss

  • Why am I getting syntax error messages when sending emails thru MS Office:MAC 2011?

    Why am I getting suntax error messages when sending emails thru my outlook on my MacPro?

    What are the exact and complete error messages?

  • Getting Syntax Error in Script Editor

    I am a fairly new Mac user and also fresh to programming. I am trying run a piece of code that I copied directly from a guide but seems to be giving me a syntax error: "Expected 'into', variable name, other parameter name or property but found end of line."
    Here is the code that I am working with:
    on gestaltVersioninfo(gestaltcode, string_length)
    try
    tell application "Finder" to ¬
    copy my NumToHex((system attribute gestalt_code), ¬
    string_length) to {a, b, c, d}
    set the numeric_version to {a, b, c, d} as string
    if a is "0" then set a to ""
    set the version_string to (a & b & "." & c & "." & d) as string
    return {numeric_version, version_string}
    on error
    return {"", "unknown"}
    end try
    end gestaltVersion_info
    on NumToHex(hexData, stringLength)
    set hexString to {}
    repeat with i from stringLength to 1 by -1
    set hexString to ((hexData mod 16) as string) & hexString
    set hexData to hexData div 16
    end repeat
    return (hexString as string)
    end NumToHex
    copy my gestaltVersion_info("sysv", 4) to {system_version, system_string}
    if the system_version is less than "1050" then
    do shell script "/usr/bin/printf \"\\n# Block Adobe
    Activation\\n127.0.0.1\\tactivate.adobe.com\\n127.0.0.1\\tpractivate.adobe.com\
    \n127.0.0.1\\tereg.adobe.com\\n127.0.0.1\\tactivate.wip3.adobe.com\\n127.0.0.1\
    \tactivate.wip4.adobe.com\\n127.0.0.1\\twip3.adobe.com\\n127.0.0.1\\twip4.adobe
    .com\\n127.0.0.1\\t3dns-3.adobe.com\\n127.0.0.1\\t3dns-
    4.adobe.com\\n127.0.0.1\\t3dns-2.adobe.com\\n127.0.0.1\\tadobedns.
    adobe.com\\n127.0.0.1\\tadobe-dns-2.adobe.com\\n127.0.0.1\\tadobe-dns-
    3.adobe.com\\n127.0.0.1\\tereg.wip3.adobe.com\\n127.0.0.1\\tactivatesea.
    adobe.com\\n127.0.0.1\\twwis-dubc1-vip60.adobe.com\\n127.0.0.1\\tactivatesjc0.
    adobe.com\\n127.0.0.1\\thl2rcv.adobe.com\\n\" >> /etc/hosts" with
    administrator privileges
    else if the system_version is greater than "1050" then
    do shell script "/usr/bin/printf \"\\n# Block Adobe
    Activation\\n127.0.0.1\\tactivate.adobe.com\\n127.0.0.1\\tpractivate.adobe.com\
    \n127.0.0.1\\tereg.adobe.com\\n127.0.0.1\\tactivate.wip3.adobe.com\\n127.0.0.1\
    \tactivate.wip4.adobe.com\\n127.0.0.1\\twip3.adobe.com\\n127.0.0.1\\twip4.adobe
    .com\\n127.0.0.1\\t3dns-3.adobe.com\\n127.0.0.1\\t3dns-
    4.adobe.com\\n127.0.0.1\\t3dns-2.adobe.com\\n127.0.0.1\\tadobedns.
    adobe.com\\n127.0.0.1\\tadobe-dns-2.adobe.com\\n127.0.0.1\\tadobe-dns-
    3.adobe.com\\n127.0.0.1\\tereg.wip3.adobe.com\\n127.0.0.1\\tactivatesea.
    adobe.com\\n127.0.0.1\\twwis-dubc1-vip60.adobe.com\\n127.0.0.1\\tactivatesjc0.
    adobe.com\\n127.0.0.1\\thl2rcv.adobe.com\\n\" >> /etc/hosts;
    /usr/bin/dscacheutil -flushcache" with administrator privileges
    end if

    In your first *do shell script* statement, the *with administrator privileges* parameter is split across two lines. You just need to either put it on a single line or use option-return to continue a statement on the next line (not sure if the last *do shell script* has the same issue).
    Note that there is an AppleScript forum where these kinds of questions will be seen by a more targeted audience.

  • Getting syntax error in /usr/include/sys/ header files during Compilation

    Hi,
    I am migrating old PRO C code from Oracle 8 + Solaris 8 to Oracle 10 + Solaris 10 environment. While compiling the code it is giving error :*
    Syntax error at line 69, column 2, file /usr/include/sys/uio.h:
    Error at line 69, column 2 in file /usr/include/sys/uio.h
    lloff_t uiooffset; /* file offset */
    .1
    PCC-S-02201, Encountered the symbol "lloff_t" when expecting one of the followin
    g:
    } char, const, double, enum, float, int, long, ulong_varchar,
    OCIBFileLocator OCIBlobLocator, OCIClobLocator, OCIDateTime,
    OCIExtProcContext, OCIInterval, OCIRowid, OCIDate, OCINumber,
    OCIRaw, OCIString, short, signed, sql_context, sql_cursor,
    struct, union, unsigned, utext, uvarchar, varchar, void,
    volatile, a typedef name,
    The symbol "enum," was substituted for "lloff_t" to continue.
    Any guess why this is happening?

    Hi,
    Try using the PARSE=PARTIAL USERID=user/password[@SID] SQLCHECK=SEMANTICS precompiler options.
    All your hosts variables must be declared inside a Declare section.
    Reference: Pro C/C++ Programmers Guide, chapter 5
    Reguards,
    Rene Rivet

  • Getting syntax error while running ODI project

    Greetings,
    First time here with ODI. I'm using ODI version 10.1.3.5 and get the following error below on execution. I'm reading from a flat file to a mssql table. Not sure if this matters, but ODI is installed on one server running sql2005, while the staging tables are on a different server running 2008. The C$_ table is created, but contains no data.
    156 : S0001 : com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'TABLE'.
    com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'TABLE'.
         at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197)
         at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1493)
         at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:390)
         at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:340)
         at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
         at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)
         at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:179)
         at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:154)
         at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:283)
         at com.sunopsis.sql.SnpsQuery.executeQuery(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Thread.java:595)
    Many thanks.

    Hi Lanfir,
    I'm not sure where the sql gets generated, although I see why the code fails (I think). Sql is expecting a real table name but insteas gets either a blank name or the comment /* */. Is that correct?
    This is what the error is saying at the operator.
    Loading: Query / Execution Plan
    ====================
    select     SETID     C3_SETID,
         CUSTNUM     C2_CUSTNUM,
         CUSTDESC     C1_CUSTDESC
    from      TABLE
    /*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=CUSTOMERSNP$CRLOAD_FILE=
    D:\Automation\ODI\HCCPREV\PS\Actual/CustomerMeta.txtSNP$CRFILE_FORMAT=DSNP$CRFILE_SEP_FIELD=09
    SNP$CRFILE_SEP_LINE=0D0ASNP$CRFILE_FIRST_ROW=1SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP
    $CRDWG_COLSNP$CRCOL_NAME=SETIDSNP$CRTYPE_NAME=STRINGSNP$CRORDER=1SNP$CRLENGTH=50SNP$CRPRECISION=50
    SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=CUSTNUMSNP$CRTYPE_NAME=STRINGSNP$CRORDER=2SNP$CRLENGTH=50SNP
    $CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=CUSTDESCSNP$CRTYPE_NAME=STRINGSNP$CRORDER=3SNP
    $CRLENGTH=250SNP$CRPRECISION=250SNP$CR$$SNPS_END_KEY*/
    Default: Query / Execution Plan
    ====================
    insert into EPMAInterfaceTST.dbo.C$_0NEW_CustomerTST
         C3_SETID,
         C2_CUSTNUM,
         C1_CUSTDESC
    values
         :C3_SETID,
         :C2_CUSTNUM,
         :C1_CUSTDESC
    )

  • Getting syntax error in procedure

    Hi,
    Oracle9i
    Trying to update table EMP using procedure as below :
    CREATE OR REPLACE PROCEDURE SCOTT.UPDATE_EMP
    IS
    v_ename varchar2(10);
    BEGIN
    update emp set ename: = 'XYZ' where empno='7934';
    END;
    but getting error :
    [Error] Syntax check (9: 21): ERROR line 9, col 21, ending_line 9, ending_col 21, Found ':', Expecting: = -or- .
    with regards

    You do it like this:
    SQL> desc emp
    Name                                      Null?    Type
    EMPNO                                     NOT NULL VARCHAR2(20)
    ENAME                                              VARCHAR2(20)
    DEPTNO                                             NUMBER
    SQL>
    SQL>
    SQL> CREATE OR REPLACE PROCEDURE UPDATE_EMP (p_empno emp.empno%type, p_name in emp.ename%type) IS
      2  BEGIN
      3
      4    update emp set ename = p_name where empno= p_empno;
      5    commit;
      6
      7  END;
      8  /
    Procedure created.
    SQL> select * from emp;
    EMPNO                ENAME                    DEPTNO
    2                    a1                           10
    SQL> exec update_emp(2, 'testing proc');
    PL/SQL procedure successfully completed.
    SQL> select * from emp;
    EMPNO                ENAME                    DEPTNO
    2                    testing proc                 10
    SQL>Asif Momen
    http://momendba.blogspot.com
    Edited by: Asif Momen on Jun 18, 2010 3:04 PM
    Included "DESC EMP"

Maybe you are looking for

  • Media Center Problems

    I have a sr5413wm with many upgrades and one of them was a sabrent tv card sbt-tvfm and when i use media center on vista home premium 32 bit the sounds and speech are off by about 5 seconds. And i have the latest and only driver for the card and i be

  • Vendor master "fixed-line telephone" and "standard fixed-line telephone"

    Hi, Can any one pls explain what is the difference between 1) The telephone number is a fixed-line telephone and 2) The telephone number is the standard fixed-line telephone Vendor master record I am not able to find both the fields. Thx Jai

  • Shipping Unit Group (Handling Unit)

    We are converting from SAP version 4.5B to ECC 6.0.  In our old 4.5B version the Shipping Unit Group in our inbound Shipping Notification IDoc (DESADV) was not edited.  In 6.0 the Shipping Unit Group data element is being edited (against the TVE1 tab

  • Missing file icons

    I have just copied all my files (mainly music/pictures) to an external drive. I replaced bigger drives in NAS and copied files back. There are no icons in PUBLIC folder!! If I try to copy again, I get message to say file already exists. What is going

  • How to LINK two or more Text Field

    I have already asked once to get help with creating a link between two text fields (two fields created with a text tool) so that when text reached the end of one text field it will simply go into another. The given explanation was not specific enough