Oracle comma string Stitching gadget
Http://www.zui#dai#ma.com/share/1932670249667584.htm
When using Oracle for data query, it is often necessary to use the in statement, if the ID is exported in execl, do you want to write one, here is a small tool, you can quickly splicing in statements.
The code is as follows:
02 |
var srcSQL = document.getElementById( "srcSQL" ); |
03 |
var srcInner = srcSQL.value; |
08 |
var newSrc = srcInner.split( "\r\n" ); |
10 |
var patt = new RegExp(/.+/g); |
11 |
var newSrc = srcInner.match(patt); |
13 |
var len = newSrc.length; |
14 |
for ( var i=0;i<len;i++){ |
17 |
sqlBuf += "\‘" +temp+ "\‘" + "," ; |
20 |
sqlBuf += "\‘" +temp+ "\‘)" ; |
24 |
var showSQL = document.getElementById( "showSQL" ); |
25 |
showSQL.innerText = sqlBuf; |
01 |
< table border = "1" width = "350" height = "450" > |
Geneva |
< tr align = "center" > |
" |
; < td width = "45%" >< textarea id = "Srcsql" rows = "" " cols = ></ textarea ></ td > |
|
< /code>< button onclick = style = >< font color = "blue" size = "5" >< b > conversion </ b ></ button >< p > |
" |
; < td width = "45%" >< textarea id = "Showsql" rows = "" " cols = ></ textarea ></ td > |
In fact, HTML can be changed to an. hta suffix, which is an executable file, as follows:
Guess you like it.
Oracle comma string Stitching gadget