iT邦幫忙

0

asp 或 sql(access) 去除空白鍵內容

大家好:
我的access字串欄位看似空白,但是用len的時候會有字串長度2,想請問用asp寫入或sql查詢時可以濾掉空白鍵之類的嗎?因為我用trim也不行..
想請問SELECT *FROM table where content is not null and len(content)>2;
謝謝

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

0
海綿寶寶
iT邦大神 1 級 ‧ 2020-10-17 16:39:47

試試看

SELECT * FROM tblname 
where content is not null 
  and len(trim(' '+CHAR(13)+CHAR(10) from content)) > 0
mayyola iT邦研究生 2 級 ‧ 2020-10-18 03:03:14 檢舉

您好:access會跳出來少運算元

我要發表回答

立即登入回答