[thelist] SQL: Accessing Data in a Stored Procedure

Tab Alleman talleman at autobex.com
Tue Dec 5 08:58:18 CST 2000


Ah, I found a working example:

Select @DeclaredVariable = TableName.ColumnName from TableName  where
ColumnName = @InputVariable



-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Anthony Baratta
Sent: Monday, December 04, 2000 6:05 PM
To: thelist at lists.evolt.org
Subject: Re: [thelist] SQL: Accessing Data in a Stored Procedure


 >	SELECT @SFID = SELECT ID FROM SF WHERE NAME=@SFFileName

Try nesting your Selects....I'm not the SQL guru - but here's my attempt:

	DELETE FROM TABLE2 WHERE IDNUMBER IN (SELECT IDNUMBER FRoM TABLE1 WHERE
NAME=@SFFileName)
	DELETE FROM TABLE1 WHERE NAME=@SFFileName

Hope that helps, or at least does not hurt.




----
Anthony Baratta
President
Keyboard Jockeys


---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !





More information about the thelist mailing list