set i = 1 ;
while i <100
begin
set i = i + 1 ;
end
#2
sql server 没有for循环,for 改为 while循环,内部逻辑都可用if …else 正常使用。
#3
set i = 1;
while i<(select COUNT(*) from Test1);
begin
set i = i+1;
end
if (Test1.dconsigndate =='2016-06-18')
{
Select * from Test1 where Test1.dconsigndate >='2016-06-18';
}
else if(Test1.dconsigndate =='2016-06-19')
{
Select * from Test1 where Test1.dconsigndate >='2016-06-19';
}
哈哈 我这么写 语法全错 不知道该怎么改
#4
set i = 1;
while i<(select COUNT(*) from Test1);
begin
set i = i+1;
end
if (Test1.dconsigndate =='2016-06-18')
{
Select * from Test1 where Test1.dconsigndate >='2016-06-18';
}
else if(Test1.dconsigndate =='2016-06-19')
{
Select * from Test1 where Test1.dconsigndate >='2016-06-19';
}
sql server 没有for循环,for 改为 while循环,内部逻辑都可用if …else 正常使用。
set i = 1;
while i<(select COUNT(*) from Test1);
begin
set i = i+1;
end
if (Test1.dconsigndate =='2016-06-18')
{
Select * from Test1 where Test1.dconsigndate >='2016-06-18';
}
else if(Test1.dconsigndate =='2016-06-19')
{
Select * from Test1 where Test1.dconsigndate >='2016-06-19';
}
这么写不行啊
其实我也不想这么写的
declare @i int;
set @i = 1;
while @i <(select COUNT(*) from Test1);
begin
set @i = @i +1;
end
if (Test1.dconsigndate =='2016-06-18')
{
Select * from Test1 where Test1.dconsigndate ='2016-06-18';
}
else if(Test1.dconsigndate =='2016-06-19')
{
Select * from Test1 where Test1.dconsigndate ='2016-06-19';
}
set i = 1 ;
while i <100
begin
set i = i + 1 ;
end
#2
sql server 没有for循环,for 改为 while循环,内部逻辑都可用if …else 正常使用。
#3
for(表的总条数)
改用
set i = 1 ;
while i <100
begin
set i = i + 1 ;
end
set i = 1;
while i<(select COUNT(*) from Test1);
begin
set i = i+1;
end
if (Test1.dconsigndate =='2016-06-18')
{
Select * from Test1 where Test1.dconsigndate >='2016-06-18';
}
else if(Test1.dconsigndate =='2016-06-19')
{
Select * from Test1 where Test1.dconsigndate >='2016-06-19';
}
哈哈 我这么写 语法全错 不知道该怎么改
#4
sql server 没有for循环,for 改为 while循环,内部逻辑都可用if …else 正常使用。
set i = 1;
while i<(select COUNT(*) from Test1);
begin
set i = i+1;
end
if (Test1.dconsigndate =='2016-06-18')
{
Select * from Test1 where Test1.dconsigndate >='2016-06-18';
}
else if(Test1.dconsigndate =='2016-06-19')
{
Select * from Test1 where Test1.dconsigndate >='2016-06-19';
}
sql server 没有for循环,for 改为 while循环,内部逻辑都可用if …else 正常使用。
set i = 1;
while i<(select COUNT(*) from Test1);
begin
set i = i+1;
end
if (Test1.dconsigndate =='2016-06-18')
{
Select * from Test1 where Test1.dconsigndate >='2016-06-18';
}
else if(Test1.dconsigndate =='2016-06-19')
{
Select * from Test1 where Test1.dconsigndate >='2016-06-19';
}
sql server 没有for循环,for 改为 while循环,内部逻辑都可用if …else 正常使用。
set i = 1;
while i<(select COUNT(*) from Test1);
begin
set i = i+1;
end
if (Test1.dconsigndate =='2016-06-18')
{
Select * from Test1 where Test1.dconsigndate >='2016-06-18';
}
else if(Test1.dconsigndate =='2016-06-19')
{
Select * from Test1 where Test1.dconsigndate >='2016-06-19';
}
这么写不行啊
其实我也不想这么写的
declare @i int;
set @i = 1;
while @i <(select COUNT(*) from Test1);
begin
set @i = @i +1;
end
if (Test1.dconsigndate =='2016-06-18')
{
Select * from Test1 where Test1.dconsigndate ='2016-06-18';
}
else if(Test1.dconsigndate =='2016-06-19')
{
Select * from Test1 where Test1.dconsigndate ='2016-06-19';
}