我有一个Java应用程序,我用它从sql中的表中检索信息。
问题在于表的更改取决于正在使用它们的主应用程序;还有就是拥有所有的从活动表如table_all
这是很好的活动信息的视图,是我想要做的是搜索在表中特定数量是图的一部分声明查询的SQL问题
DECLARE @iss int, @act_tb char(1)
SET @iss = (select cust_nr from table_all where num = '123456789')
SET @act_tb = (select curr_table_active from pc_group where cust_nr = @iss)
select * from [email protected][email protected]_tb
等什么我现在要做的是更新pc_grp_ @ iss_ @ act_tb enter code here
中的字段格式为pc_grp_ < @iss_ _ < @act_tb>。
有什么办法,我可以做到这一点作为[email protected][email protected]_tb
被拿起一个表,而不是一个变量表名。 非常感谢
问题不是很清楚,你可以展示你的表模式,一些数据和预期的结果吧。 – Kaf