1、从页面上获取的是字符创类型的日期
如:date = "2012-3-14"如下是SQL:
2、SQL
select t.a,t.b,count(*)
from 表名 t where
t.add_date >= to_timestamp(date 00:00:00.000000,'yyyy-mm-dd hh24:mi:ss.ff')
and t.add_date <= to_timestamp(date 23:59:59.999999,'yyyy-mm-dd hh24:mi:ss.ff')
group by t.a,t.b
上述sql经过Hibernate转换后为:
select t.a,t.b,count(*)
from 表名 t where
t.add_date >= to_timestamp(2012-03-14 00:00:00.000000,'yyyy-mm-dd hh24:mi:ss.ff')
and t.add_date <= to_timestamp(2012-03-14 23:59:59.999999,'yyyy-mm-dd hh24:mi:ss.ff')
group by t.a,t.b
然后报 “ Not all named parameters have been set” 错,
原因是:日期字符串需要加 ''
正确的sql为:
select t.a,t.b,count(*)
from 表名 t where
t.add_date >= to_timestamp('2012-03-14 00:00:00.000000','yyyy-mm-dd hh24:mi:ss.ff')
and t.add_date <= to_timestamp('2012-03-14 23:59:59.999999','yyyy-mm-dd hh24:mi:ss.ff')
group by t.a,t.b
分享到:
相关推荐
When ordering function parameters, put all input-only parameters before any output parameters. In particular, do not add new parameters to the end of the function just because they are new; place new...
For a process to access 3 GB of address space, the executable image must have been linked with the /LARGEADDRESSAWARE flag or modified using Imagecfg.exe. It should be pointed out that SQL Server was ...
-a 所有(all)。 -e 所有(every),比a更详细。 -f 取消保护。 -i 添加提示。 -p 强制执行。 -r 目录管理。 分屏显示的中途操作 空格<space> 继续打开下一屏; 回车<return> 继续打开下一行; b 另外开上...
- After driver uninstall, not all of the S7A-related registry entries were deleted. Now the registry will be completely cleaned from S7A registry entries after uninstall. - The Netlink module ...
ArrayIndexOutOfBoundException is thrown when we have to indicate that an array has been accessed with an illegal index. printStackTrace in jsp printStackTrace is a method of the Throwable class. By ...
expand and copy the driver named SSTOR.SY_ from Disk 6 to your hard disk. If your system has MicroChannel architecture, contact your vendor for an updated driver. 2. If you are upgrading ...
system that uses an LCD or composite display, you should set your system to black and white mode before running INSTALL or TCINST. You can do this from DOS with the following command line: mode ...
system that uses an LCD or composite display, you should set your system to black and white mode before running INSTALL or TCINST. You can do this from DOS with the following command line: mode ...
* the cursor was not painted if DoubleBuffered was set to true for the parent of the editor + WPTools Premium: Saves and loads \column * improved theming of TWPToolbar and TWPToolPanel + new event: ...
4.4 Set Gravity.........................................................66 4.5 Pretend Friction—Friction Simulation to Prevent Slipping Around........66 4.5.1 Script Breakdown...........................
ACPI_OPERAND_OBJECT has been manually optimized to be aligned and will not work if it is byte-packed. Example Code and Data Size: These are the sizes for the OS- independent acpica.lib produced by ...
However, at this point you have simply inflated compiled sources. If you tried to view AndroidManifest.xml. You'd be left viewing this. P4F0\fnversionCodeversionNameandroid*...
Returns a boolean indicating whether the named response header has already been set. contextDestroyed(ServletContextEvent) - Method in interface javax.servlet.ServletContextListener Notification ...
C THESE DEFAULT TO ZERO IF NOT SET. c DATIME(DATETM), RETURNS AN 80 CHARACTER STRING WITH CURRENT DATE AND TIME. CAN C BE A DUMMY ROUTINE IF SYSTEM PROGRAMMING IS TOO MUCH. C INPUTD(FILENAME), TAKES ...
the ability to see how many new mail messages they have, are not supported by POP at all. These capabilities are built into programs like Eudora or Microsoft Outlook, which remember things like the ...
When you finish this chapter, you’ll have a new script named "lookup" which queries in a much cleaner way. 23. SB Examples, Resymbolicating a Stripped ObjC Binary When LLDB comes up against a ...
FOR /D %variable IN (set) DO command [command-parameters] 如果集中包含通配符,则指定与目录名匹配,而不与文件 名匹配。 FOR /R [drive:]path] %variable IN (set) DO command [command- 检查以 [drive:]...
' Sets the time-out parameters for all read and write operations on a ' specified communications device. ' Private Declare Function SetCommTimeouts Lib "kernel32" _ (ByVal hFile As Long, ...