日期:2014-05-17 浏览次数:20525 次
CREATE PROCEDURE [dbo].[proc_GetFltAriLineByOrderId2]
@UID varchar(10)
AS
begin
select fltorder.OrderID from
[FltOrderDB].[dbo].[FltPassenger] fltpass
inner join [FltOrderDB].[dbo].[FltOrder] fltorder
on fltpass.OrderID=fltorder.ID
inner JOin [UserDB].[dbo].[Member_Corp] corp on fltpass.CorpUID=corp.UID
where corp.UID=@UID and fltorder.Status=1
end
CREATE PROCEDURE [dbo].[proc_GetFltAriLineByOrderId2] @UID VARCHAR(10)
AS
BEGIN
DECLARE @table TABLE
(
OrderID VARCHAR(10),
Tpm NVARCHAR(MAX)
)
DECLARE @temp TABLE
(
Tpm NVARCHAR(MAX)
)
DECLARE @OrderID VARCHAR(10)
DECLARE cursor_order CURSOR STATIC LOCAL FORWARD_ONLY READ_ONLY --定义游标
FOR
SELECT fltorder.OrderID
FROM [FltOrderDB].[dbo].[FltPassenger] fltpass
INNER JOIN [FltOrderDB].[dbo].[FltOrder] fltorder ON fltpass.OrderID = fltorder.ID
INNER JOIN [UserDB].[dbo].[Member_Corp] corp ON fltpass.CorpUID = corp.UID
WHERE corp.UID = @UID
AND fltorder.Status = 1