2015年6月24日 星期三

oracle 找一筆找不到的資料 oracle find null record

假設資料表有一個欄位 10筆資料 數值為1~10
下查詢 WHERE 此欄位=11
就會回傳0列
但想要他回傳0列時顯示某字串
就先套一個max 再去套nvl 或decode之類的case功能


select nvl(max(column),'0') AS something from table<br>
where 不能找到資料的條件

2015年6月18日 星期四

WEB METHOD JSON MAX LENGTH

使用JSON.NET來轉換物件為JSON
STRING出來了但是WEBMETHOD丟出去時說太大

在WEB.CONFIG加入此設定值就可以提高上限了


<configuration>
  <system .web.extensions="">
&nbsp; &nbsp; <scripting>
&nbsp; &nbsp; &nbsp; <webservices>
&nbsp; &nbsp; &nbsp; &nbsp; <jsonserialization maxjsonlength="2147483644">
&nbsp; &nbsp; &nbsp; </jsonserialization></webservices>
&nbsp; &nbsp; </scripting>
&nbsp; </system>
</configuration>

TRY HIGHTLIGHT.JS


//程式碼
function hello_world(){
&nbsp;&nbsp;&nbsp; alert("HELLO")
}