第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

問一下數(shù)據(jù)庫這段代碼的錯誤

問一下數(shù)據(jù)庫這段代碼的錯誤

漫之旅 2017-11-10 16:48:26
所有的日期字段都為字符串報錯為expected char got number從報錯分析來看是類型不一樣,也就是*100不是數(shù)字值,但是第二段代碼卻過了,這就很不理解了,如果真的類型不一樣第二段*100也會報錯才對下面的這兩處為什么會有沖突select case ? when sysdate < to_date(cih.begin_year || '-' || cih.begin_month || '-01', 'yyyy-MM-dd') ? then '0.0' ? when cih2.time2<sysdate? then '100'? when ??????? cih2.time2-to_date(cih.begin_year || '-' || cih.begin_month || '-01', 'yyyy-MM-dd')=0? then '0.0'????--這里? else (((to_date(cih.begin_year || '-' || cih.begin_month || '-01', 'yyyy-MM-dd')-sysdate)+1)/(cih2.time2-to_date(cih.begin_year || '-' || cih.begin_month || '-01', 'yyyy-MM-dd'))*100)??? --這里,報錯的地方這個100下面有下劃線end 項目總體進(jìn)度 ?from cbm_item_headers cih,(select a.*,(case ??????? when To_number(a.end_month, '99') < 12 ??????? then to_date(a.end_year || '-' || to_char(cih2.end_month2,'99') || '-01', 'yyyy-MM-dd') ??????? else to_date(to_char(cih2.end_year2,'9999') || '-' || '01' || '-01', 'yyyy-MM-dd') end) time2from cbm_item_headers a,(select item_code,to_number(end_year, '9999') + 1 end_year2,to_number(end_month, '99')+1 end_month2 from cbm_item_headers) cih2 where a.item_code=cih2.item_code) cih2where cih.item_code=cih2.item_code我去掉這兩處其中一處就可以運(yùn)行select(((to_date(cih.begin_year || '-' || cih.begin_month || '-01', 'yyyy-MM-dd')-sysdate)+1)/(cih2.time2-to_date(cih.begin_year || '-' || cih.begin_month || '-01', 'yyyy-MM-dd'))*100)????--去掉了case就可以運(yùn)行from cbm_item_headers cih,(select a.*,(case ??????? when To_number(a.end_month, '99') < 12 ??????? then to_date(a.end_year || '-' || to_char(cih2.end_month2,'99') || '-01', 'yyyy-MM-dd') ??????? else to_date(to_char(cih2.end_year2,'9999') || '-' || '01' || '-01', 'yyyy-MM-dd') end) time2from cbm_item_headers a,(select item_code,to_number(end_year, '9999') + 1 end_year2,to_number(end_month, '99')+1 end_month2 from cbm_item_headers) cih2 where a.item_code=cih2.item_code) cih2where cih.item_code=cih2.item_code----------------------------------------------------------select case ? when sysdate < to_date(cih.begin_year || '-' || cih.begin_month || '-01', 'yyyy-MM-dd') ? then '0.0' ? when cih2.time2<sysdate? then '100'? when ??????? cih2.time2-to_date(cih.begin_year || '-' || cih.begin_month || '-01', 'yyyy-MM-dd')=0? then '0.0'????????--去掉了else就可以運(yùn)行end 項目總體進(jìn)度 ?from cbm_item_headers cih,(select a.*,(case ??????? when To_number(a.end_month, '99') < 12 ??????? then to_date(a.end_year || '-' || to_char(cih2.end_month2,'99') || '-01', 'yyyy-MM-dd') ??????? else to_date(to_char(cih2.end_year2,'9999') || '-' || '01' || '-01', 'yyyy-MM-dd') end) time2from cbm_item_headers a,(select item_code,to_number(end_year, '9999') + 1 end_year2,to_number(end_month, '99')+1 end_month2 from cbm_item_headers) cih2 where a.item_code=cih2.item_code) cih2where cih.item_code=cih2.item_code
查看完整描述

1 回答

?
NULL12345

TA貢獻(xiàn)1條經(jīng)驗 獲得超0個贊

case when 前幾個結(jié)果都是字符串,else結(jié)果是數(shù)學(xué)

查看完整回答
反對 回復(fù) 2018-06-24
  • 1 回答
  • 0 關(guān)注
  • 1075 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號