View Single Post
  #9 (permalink)  
Old October 3rd, 2004, 11:01 AM
jemacc jemacc is offline
Friend of Wrox
 
Join Date: Nov 2003
Location: Lehigh Acres, FL, USA.
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

Here is the alternative to your original question

create proc up_parmSel_state
as
declare @SQL varchar(255),@state_ID varchar(30) @tblname sysname

SELECT @tblname = 'state_t'

SELECT @SQL = 'SELECT * FROM ' + @tblname
SELECT @SQL = @SQL + ' WHERE (state_ID) = ' + @state_ID'
EXEC(@SQL)



Reply With Quote