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 |
|
AdamWest
Constraint Violating Yak Guru
360 Posts |
Posted - 2011-05-03 : 10:08:43
|
| HI in this sp. it is not compiling. what i need to do is pass to thesp the customerid. then i can use the columns datasource and datasourcecustomerid in the app. the table is small:table name: CustomermappingsDatasource - PK, FK, Char 10, Not NullDatasourceCustomerid - PK, Char50, Not NullCustomerid- FK, Int, Not Nullhere is the sp that is not compiling:create PROCEDURE [dbo].[GetCustomermappings] @customerid VARCHAR(50) AS BEGIN SET NOCOUNT ON; SELECT CustomerId RTRIM(DataSource) AS DataSource ,RTRIM(DataSourceCustomerId) AS DataSourceCustomerIdFROM CustomerMappings uINNER JOIN Customermappings c ON c.CustomerId = u.CustomerIdWHERE u.customerid = @Customerid END Msg 102, Level 15, State 1, Procedure GetCustomermappings, Line 13Incorrect syntax near 'DataSource'. |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-05-03 : 10:12:04
|
There is a comma missing after CustomerId No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|
|