- ©«¤l
- 19
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 262
- ÂI¦W
- 325
- §@·~¨t²Î
- WinXP
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2010-5-19
- ³Ì«áµn¿ý
- 2024-11-24
|
¥»©«³Ì«á¥Ñ mgame168 ©ó 2011-10-24 17:58 ½s¿è
¦^´_ 2# kimbal
·PÁ kimbal ª©¤j
isnull() ¸g¬dÃÒ«á, ¦bMS-SQL ¥i¥Î,
Access¤¤ªºIsNull()
¦bAccess¤¤¡AIsNullªº§@¥Î¶È¶È¬O§PÂ_¬O§_¬°ªÅÈ
¤£¹LAccessÁÙ¬O¦³¤ä´©MS-SQL IsNullªº¬Û¦ü«ü¥O½X¡A
¦bAccess¬O¥Î iif ´À¥N..
Select iif(IsNull( express ), value1, value2 ) From TableName
»yªk»¡©ú¡A§PÂ_express¬O§_¬°ªÅ¡AY¬OªÅªº¦^¶Çvalue1¡A¤Ï¤§«h¦^¶Çvalue2
LEFT JOIN ªº¼gªk¦p¦P±z¼gªº¤è¦¡
dbo_aa.names
names ¦n¹³è¦n¬OÃöÁä¦r, ¨S¿ùªº½T¬OÃöÁä¦r
¦ý¸ê®Æ®wªºÄæ¦ì¦WºÙ§ÚµLªk§ó§ï, ©Ò¥H¹ï©ó
«O¯d¦rªº½Ä¬ð
¸Ñ¨M¿ìªk´N¬O±Nnames§ï¦¨[names]´N¸Ñ¨M¤F
¥H¤Uªº»yªk§Ú¦³×§ï¹L
SQL = "Select dbo_pro.*, dbo_prok.name, dbo_aa.[names] "
SQL = SQL & "From (dbo_pro left outer join dbo_aa on dbo_pro.a01=dbo_aa.a01) "
SQL = SQL & "left join dbo_prok on dbo_pro.kano=dbo_prok.kano "
SQL = SQL & "Where dbo_pro.prno ='" & Sheet1.Range("K9") & "'"
SQL = SQL & " Order by dbo_pro.prno"
·PÁÂkimbalª©¤jªº«ü¾É
Input2.zip (40.9 KB)
|
|