随机分组条件语句for (1..1000){open AOUT,">a$_.txt" || die "Can't ope
来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/05/21 23:04:35
随机分组条件语句
for (1..1000){
open AOUT,">a$_.txt" || die "Can't open the file:";
open BOUT,">b$_.txt" || die "Can't open the file:";
open IN,"
for (1..1000){
open AOUT,">a$_.txt" || die "Can't open the file:";
open BOUT,">b$_.txt" || die "Can't open the file:";
open IN,"
新建一个找到第N个字串起始位置的函数charindexN
create function dbo.charindexN (@indexStr varchar(100)='',--要查找的子串
@str varchar(2000)='',--字符串
@n int=null) --从第n个子串开始查
returns int
begin
declare @tmp varchar(2000) --
declare @m int
declare @i int
set @tmp=@str
set @i=1
set @m=0
while charindex(@indexStr,@tmp)>0 and @i<=@n
begin
set @m=@m+charindex(@indexStr,@tmp)
set @tmp=substring(@tmp,@m+len(@indexStr),len(@tmp))
set @i=@i+1
end
if @i-1<>@n set @m=0
return @m
end
select substring(a.xsgg,1,dbo.charindexN('*',a.xsgg,1)-1) xsgg,count(*) num from T1 a
group by substring(a.xsgg,1,dbo.charindexN('*',a.xsgg,1)-1)
order by count(*) desc;
select substring(a.xsgg,1,dbo.charindexN('*',a.xsgg,2)-1) xsgg,count(a.xsgg) num from T1 a
group by substring(a.xsgg,1,dbo.charindexN('*',a.xsgg,2)-1)
order by count(a.xsgg) desc;
create table T1
( xsgg nvarchar(25),num int)
insert into T1(xsgg,num)
select '20*2000*11500',1 union
select '0.25*1500*2000',1 union
select '20*1500*9000',1 union
select '20*2000*8000',1
你先设置我最佳答案后,我百度Hii教你.
create function dbo.charindexN (@indexStr varchar(100)='',--要查找的子串
@str varchar(2000)='',--字符串
@n int=null) --从第n个子串开始查
returns int
begin
declare @tmp varchar(2000) --
declare @m int
declare @i int
set @tmp=@str
set @i=1
set @m=0
while charindex(@indexStr,@tmp)>0 and @i<=@n
begin
set @m=@m+charindex(@indexStr,@tmp)
set @tmp=substring(@tmp,@m+len(@indexStr),len(@tmp))
set @i=@i+1
end
if @i-1<>@n set @m=0
return @m
end
select substring(a.xsgg,1,dbo.charindexN('*',a.xsgg,1)-1) xsgg,count(*) num from T1 a
group by substring(a.xsgg,1,dbo.charindexN('*',a.xsgg,1)-1)
order by count(*) desc;
select substring(a.xsgg,1,dbo.charindexN('*',a.xsgg,2)-1) xsgg,count(a.xsgg) num from T1 a
group by substring(a.xsgg,1,dbo.charindexN('*',a.xsgg,2)-1)
order by count(a.xsgg) desc;
create table T1
( xsgg nvarchar(25),num int)
insert into T1(xsgg,num)
select '20*2000*11500',1 union
select '0.25*1500*2000',1 union
select '20*1500*9000',1 union
select '20*2000*8000',1
你先设置我最佳答案后,我百度Hii教你.
随机分组条件语句for (1..1000){open AOUT,">a$_.txt" || die "Can't ope
Look!The present is very nice.I can't wait__.A.open B.to ope
i dont know.this window just _ open.a.can't b.won't c.isn't
I can’t find the key _ the lock.How can we open the door A.o
The factory has been____for two years A open B to open C ope
all shops ___at 9 in the morning A are open B open C are ope
英语翻译Can I ask you a favor?Can you make a txt for me just onc
Sorry,I can’t open the door,for I the key to it.A.lost B.los
最好说明理由1.I can't wait ______ the present box.A.open B.to open
Sorry,my mum isn't at home.Can I take a _(消息) for you?
Open "d:\temp\outf.txt" For Output As #1
vb中Open MYFILE.TXT For Input As #1 Open "D:\Myfile.dat" For