Pro*C¶Ôinner joinµÄÖ§³ÖÇé¿ö
ÕûÀí×Ô£ºhttp://forums.oracle.com/forums/thread.jspa?threadID=664180&tstart=0
ÎÊ£ºIs it possible to use INNER JOIN's with Pro*C? I'm currently getting this error:
INNER JOIN t_diagnosis b ON a.sak_diag = b.sak_diag
....1
PCC-S-02201, Encountered the symbol "INNER" when expecting one of the following:
; , for, union, connect, group, having, intersect, minus,
order, start, where, with,
The query runs fine via SQL Developer. My version of Pro*C is Pro*C/C++: Release 10.2.0.3.0.
Thanks,
Matthew
´ð£º
Unfortunately the Pro*C precompiler does not understand "new"
syntax/keywords... this falls into the same category as using analytics
discussed here:
http://forums.oracle.com/forums/thread.jspa?threadID=664180&tstart=0
You would need to use dynamic sql as described in the programmer's guide to do this.
Support for all the ANSI 99 sql syntax (including joins) has been added
in 11g
w
ith
the new precompiler option common_parser. You can
precompile your proc program containig join sqls as follows:
proc common_parser=yes
proc_file.pc
For release 10.2 and earlier you would to workaround by using dynamic sqls as Mark suggested.
Ïà¹ØÎĵµ£º
CSocketÅÉÉúÓÚCAsyncSocket, ËùÓÐÊ©ÖîÓÚÉϵIJÙ×÷½ÔΪͬ²½²Ù×÷¡£±ÈÈçConnnect,ReceiveµÈ¡£
ͬ²½²Ù×÷µÄÓŵãÊǼòµ¥Ò×Ó㬵«È±µãÒ²ÏÔ¶øÒ×¼û£¬Ð§ÂʵÍÏ£¬ÒòΪÄã±ØÐëµÈµ½Ò»¸ö²Ù×÷Íê³ÉÖ®ºó²ÅÄܽøÐÐÏÂÒ»¸ö²Ù×÷¡£
Èç¹ûÄãºÜ¹ØÐÄЧÂÊ£¬¾ÍÓ¦¸ÃÓÅÏÈʹÓÃCAsyncSocket¡£·´Ö®¾ÍÓÃCSocket¡£
ÏÂÃ潫˵Ã÷ÈçºÎÓÃCSocket´´½¨¼òµ¥µÄ·þÎñÆ÷ºÍ¿Í» ......
´óѧµÄʱºòÑ¡ÐÞ¹ýÒ»¸öѧÆÚÈÕÓµ±Ê±ÈÕÓïÀÏʦ¶ÔÎÒÃÇ˵£º“¶ÔÓÚÖйúÈËÀ´½²£¬Ñ§Ï°Ó¢ÓïÒ»°ãÊÇ¿Þ׎øÈ¥£¬Ð¦×ųöÀ´£»Ñ§Ï°ÈÕÓïÔòÊÇЦ׎øÈ¥£¬¿Þ×ųöÀ´”¡£Òâ˼¾ÍÊÇ˵ѧϰӢÓïµÄʱºò£¬ÈëÃŵÄʱºò±È½ÏÀ§ÄÑ£¬µ«ÊÇÖ»Òª¼á³ÖѧÏÂÈ¥£¬×ª±äÁ˺ºÓïµÄ˼άϰ¹ßʱ£¬×î½ü¿ÉÒÔ°ÑÓ¢ÓïѧµÃºÜºÃ¡£¶øÈÕÓﲻͬ£¬Ò»·½ÃæÒòΪÆäÓ뺺ÓïµÄ½ôÃÜ¹Ø ......
Êý×Öת×Ö·û´®£º
ÓÃC++µÄstreanstream:
#include <sstream>
#Include <string>
string num2str(double i)
...{
stringstream ss;
ss<<i;
return ss.str();
......
1) ʲôÊÇÔ¤±àÒ룬ºÎʱÐèÒªÔ¤±àÒ룺×ÜÊÇʹÓò»¾³£¸Ä¶¯µÄ´óÐÍ´úÂëÌå¡£
³ÌÐòÓɶà¸öÄ£¿é×é³É£¬ËùÓÐÄ£¿é¶¼Ê¹ÓÃÒ»×é±ê×¼µÄ°üº¬ÎļþºÍÏàͬµÄ±àÒëÑ¡Ïî¡£ÔÚÕâÖÖÇé¿öÏ£¬¿ÉÒÔ½«ËùÓаüº¬ÎļþÔ¤±àÒëΪһ¸öÔ¤±àÒëÍ·¡£
2) char * const p;
¡¡¡¡char const * p
¡¡¡¡const char *p ......
һλIDΪultimusµÄ³ÌÐòÔ±¿ª·¢ÁËÒ»ÖÖÃûΪanicµÄÐÂÓïÑÔ£¬½üÈÕÒýÆðÒµ½ç¹Ø×¢¡£¸ù¾ÝGoogle CodeÉϸÃÏîÄ¿µÄ¼ò½é£¬¸ÃÓïÑÔµÄÕýʽÃû³ÆÊÇANI£¬anicÊÇÕâÖÖÓïÑԵIJο¼ÊµÏÖ¡£
ANIÊÇÒ»ÖÖʵÑéÐÔ¡¢¸ßÐÔÄÜ¡¢¾²Ì¬°²È«¡¢ÍêÈ«Òþº¬Ö§³Ö²¢ÐС¢ÃæÏò¶ÔÏóµÄͨÓÃÊý¾ÝÁ÷±à³ÌÓïÑÔ¡£
anicÓÃGNU¹¤¾ßÁ´Ð´³É£¬Òò´Ë¿ÉÒÆÖ²ÐԺܺ㬿ÉÒÔÔËÐÐÓÚËùÓÐÖ÷Á÷²Ù×÷ϵ ......