Run Code
|
Code Wall
|
Users
|
Misc
|
Feedback
|
About
|
Login
|
Theme
|
Privacy
Генерация чисел в диапазоне в MS SQL
set nocount on; use rextester; if object_id('dbo.n','IF') is not null drop function dbo.n; go create function dbo.n(@ bigint,@f bigint)returns table as return with a as(select 0 c union all select 0), b as(select 0 c from a,a t), c as(select 0 c from b,b t), d as(select 0 c from c,c t), e as(select 0 c from d,d t), f as(select 0 c from e,e t), v as(select top(@f-@+1)0 c from f) select row_number()over(order by(select 0))+@-1 n from v; go select '050'+replace(str(min(n),7),' ','0'), '050'+replace(str(max(n),7),' ','0'), count(*) from dbo.n(0,9999999);
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
abhishek
Extracting Id No
QUAN LY MAYBAY
replace string
Audit Example
Loading json file into sql server
program2
http://connect.bein.net/ar/live-ar/
TUAN 6 QUANLYDETAI
First Query
Please log in to post a comment.