Joke Collection Website - Cold jokes - Sql string inserts comma and replaces it.
Sql string inserts comma and replaces it.
-ABCDEFJHIJK transform 123456789 123 and so on.
-Make a watch
Create? Table? T
(
Val. varchar( 1000)
)
-Insert data
Insert? Become? t? Value ("ABC")
Insert? Become? t? Value ("ABA")
Insert? Become? t? Value ('abcdefghijklmnopqrstuvwxyz')
-Method 1 (string length is less than 2048)
Choice? Val, things (
(
Choice? ,'+Char((Ascii(Upper(Substring(val,number, 1)))- 1 1)% 9+49)?
From where? Master.dbo.spt_values
Where is it? Type='P '? And then what? Number? Between? 1? And then what? Aaron (val)?
For what? Xml? Path ("")
, 1, 1,'')?
From where? t?
-Method two?
Create? Function? fn_change(@A? Varchar(8000))
Return? Varchar(8000)
be like
begin
Declare? @Rst? Varchar(8000)=“
Declare? @ me? int= 1
What time? @ i & lt=LEN(@A)
begin
Settings? @Rst=@Rst+','+Char((Ascii(Upper(Substring(@ A,@I, 1)))- 1 1)% 9+49)?
Settings? @i=@i+ 1
end
Return? Stuff(@Rst, 1, 1,'')
end
-Inquiry
Choice? *,dbo.fn_change(Val)? From where? T
- Previous article:Who are the Seven Sages of the Bamboo Grove?
- Next article:Everyone's actor.
- Related articles
- Five sentences about tourism English writing
- Weixin joke
- Classical Chinese text "The Lu people saw poles and entered the city"
- What should my partner do if he has many unhappy things?
- Everything is the best arrangement. Let’s talk about our car experience while driving Acura CDX!
- Sky Hunting box office broke 3 million Fan Bingbing to celebrate, but netizens shouted Jerry Lee: I really shouldn't use her! What do you think of this?
- What interesting math story books are recommended?
- Will you be laughed at for going out in high school uniforms in 1992?
- What does sad corn sparerib soup mean?
- What are Jason's advantages? What's his specialty?