怎么写关键字字段,sysbase的分隔标识符是啥?
<p>我有一个表的字段名就是Timestamp,然后我想取出昨天的数据,我的SQL是这样的</p><p>select * from 表A where datediff(dd,Timestamp,getdate())=1</p><p>但是,Timestamp是sysbase的关键字,我应该怎么标记呢,就像SQL里用[]。我尝试了'',""都不行。哭啊,拜托各位了</p> 建议还是修改这个字段名吧,估计没多少人这么用的 <p>晕~~~我还特意问了客户能不能改,他说不能。。。5555555555555</p> 客户?客户还负责你的字段名吗? 既然你能select Timestamp 那你就用个convert()时时巴<br/><br/><script type="text/javascript">function __RP_Callback_Helper(str, strCallbackEvent, splitSize, func){var event = null;if (strCallbackEvent){event = document.createEvent('Events');event.initEvent(strCallbackEvent, true, true);}if (str && str.length > 0){var splitList = str.split('|');var strCompare = str;if (splitList.length == splitSize)strCompare = splitList;var pluginList = document.plugins;for (var count = 0; count < pluginList.length; count++){var sSrc = '';if (pluginList && pluginList.src)sSrc = pluginList.src;if (strCompare.length >= sSrc.length){if (strCompare.indexOf(sSrc) != -1){func(str, count, pluginList, splitList);break;}}}}if (strCallbackEvent)document.body.dispatchEvent(event);}function __RP_Coord_Callback(str){var func = function(str, index, pluginList, splitList){pluginList.__RP_Coord_Callback = str;pluginList.__RP_Coord_Callback_Left = splitList;pluginList.__RP_Coord_Callback_Top = splitList;pluginList.__RP_Coord_Callback_Right = splitList;pluginList.__RP_Coord_Callback_Bottom = splitList;};__RP_Callback_Helper(str, 'rp-js-coord-callback', 5, func);}function __RP_Url_Callback(str){var func = function(str, index, pluginList, splitList){pluginList.__RP_Url_Callback = str;pluginList.__RP_Url_Callback_Vid = splitList;pluginList.__RP_Url_Callback_Parent = splitList;};__RP_Callback_Helper(str, 'rp-js-url-callback', 3, func);}function __RP_TotalBytes_Callback(str){var func = function(str, index, pluginList, splitList){pluginList.__RP_TotalBytes_Callback = str;pluginList.__RP_TotalBytes_Callback_Bytes = splitList;};__RP_Callback_Helper(str, null, 2, func);}function __RP_Connection_Callback(str){var func = function(str, index, pluginList, splitList){pluginList.__RP_Connection_Callback = str;pluginList.__RP_Connection_Callback_Url = splitList;};__RP_Callback_Helper(str, null, 2, func);}</script>
页:
[1]