On Wed, 2004-03-24 at 11:23, Burns, John D wrote:
> I've done simple stored procedures before to "increase performance"
> (which I already heard today doesn't necessarily do that) but I'm
> wanting to get into using SQL stored procedures for more in depth stuff.
> One thing I'm not sure on how it works is as follows:
>
> CREATE PROCEDURE [dbo].[sm_login]
> @username varchar(40)
> @password varchar(40)
> AS
> select firstname, lastname, userID
> from users
> where username = @username and password = @password
>
> <!----Now, depending on the value (if any) returned from the above query
> I want to grab some other info based on the userID from another table.
> How do I reference the value returned from above? ---->
<cfprocresult
http://livedocs.macromedia.com/coldfusion/5.0/CFML_Reference/Tags77.htm
Do as many selects as you want then specify which result set goes to
which. This supposedly doesn't work in Oracle, but I can not confirm.
>
> In CF, I'd compare it to:
>
> <cfquery...name="query1">
> select firstname, lastname, userID
> from users
> where username = '#form.username#' and password = '#form.password#'
> </cfquery>
>
> <cfquery...name="query2">
> select somethingelse
> from anothertable
> where userID = #query1.userID#
> </cfquery>
>
>
> Is there any way to do something similar in a stored procedure? Thanks!
>
> John Burns
>
>
>
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- Stored Procedure Question Bruce Sorge
- Re: Stored Procedure Question Kwang Suh
- Re: Stored Procedure Question Brian Silvers
- Re: Stored Procedure Question Bruce Sorge
- Stored Procedure question Phillip Broussard
- RE: Stored Procedure question Mark A. Kruger - CFG
- Re: Stored Procedure question cstredway
- RE: Stored Procedure question Phillip Broussard
- stored procedure question Burns, John D
- RE: stored procedure question Barney Boisvert
- Re: stored procedure question Rob
- Re: stored procedure question Nick Han