确定错误的类型 [英] Identify the type of error
本文介绍了确定错误的类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
HI,
我试图在oracle中运行以下查询但它无法正常工作,
可以有人告诉我此查询中的错误是什么来自paranthesis。
I was trying to run the following query in oracle but it isn't working,
can anybody tell me what is the error in this query apart from paranthesis.
sql>SELECT TO_CHAR(promo_begin_date,dd/month&)
FROM promotions
WHERE promo_begin_date IN (TO_DATE(JUN 01 98;,TO_DATE(JUL 01 98));
谢谢。
Thanks.
推荐答案
有几个小问题。
首先,To_Char函数想要将format_mask作为一个字符串,我想知道你是否真的希望&符号成为日期的一部分。
其次,你在第二行中间有一个分号来终止查询。我还建议总是在这里使用format_mask来避免误解。
所以尝试:
There are several small problems.
Firstly, the To_Char function wants the format_mask as a string, and I wonder if you really want the ampersand to be a part of the date.
Secondly, you have a semicolon in the middle of the second row that terminates the query. I also recommend to always use a format_mask here to, to avoid misunderstandings.
So try:
SELECT TO_CHAR(promo_begin_date,'dd/month')
FROM promotions
WHERE promo_begin_date IN (TO_DATE(JUN 01 98,'MON DD YY'),TO_DATE(JUL 01 98,'MON DD YY'));
这篇关于确定错误的类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文