Эй, ребята, IM создать хранимую процедуру для поиска формы в asp.net им получать сообщение об ошибке, код приведен нижеСохраненной ошибки процедуры «неоднозначный колонок»
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[sp_searchcustomervendordetails]
@customervendortype varchar(30)=Null,
@customervendorid varchar(30)=Null,
@customervendorname varchar(30)=Null,
@state varchar(30)=Null,
@city varchar(30)=Null
AS
BEGIN
SET NOCOUNT ON;
--if @customervendortype is not null and len(@customervendortype)=0 set @customervendortype = null
--if @customervendorid is not null and len(@cuatomervendorid)=0 set @customervendorid = null
--if @customervendorname is not null and len(@customervendorname)=0 set @customervendorname = null
--if @city is not null and len(@city)=0 set @city = null
--if @state is not null and len(@state)=0 set @state = null
-- Insert statements for procedure here
SELECT CustomerVendorDetails.customervendorid AS CustomerVendorID,CustomerVendorAddressDetails.customervendorname, CustomerVendorAddressDetails.doorno, CustomerVendorAddressDetails.street,
CustomerVendorAddressDetails.city, CustomerVendorAddressDetails.state, CustomerVendorAddressDetails.country,
CustomerVendorAddressDetails.pincode, CustomerVendorDetails.decidingauthority,
CustomerVendorDetails.landlineno1, CustomerVendorDetails.landlineno2, CustomerVendorDetails.faxno, ContactPersonDetails.contactno,
ContactPersonDetails.designation
FROM CustomerVendorDetails INNER JOIN
CustomerVendorAddressDetails ON CustomerVendorDetails.customervendorid = CustomerVendorAddressDetails.customervendorid INNER JOIN
ContactPersonDetails ON CustomerVendorAddressDetails.customervendorid = ContactPersonDetails.customervendorid
WHERE (@customervendortype is null or customervendortype like @customervendortype)
or (@customervendorid is null or customervendorid like @customervendorid)
or (@customervendorname is null or customervendorname like @customervendorname)
or (city is null or city like @city)
or (state is null or state like @city)
END
им получать эту ошибку
Msg 209, Level 16, State 1, Procedure sp_searchcustomervendordetails, Line 34
Ambiguous column name 'customervendorid'.
Msg 209, Level 16, State 1, Procedure sp_searchcustomervendordetails, Line 35
Ambiguous column name 'customervendorname'
может любой помочь мне
благодарит друга за его работу – Raj