I create a sp using above four tables join. When i executing that sp then record repeating more than three times
And my sp is
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER procedure [dbo].[SP_PURCHAGE_JOIN]
@company INT
as
select a.companyname,upper(a.shortname)+replace(convert(varchar,convert(datetime,d.quotation_date),1),'/','')+
convert(varchar,d.seskey) as
[QuotationID],a.seskey,b.quotaion_id,b.Purchage_No,b.Purchage_Date,b.Purchage_Amount,b.Upload,b.Upload_Filename
from tbl_partnerhirerege as a
inner join tbl_PurchageOrder as b on a.seskey = b.userdid inner join tbl_quotation as c on c.userdid = b.userdid
inner join tbl_quotation_master as d on d.seskey = c.quotaion_id where a.seskey=@company
Anybody please help me. I am waitning for your reply.
vsp.santu
Member
157 Points
425 Posts
join sp problem
Apr 23, 2012 11:08 AM|LINK
Hi,
My tables are
Table1: tbl_Partnerhirerege
seskey userdid companyname shortname
12 14 CISCO CIS
Table2: tbl_PurchaseOrder
seskey userdid quotaion_id pono poamount
1 12 40 cis001 120
Table3: tbl_quotation
seskey userdid quotaion_id rate
1 12 40 1000
Table4: tbl_quotation_master
seskey userdid quotation_date
40 12 04/23/2012
I create a sp using above four tables join. When i executing that sp then record repeating more than three times
And my sp is
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER procedure [dbo].[SP_PURCHAGE_JOIN]
@company INT
as
select a.companyname,upper(a.shortname)+replace(convert(varchar,convert(datetime,d.quotation_date),1),'/','')+
convert(varchar,d.seskey) as
[QuotationID],a.seskey,b.quotaion_id,b.Purchage_No,b.Purchage_Date,b.Purchage_Amount,b.Upload,b.Upload_Filename
from tbl_partnerhirerege as a
inner join tbl_PurchageOrder as b on a.seskey = b.userdid inner join tbl_quotation as c on c.userdid = b.userdid
inner join tbl_quotation_master as d on d.seskey = c.quotaion_id where a.seskey=@company
Anybody please help me. I am waitning for your reply.
Thank you.