SELECt
VIPCARD.FFreezeStatus AS FREEZESTATUS,
VIPCARD.FCardStatus AS CARDSTATUS,
VIPCARD.FMasterFlag AS MASTERFLAG,
VIPCARD.FVipCardNumber AS VIPCARDNUMBER,
VIPCARD.FPanelNumber AS PANELNUMBER,
PARENTCARDNUMBER.FVipCardNumber AS PARENTCARDNUMBER.VIPCARDNUMBER,
VIPNUMBER.FNumber AS VIPNUMBER.NUMBER,
VIPNUMBER.FName_l2 AS VIPNUMBER.NAME,
CARDTYPE.FName_l2 AS CARDTYPE.NAME,
VIPCARD.FCardKind AS CARDKIND,
CARDCATEGORY.FName_l2 AS CARDCATEGORY.NAME,
CARDGRADE.FName_l2 AS CARDGRADE.NAME,
VIPCARD.FParValue AS PARVALUE,
VIPCARD.FCostFee AS COSTFEE,
VIPCARD.FIsSecurity AS ISSECURITY,
VIPCARD.FIsEffectCtrl AS ISEFFECTCTRL,
VIPCARD.FEffectRange AS EFFECTRANGE,
VIPCARD.FEffectDate AS EFFECTDATE,
VIPCARD.FInValidateDate AS INVALIDATEDATE,
VIPCARD.FCurrentBonus AS CURRENTBONUS,
VIPCARD.FCumulateBonus AS CUMULATEBONUS,
VIPCARD.FCurrentValue AS CURRENTVALUE,
VIPCARD.FCumulateValue AS CUMULATEVALUE,
VIPCARD.FReturnProfitAmount AS RETURNPROFITAMOUNT,
VIPCARD.FCumulateProfit AS CUMULATEPROFIT,
VIPCARD.FLastReturnDate AS LASTRETURNDATE,
VIPCARD.FFirstConsumeDate AS FIRSTCONSUMEDATE,
VIPCARD.FLastConsumeDate AS LASTCONSUMEDATE,
VIPCARD.FConsumeCount AS CONSUMECOUNT,
VIPCARD.FCumulateConsumeAmout AS CUMULATECONSUMEAMOUT,
VIPCARD.FTeamCustomer AS TEAMCUSTOMER,
VIPCARD.FRemark AS REMARK,
ISSUEORG.FName_l2 AS ISSUEORG.NAME,
BIZMAN.FName_l2 AS BIZMAN.NAME,
VIPCARD.FID AS ID,
ISSUEBY.FName_l2 AS ISSUEBY.NAME,
VIPCARD.FIssueDate AS ISSUEDATE,
VIPCARD.FCheckCode AS CHECKCODE,
VIPCARD.FConsumWay AS CONSUMWAY,
VIPCARD.FIsCreditCard AS ISCREDITCARD,
VIPCARD.FCheckWay AS CHECKWAY,
VIPCARD.FCurrentCount AS CURRENTCOUNT,
SONCARDCATE.FName_l2 AS SONCARDCATE.NAME,
SONCARDCATE.FNumber AS SONCARDCATE.NUMBER,
VIPCARD.FValidityUnit AS VALIDITYUNIT
FROM orcl0320.T_RT_VipCard AS VIPCARD
LEFT OUTER JOIN orcl0320.T_BD_Person AS BIZMAN
ON VIPCARD.FBizManID = BIZMAN.FID
LEFT OUTER JOIN orcl0320.T_RT_CardCategory AS CARDCATEGORY
ON VIPCARD.FCardCategoryID = CARDCATEGORY.FID
LEFT OUTER JOIN orcl0320.T_RT_VIPBaseData AS VIPNUMBER
ON VIPCARD.FVipNumber = VIPNUMBER.FID
LEFT OUTER JOIN orcl0320.T_RT_VipCard AS PARENTCARDNUMBER
ON VIPCARD.FParentCardNumberID = PARENTCARDNUMBER.FID
LEFT OUTER JOIN orcl0320.T_ORG_Sale AS ISSUEORG
ON VIPCARD.FIssueOrgID = ISSUEORG.FID
LEFT OUTER JOIN orcl0320.T_RT_CardType AS CARDTYPE
ON VIPCARD.FCardTypeID = CARDTYPE.FID
LEFT OUTER JOIN orcl0320.T_RT_CardGrade AS CARDGRADE
ON VIPCARD.FCardGradeID = CARDGRADE.FID
LEFT OUTER JOIN orcl0320.T_PM_User AS ISSUEBY
ON VIPCARD.FIssueByID = ISSUEBY.FID
LEFT OUTER JOIN orcl0320.T_RT_CardCategory AS SONCARDCATE
ON VIPCARD.FSonCardCategoryId = SONCARDCATE.FID
在php运行这条SQL语句总是提示Warning: oci_execute() [function.oci-execute]: ORA-00923: 未找到要求的 FROM
关键字 实在找不到原因了请大神指教
ORA-00923: 未找到要求的 FROM
答案:3 悬赏:10 手机版
解决时间 2021-04-11 07:56
- 提问者网友:焚苦与心
- 2021-04-11 02:48
最佳答案
- 五星知识达人网友:底特律间谍
- 2021-04-11 04:08
估计是SQL语句字符太多 导致你用某个字符串类型变量存放的时候 被自动截取了一部分sql语句 导致sql语句不完整(调试的时候在你执行SQL语句的那行加个断点 看看SQL语句是否完整)
那个最快回答完全是SB
那个最快回答完全是SB
全部回答
- 1楼网友:走死在岁月里
- 2021-04-11 05:33
size,date都是oracle关键字,不能出现在sql的as后面。
写成 size1,date1 会解决“未找到要求的 from 关键字”问题。
另外, filecontenttype = 'folders'filepath = ''出现的地方也不对,不应该在select子句中,而是在where后。
修改成:
select folderguid as fileguid,
foldername as name,
null as size1,
creatdate as date1,
'' as username,
convert(nvarchar, belongtype) as type
from misc_netharddiskfolder
where parentfolderguid = '46a73c5e-51e1-4056-bedc-6039a26478e5' and
filecontenttype = 'folders' and filepath = ''
union all
select fileguid as fileguid,
filename as name,
filelength as size2,
uploaddate as date2,
uploaddisplayname as username,
filecontenttype as filecontenttype,
attachtype as type,
filepath as filepath
from misc_netharddiskfiles
where folderguid = '46a73c5e-51e1-4056-bedc-6039a26478e5'
可以保证至少没有语法错误。
- 2楼网友:你哪知我潦倒为你
- 2021-04-11 05:12
少了一个逗号
应该是:
SELECt inst_id, dbid, NAME, TO_CHAr(created, 'yyyy-mm-dd hh24:mi:ss') created, log_mode,TO_CHAr(version_time, 'yyyy-mm-dd hh24:mi:ss') version_time, open_mode FROM gv$database;
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯