Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
7siva7
Starting Member
28 Posts |
Posted - 2011-11-24 : 07:03:47
|
| i am struggling with this error from 2 dayscan any one please help me !!! |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-11-24 : 07:14:04
|
| FROM ( SELECT pg.Reactor_Group_Nm AS CatGroup, MIN(Phase_Order_Num) AS Base_Phase_Order_Num FROM Phase_Reactor_Group pg JOIN Phase ph ON ph.Plant_Cd = pg.Plant_Cd AND ph.Run_Id = pg.Run_Id AND ph.Phase_Id = pg.Phase_Id WHERE pg.Plant_Cd = @proc_vr_plant_cd AND pg.RUN_ID = @proc_nm_Run_Id GROUP BY pg.Reactor_Group_Nm ) ) Phase_GroupAren't there too many close brackets here?Hate to be the one tying to maintain this system.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
7siva7
Starting Member
28 Posts |
Posted - 2011-11-24 : 07:16:50
|
| Brackets CLosed Correctly.....just try to Execute this code in your SSMS..then you will get same errorHI |
 |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-11-24 : 07:21:09
|
| Maybe this then - then derived table will need a name - maybe the second bracket isn't ending the derived table.FROM(SELECT pg.Reactor_Group_Nm AS CatGroup,MIN(Phase_Order_Num) AS Base_Phase_Order_NumFROM Phase_Reactor_Group pgJOIN Phase phON ph.Plant_Cd = pg.Plant_CdAND ph.Run_Id = pg.Run_IdAND ph.Phase_Id = pg.Phase_IdWHERE pg.Plant_Cd = @proc_vr_plant_cdAND pg.RUN_ID = @proc_nm_Run_IdGROUP BY pg.Reactor_Group_Nm ) a) Phase_Group==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
7siva7
Starting Member
28 Posts |
Posted - 2011-11-24 : 07:35:43
|
| Thanks dude..it works....thank you very muchHI |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-11-25 : 04:51:16
|
quote: Originally posted by 7siva7 Thanks dude..it works....thank you very muchHI
Ok. Why did you remove your original code?MadhivananFailing to plan is Planning to fail |
 |
|
|
akis3110
Starting Member
3 Posts |
Posted - 2011-12-18 : 06:38:03
|
| I'm trying to import data from Excel. I have created a linked server with Ace 12.0 provider and I'm execute this code INSERT INTO OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0; Database=C:\Users\akis\Desktop\Customer.xlsx;HDR=No', 'Select * from [Sheet1$]')I get back this error message:Msg 102, Level 15, State 1, Line 1Incorrect syntax near ')'Can anyone help please? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-18 : 10:21:23
|
quote: Originally posted by akis3110 I'm trying to import data from Excel. I have created a linked server with Ace 12.0 provider and I'm execute this code INSERT INTO OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0; Database=C:\Users\akis\Desktop\Customer.xlsx;HDR=No', 'Select * from [Sheet1$]')I get back this error message:Msg 102, Level 15, State 1, Line 1Incorrect syntax near ')'Can anyone help please?
please dont hijack other threadspost your question as a new thread to improve visibilityalso your insert is not complete as there's no value or select part------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|
|
|