我对sql查询还很陌生 我在存储过程中有一个with语句,之后有一个while循环 然后在while循环中,我选择了with语句来显示它。
但它说
无效的对象。
我的代码是
DECLARE @i INT
SET @i=0
BEGIN
WITH t1 AS (
SELECT * FROM Dams)
WHILE @i<3
BEGIN
Select * from t1
SET @i = @i+1
END
END
答案 0 :(得分:0)
您必须在公用表表达式之后编写选择查询:
DECLARE @i INT
SET @i=0
BEGIN
WHILE @i<3
BEGIN
WITH t1 AS (
SELECT * FROM Dams)
Select * from t1
SET @i = @i+1
END
END
答案 1 :(得分:0)
您不需要position = "low"
if marker.pose.position.z > 1 and position=="low":
os.system("cd ~/catkin_ws_artag/src/launch && roslaunch pr2_indiv_1.launch")
posicion = "high"
print "HIGH"
################################
if marker.pose.position.z < 1 and position=="high":
os.system("cd ~/catkin_ws_artag/src/launch && roslaunch pr2_indiv_0.launch")
posicion = "low"
print "LOW"
循环。
事实上,您可以简单地做到:
while