Re: Using Stored Procedure returned fields in another Stored Proc or Query
anonymous_at_discussions.microsoft.com
Date: 06/22/04
- Next message: Kirk: "Check to see if a table exists"
- Previous message: Hugo Kornelis: "Re: Using Stored Procedure returned fields in another Stored Proc or Query"
- In reply to: Hugo Kornelis: "Re: Using Stored Procedure returned fields in another Stored Proc or Query"
- Next in thread: Hugo Kornelis: "Re: Using Stored Procedure returned fields in another Stored Proc or Query"
- Reply: Hugo Kornelis: "Re: Using Stored Procedure returned fields in another Stored Proc or Query"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 21 Jun 2004 18:15:43 -0700
CREATE PROCEDURE Create_Worksheet_Summary
@year as char(4),
@period as char(2)
AS
SELECT
* FROM
dbo.A
Group By A.Acct
WHERE CAST(RTRIM(A.FISCYR) + RTRIM(A.FISCPER) AS INT)
<= CAST(@year + @period AS INT)
UNION ALL
(SELECT
* FROM
dbo.B
Group By B.Acct
WHERE CAST(RTRIM(B.FISCYR) + RTRIM(B.FISCPER) AS INT) <=
CAST(@year + @period AS INT))
GO
----
Incorrect syntax near 'groupby' (or Group by)
Thanks,
Baz
- Next message: Kirk: "Check to see if a table exists"
- Previous message: Hugo Kornelis: "Re: Using Stored Procedure returned fields in another Stored Proc or Query"
- In reply to: Hugo Kornelis: "Re: Using Stored Procedure returned fields in another Stored Proc or Query"
- Next in thread: Hugo Kornelis: "Re: Using Stored Procedure returned fields in another Stored Proc or Query"
- Reply: Hugo Kornelis: "Re: Using Stored Procedure returned fields in another Stored Proc or Query"
- Messages sorted by: [ date ] [ thread ]