Home > database >  Lack of SQL expressions
Lack of SQL expressions

Time:09-27

August 31, 2017 afternoon 4:27:58 org. Apache. Catalina. Core. StandardWrapperValve invoke
Serious: Servlet service () for the Servlet [action] in context with the path [/FPGL] threw the exception [Request processing failed; nested exception is org. Springframework. JDBC. BadSqlGrammarException:
# # # Error querying the database. Cause: Java, SQL. SQLException: ORA - 00936: missing expression

# # # The error may exist in The file [D: \ qiming \. Metadata \. Plugins \ org eclipse WST) server. The core \ tmp0 \ wtpwebapps/FPGL/WEB - INF \ classes \ com \ faw_qm \ VRR \ dao \ impl \ common \ FPGL \ DifferentDao XML]
# # # The error may involve defaultParameterMap
# # # The error occurred while setting The parameters
# # # SQL: select * from (select t. *, to_char (time, "MM") | | 'month' as the month, the from t_fpgl_inputinfo t) order by the month
# # # Cause: Java. SQL. SQLException: ORA - 00936: missing expression

; Bad SQL grammar []; Nested exception is Java. SQL. SQLException: ORA - 00936: missing expression
] with root cause
Java. SQL. SQLException: ORA - 00936: missing expression

CodePudding user response:

The building Lord still express clearly, really don't understand the

CodePudding user response:

Select t. *, to_char (time, "MM") | | 'month' as the month, the from t_fpgl_inputinfo t
As the month behind many a comma

CodePudding user response:

I want to query for a period of a time period of data and the DATE type time display only after running in the background error expressions lack
reference 1st floor appetizing_fish1 response:
the building still express clearly, really don't understand the

CodePudding user response:

Your SQL statements may have a problem, the joining together the statement posted up to look at it
 SELECT * 
The FROM (SELECT t. *,
To_char (TIME, 'MM) AS the month
The FROM t_fpgl_inputinfo t
Tt)
The ORDER BY the MONTH

CodePudding user response:

I think the data of the time period and by month to display
 & lt; Select id="query" resultMap="DifferentResult & gt;" 

Select * from
(
Select t. *, to_char (time, "MM") | | 'month' as the month
The from t_fpgl_inputinfo t


And to_char (time, '- DD YYYY - MM) & amp; gt;=# {startTime}

And to_char (time, '- DD YYYY - MM) & amp; lt;=# {endTime}


) the order by the month

CodePudding user response:

This method should be no problem, another is used in the case that the
 select id="query" resultMap="ZRCJheadResult & gt;" 

Select * from
(
Select z. *, to_char (wl_date, "MM") | | 'month' as wl_month, wl_weight * nf_num as nf_tonnage, wl_weight * wf_num as wf_tonnage, wl_weight * nt_num as nt_tonnage, wl_weight * wt_num as wt_tonnage
, wl_weight * dd_num as dd_tonnage wl_weight * fj_num as fj_tonnage, round (nf_num/dd_num, 2) the as nf_rate, round (wf_num/fj_num, 2) the as wf_rate, round (nt_num/dd_num, 2) the as nt_rate, round (wt_num/fj_num, 2) the as wt_rate
, round ((wf_num + wt_num)/fj_num, 2) the as wtwf_rate, round ((nf_num + wf_num/dd_num), 2) the as nwf_rate
The from ZRCJ z

And to_char (wl_date, '- DD YYYY - MM) & amp; gt;=# {startTime}

And to_char (wl_date, '- DD YYYY - MM) & amp; lt;=# {endTime}


) order by wl_month

CodePudding user response:

reference 5 floor m0_38050761 reply:
I think the data of the time period and by month to display
 & lt; Select id="query" resultMap="DifferentResult & gt;" 

Select * from
(
Select t. *, to_char (time, "MM") | | 'month' as the month
The from t_fpgl_inputinfo t


And to_char (time, '- DD YYYY - MM) & amp; gt;=# {startTime}

And to_char (time, '- DD YYYY - MM) & amp; lt;=# {endTime}


) the order by the month


This statement is SQL Server? See for the first time, can also write like this? How looks a bit like h5

CodePudding user response:

refer to the original poster m0_38050761 response:
August 31, 2017 4:27:58 afternoon org. Apache. Catalina. Core. StandardWrapperValve invoke
Serious: Servlet service () for the Servlet [action] in context with the path [/FPGL] threw the exception [Request processing failed; nested exception is org. Springframework. JDBC. BadSqlGrammarException:
# # # Error querying the database. Cause: Java, SQL. SQLException: ORA - 00936: missing expression

nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related