SQLÓï¾äЧÂÊÎÊÌâ - ÆäËûÊý¾Ý¿â¿ª·¢ / ÆäËûÊý¾Ý¿â
´ó¼Ò°ïæ¿´¿´Õâ2¸ösqlÓï¾äÄĸö²éѯµÄËٶȸü¿ìµã¡£Ð»Ð»°ïæ¡£±È½Ï׿±¡£ÔÚ×öÐÔÄܲâÊÔ¡£
select * from
±íA LEFT OUTER JOIN ±íB ON (±íA.id || ' ' =±íB.id) ,±íC , ±íD, ±íE
WhereÆäËûÌõ¼þ
select * from
±íA ,±íB ,±íC , ±íD, ±íE
Where ÆäËûÌõ¼þ and ±íA.id || ' ' =±íB.id
Èç¹û¸÷ÖÖÌõ¼þÊÇÒ»ÖµĻ°£¬ÄÚÁ¬½ÓÊÇ×î¿ìµÄ¡£¼´µÚ¶þÖÖ·½·¨
µÚ¶þÖÖÊÇËûÃÇÌṩҪ¸Ä½øµÄ·½Ê½£¬Êý¾ÝÌ«¶à¡£
Ҫд·ÖÎöÔÒò£¬¾ÍÊÇҪд³öΪʲô¸Ä½øÖ®ºóËٶȻá´ó·ù¶ÈÌá¸ß¡£
ÀíÂÛÉϽ²£¬Á¬½ÓÖÐÄÚÁ¬½ÓÊÇ×î¿ìµÄ£¬ÒòΪֻÓзûºÏÌõ¼þµÄ¼Ç¼²Å»áɸѡ³öÀ´
from
( "A"
LEFT OUTER JOIN "B" ON ( "A"."id" = "B"."id" ) )
LEFT OUTER JOIN "C" ON ( "A"."id" = "C"."id" ), "D"
WHERE
"A"."Äê·Ý" = ?
AND "A"."Ãû³Æ" = "D"."Ãû³Æ"
AND "A"."ºÅÂë1" = "D"."ºÅÂë1"
AND "A"."ºÅÂë2" = "D"."ºÅÂë2"
AND "A"."id" = "D"."id"
..............................................
from "A" INNER JOIN "D" ON ( "A"."Ãû³Æ" = "EDA"."Ãû³Æ"
AND "A"."ºÅÂë1" = &q
Ïà¹ØÎÊ´ð£º
ÏÖÔÚÓÐÁ½¸öÒì¹¹µÄsql serverÊý¾Ý¿â,ÎÒÏ뽫µÚÒ»¸ö±íÖеÄÊý¾Ýµ¼Èëµ½µÚ¶þ¸ö±íÖÐ,×Ô¼ºÖ¸¶¨µ¼ÈëÊý¾ÝµÄ×Ö¶Î,ÈçºÎµ¼ÈëÊý¾ÝÄØ,´ó¼ÒÌÖÂÛÒ»ÏÂ?
dts¹¤¾ß
µ¼Èëµ¼³ö¹¤¾ß.
DD
¹þ¹þ£¬¹À¼ÆÕâλÊǵØQIOU¶¼Êܲ»Á˵Ä
Ö±½ÓÐ ......
with adod_dict do
begin
close;
commandtext:='select bgqxcode,count(*) wjsl from wscl_wsda_file where wjnd=:tnd group by bgqxcode'; ......
PBÖпª·¢µÄ¡£
DateTime startTime=DateTime(em_1.Text)
DateTime endTime=DateTime(em_2.Text)
string sql
sql = dw_1.GetSQLSelect()+"Where (StartTime> '"+startTime+&q ......
СµÜ×î½üÓöµ½Ò»¸öÎÊÌ⣬ҪÇóµÃ³öÄĸö°à¼¶µÄ½Ìʦ´ýÓö×î¸ß£¬°Ñͬһ¸ö°à¼¶µÄ½Ìʦ´ýÓöºÏ¼ÆÆðÀ´
°à¼¶±í ½Ìʦ±í
°à¼¶ID & ......
SELECT A.barcode, A.number, B.goodsname
from pandian AS A INNER JOIN
baseinfo AS B ON A.barcode = B.barcode
ÏÖÔÚ£º
4961557110306 1 Elsan Bath chanmÔ¡ÑÎ(É ......