E engineer Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-25 #1 定义一变量,用此变量值作为SQL表名打开表,请高手指教,不甚感激!
X xxw553 Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-25 #2 用字符串变量做 aa,BB:string; aa:='select * from '+bb+' where '
E engineer Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-25 #3 我的意思是在SQL企业管理里创建过程,然后用DELPHI前台传递“变量表” 到过程,到过程执行时,用此变量值来作为表名来打开表。 请问你知道吗?
F fshell Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-25 #5 存储过程这么写: CREATE PROCEDURE dt_TestForYou @TestTableName char(100) AS begin declare @ExecStr char(500) select @ExecStr = 'select * from ' + RTRIM(@TestTableName) exec(@ExecStr) end 就是先拼一个字符串, 然后再用exec运行之……
存储过程这么写: CREATE PROCEDURE dt_TestForYou @TestTableName char(100) AS begin declare @ExecStr char(500) select @ExecStr = 'select * from ' + RTRIM(@TestTableName) exec(@ExecStr) end 就是先拼一个字符串, 然后再用exec运行之……