Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-03-06 : 08:37:30
|
| Gregor writes "All my lookup tables have 3 columnscolumn 1 = int (identity)column 2 = varchar(255)column 3 = intI need a dynamic sproc which will let me insert into these tables - so far ive got this but im stuck with how to update the second column.CREATE PROCEDURE usp_update_lookup_table( @lookup_tablename varchar(200), @lookup_desc varchar(100), @lookup_active int)ASDeclare @SQL VarChar(1000)SELECT @SQL = 'UPDATE ' SELECT @SQL = @SQL + @lookup_tablenameSELECT @SQL = @SQL + ' SET 'SELECT @SQL = @SQL + @lookup_descSELECT @SQL = @SQL + '= @lookup_desc'print (@SQL)--Exec ( @SQL)RETURN @@ERRORGORegardsGregor" |
|
|
Nazim
A custom title
1408 Posts |
|
|
|
|
|