¡¡ |
16°. ½ÄÀÇ ÀÛ¼º (4) – ¿©·¯ °¡Áö ½ÄÀÇ ¿¹Á¦
Microsoft Access¿¡¼´Â °è»ê ÄÁÆ®·Ñ, Äõ¸®, ÇÊÅÍ ±âÁØ, ±âº»°ª, À¯È¿¼º °Ë»ç ±ÔÄ¢, ¸ÅÅ©·Î ±âÁØ ÀÛ¼º µî ¸¹Àº
¿¬»ê¿¡ ½ÄÀ» »ç¿ëÇÕ´Ï´Ù. ¸¸µé·Á´Â ½Ä°ú ºñ½ÁÇÑ ¿¹Á¦¸¦ ãÀº ´ÙÀ½ ¿øÇÏ´Â ´ë·Î ¼öÁ¤ÇÏ¸é ½±°Ô ½ÄÀ» ¸¸µé ¼ö ÀÖ½À´Ï´Ù.
Æû, º¸°í¼, µ¥ÀÌÅÍ ¾×¼¼½º ÆäÀÌÁö¿¡¼ »ç¿ëµÇ´Â ½Ä ¿¹Á¦
Äõ¸®¿Í ÇÊÅÍ¿¡¼ ÀÚ·áÃßÃâÀ» À§ÇØ »ç¿ëÇÏ´Â ½Ä ¿¹Á¦
°è»ê Çʵ忡¼ »ç¿ëÇÏ´Â ½Ä ¿¹Á¦
¾÷µ¥ÀÌÆ® Äõ¸®ÀÇ ½Ä ¿¹Á¦
SQL ¹®¿¡¼ »ç¿ëÇÏ´Â ½Ä ¿¹Á¦
±âº»°ª ½Ä ¿¹Á¦
¸ÅÅ©·Î Á¶°Ç½Ä ¿¹Á¦
Æû, º¸°í¼, µ¥ÀÌÅÍ ¾×¼¼½º ÆäÀÌÁö¿¡¼ »ç¿ëµÇ´Â ½Ä ¿¹Á¦
³¯Â¥ Á¶ÀÛ ¹× °è»ê ¿¹Á¦
´ÙÀ½ Ç¥´Â Æû, º¸°í¼, µ¥ÀÌÅÍ ¾×¼¼½º ÆäÀÌÁö¿¡¼ °è»ê ÄÁÆ®·Ñ¿¡ »ç¿ëÇÒ ¼ö ÀÖ´Â ½ÄÀÇ ¿¹Á¦ÀÔ´Ï´Ù.
½Ä |
¼³ ¸í |
=Date() |
Date ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© yyyy-mm-dd¿Í °°Àº Çü½ÄÀ¸·Î ÇöÀç
³¯Â¥¸¦ Ç¥½Ã |
=Format(Now(), "ww") |
Format ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© ÇöÀç ³¯Â¥°¡ ±× ÇØÀÇ ¸î ¹ø° ÁÖ¿¡
ÇØ´çÇÏ´ÂÁö Ç¥½Ã |
=DatePart("yyyy", [OrderDate]) |
DatePart ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© OrderDate ÇÊµå °ªÀÇ ¿¬µµ¸¦
³× ÀÚ¸® ¼ýÀڷΠǥ½Ã |
=DateAdd("y", -10, [PromisedDate]) |
DateAdd ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© PromisedDate ÇÊµå °ªÀÇ
10ÀÏ Àü ³¯Â¥¸¦ Ç¥½Ã |
=DateDiff("d", [OrderDate], [ShippedDate]) |
DateDiff ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© OrderDate¿Í
ShippedDate ÇÊµå °ªÀÇ Â÷À̸¦ Ç¥½Ã |
ÅؽºÆ® °ª Á¶ÀÛ ¿¹Á¦
´ÙÀ½ Ç¥´Â Æû, º¸°í¼, µ¥ÀÌÅÍ ¾×¼¼½º ÆäÀÌÁö¿¡¼ °è»ê ÄÁÆ®·Ñ¿¡ »ç¿ëÇÒ ¼ö ÀÖ´Â ½ÄÀÇ ¿¹Á¦ÀÔ´Ï´Ù.
½Ä |
¼³ ¸í |
="N/A" |
N/A ¶ó°í Ç¥½Ã |
=[FirstName]&" "&[LastName] |
FirstName°ú LastName ÇÊµå °ªÀ» °ø¹éÀ¸·Î ±¸ºÐÇÏ¿© Ç¥½Ã |
=Left([ProductName], 1) |
Left ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© ProductName ÇÊµå °ªÀÇ Ã¹ ±ÛÀÚ¸¦
Ç¥½Ã |
=Right([AssetCode], 2) |
Right ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© AssetCode ÇÊµå °ªÀÇ ¸¶Áö¸· µÎ
±ÛÀÚ¸¦ Ç¥½Ã |
=Trim([Address]) |
Trim ÇÔ¼ö·Î Address ÇÊµå °ª¿¡ ¾ÕµÚ °ø¹éÀÌ ÀÖÀ¸¸é °ø¹éÀ»
¾ø¾Ö°í Ç¥½Ã |
=IIf(IsNull([Region]),[City]&" "& [PostalCode],[City]&"
"&[Region]&" "& [PostalCode]) |
IIf ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© RegionÀÌ NullÀ̸é
City ¹× PostalCode ÇÊµå °ªÀ» Ç¥½ÃÇÏ°í, NullÀÌ ¾Æ´Ï¸é City, Region, PostalCode ÇÊµå °ªÀ»
°ø¹éÀ¸·Î ±¸ºÐÇÏ¿© Ç¥½Ã |
Âü°í]
• °è»ê ÄÁÆ®·ÑÀÇ ÄÁÆ®·Ñ ¿øº»/Control Source ¼Ó¼ºÀ» »ç¿ëÇÒ ¶§´Â ½Ä ¾Õ¿¡ = ¿¬»êÀÚ°¡ »ç¿ëµË´Ï´Ù.
µ¥ÀÌÅÍ ¾×¼¼½º ÆäÀÌÁö¿¡¼´Â = ¿¬»êÀÚ¸¦ »ý·«ÇÏ°í ´ë½Å ´ÙÀ½°ú °°ÀÌ º°ÄªÀ» »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
FullName: [FirstName] & "
" & [LastName]
• ÆûÀ̳ª º¸°í¼¿¡¼ °è»ê ÄÁÆ®·ÑÀÇ À̸§/Name ¼Ó¼ºÀ» ¼³Á¤Çϰųª µ¥ÀÌÅÍ ¾×¼¼½º ÆäÀÌÁö¿¡¼ °è»ê ÄÁÆ®·ÑÀÇ
ID ¼Ó¼ºÀ» ¼³Á¤ÇÒ ¶§´Â °íÀ¯ÇÑ À̸§À» »ç¿ëÇØ¾ß ÇÕ´Ï´Ù. ½Ä¿¡¼ »ç¿ëÇß´ø ÄÁÆ®·Ñ À̸§À̳ª ID´Â »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.
• ÆûÀ̳ª º¸°í¼ÀÇ ½Ä¿¡¼ ¿øº»À¸·Î »ç¿ëÇÏ´Â ·¹ÄÚµå ¿øº»¿¡ ÀÖ´Â ÄÁÆ®·Ñ À̸§À̳ª Çʵå À̸§À» »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ±×·¯³ª µ¥ÀÌÅÍ
¾×¼¼½º ÆäÀÌÁöÀÇ ½Ä¿¡¼´Â ÆäÀÌÁöÀÇ µ¥ÀÌÅÍ Á¤ÀÇ¿¡ ÀÖ´Â Çʵå À̸§¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
»ê¼ú ¿¬»ê Á¶ÀÛ ¿¹Á¦
´ÙÀ½ Ç¥´Â Æû, º¸°í¼, µ¥ÀÌÅÍ ¾×¼¼½º ÆäÀÌÁö¿¡¼ °è»ê ÄÁÆ®·Ñ¿¡ »ç¿ëÇÒ ¼ö ÀÖ´Â ½ÄÀÇ ¿¹Á¦ÀÔ´Ï´Ù.
½Ä |
¼³ ¸í |
=[Subtotal] + [Freight] |
Subtotal°ú Freight ÇÊµå °ªÀÇ Çհ踦 Ç¥½Ã |
=[RequiredDate] - [ShippedDate] |
RequiredDate¿Í ShippedDate ÇÊµå °ªÀÇ Â÷À̸¦ Ç¥½Ã |
=[Price] * 1.06 |
Price ÇÊµå °ª¿¡ 1.06À» °öÇÑ °ªÀ» Ç¥½Ã |
=[Quantity] * [Price] |
Quantity¿Í Price Çʵ带 °öÇÑ °ªÀ» Ç¥½Ã |
=[EmployeeTotal] / [CountryTotal] |
EmployeeTotalÀ» CountryTotal Çʵå·Î ³ª´« °ª Ç¥½Ã |
¡¡
Âü°í] ½Ä¿¡¼ »ê¼ú ¿¬»êÀÚ(+, -, *, /)¸¦ »ç¿ëÇÏ´Â
°æ¿ì, ½Ä¿¡ Null °ªÀ» °®´Â ÄÁÆ®·ÑÀÌ Çϳª¶óµµ ÀÖÀ¸¸é Àüü ½ÄÀÇ °á°ú´Â NullÀÌ µË´Ï´Ù. ÆûÀ̳ª
º¸°í¼ÀÇ ½Ä¿¡¼ »ç¿ëÇÑ ÄÁÆ®·ÑÀÇ ·¹Äڵ忡 Null °ªÀÌ ÀÖÀ¸¸é ´ÙÀ½°ú °°ÀÌ Nz ÇÔ¼ö¸¦ »ç¿ëÇÏ¿©
Null °ªÀ» 0À¸·Î º¯È¯ÇÒ ¼ö ÀÖ½À´Ï´Ù.
=Msodsc.Nz([Subtotal]) + Msodsc.Nz([Freight])
|
IIF Á¶°Ç½Ä ¿¹Á¦
IIF(Inline IF) Á¶°Ç½Ä ¿¹Á¦ÀÔ´Ï´Ù. ¡®InLine IF¡¯ ÇÔ¼ö(IIF)´Â ¶æ ±×´ë·Î Á¶°Ç¹®À» ÇÑÁÙ·Î ¾²°íÀÚ ÇÒ ¶§
»ç¿ëÇÏ´Â ÇÔ¼öÀÔ´Ï´Ù. ¸¹ÀÌ »ç¿ëÇϹǷΠ²À »ç¿ë¹ýÀ» ÀÍÈ÷½Ãµµ·Ï ÇϽʽÿÀ.
Âü°í] Iif ÇÔ¼ö ±â´É
½ÄÀ» Æò°¡ÇÑ °á°ú¿¡ µû¶ó µÎ °³ÀÇ °ª Áß¿¡¼ Çϳª¸¦ ¹ÝȯÇÕ´Ï´Ù.
±¸¹®
IIf(expr, TruePart, FalsePart)
IIf(Ç¥Çö½Ä, Ç¥Çö½ÄÀÌ ÂüÀÏ ¶§ °ª, Ç¥Çö½ÄÀÌ °ÅÁþÀÏ ¶§ °ª)
±¸¼º¿ä¼Ò |
¼³ ¸í |
expr |
ÇʼöÀûÀÎ ¿ä¼Ò. Æò°¡ÇÏ°íÀÚ ÇÏ´Â ½Ä |
TruePart |
ÇʼöÀûÀÎ ¿ä¼Ò. exprÀÌ TrueÀÎ °æ¿ì ¹ÝȯÇÏ´Â °ªÀ̳ª ½ÄÀÔ´Ï´Ù. |
FalsePart |
ÇʼöÀûÀÎ ¿ä¼Ò. exprÀÌ FalseÀÎ °æ¿ì ¹ÝȯÇÏ´Â °ªÀ̳ª ½ÄÀÔ´Ï´Ù. |
ÁÖÀÇ]
VBA¿¡ ´ëÇØ ¸ð¸£´Â Ãʺ¸ÀÚ¿¡°Ô´Â Á¶±Ý ¾î·Á¿î ¾ê±âÁö¸¸ iif()ÇÔ¼ö´Â if~else~end if ±¸¹®°ú´Â Á¶±Ý
´Ù¸¨´Ï´Ù.
If ~ Else ~ End If ±¸¹®¿¡¼´Â ÀÏ´Ü Âü ¶Ç´Â °ÅÁþ °ª Áß ÇØ´çµÇ´Â ºÎºÐ¸¸À» È®ÀÎÇÕ´Ï´Ù. µû¶ó¼ Á¶°Ç¹®ÀÌ
ÂüÀ̸é Âü°ª¿¡ ÇØ´çµÇ´Â ºÎºÐ¸¸ Æò°¡ÇϹǷΠ°ÅÁþ°ª¿¡ ÇØ´çµÇ´Â ¹®Àå¿¡ ¿À·ù°¡ À־ ¿À·ù¸¦ ¹ß»ýÇÏÁö ¾Ê°í Áö³ª°©´Ï´Ù.
±×·¯³ª Iif() ÇÔ¼ö´Â expr¸¦ ºÐ¼®ÇÏ¿© truepart³ª falsepartÁß Çϳª¸¦ ¹ÝȯÇÏ´Â °ÍÀº IF ±¸¹®°ú
µ¿ÀÏÇÏÁö¸¸ °ªÀ» ¹ÝȯÇÒ ¶§ truepart¿Í falsepart µÎ ºÎºÐÀÇ °ª/½ÄÀÌ ¸ðµÎ ¿Ã¹Ù¸¥°¡ È®ÀÎÀ» ÇÏ°í ¹ÝȯÇÕ´Ï´Ù.
µû¶ó¼ ¿¹»óÄ¡ ¾ÊÀº
»óȲÀÌ ³ª¿Ã ¼ö ÀÖÀ¸¹Ç·Î ÁÖÀÇÇØ¾ß ÇÕ´Ï´Ù.
¿¹¸¦ µé¸é, iif() ÇÔ¼ö¿¡¼ exprÀÌ True·Î Æò°¡µÇ¾î TruePartºÎºÐÀÇ °ªÀ» ¹ÝȯÇÒ ¶§ FalsePart
ºÎºÐµµ °°ÀÌ ºÐ¼®À» Çϱ⠶§¹®¿¡ FalsePartÀÇ °è»ê °á°ú°¡ ¿Ã¹Ù¸£±â ¸øÇϸé TruePart ºÎºÐ¿¡ ¹®Á¦°¡ ¾ø´õ¶óµµ ¿À·ù°¡
¹ß»ýÇÕ´Ï´Ù. ÀÌ °æ¿ì ÂüÀÏ ¶§ Âü°ªÀ» µ¹·ÁÁÖ´Â »óȲ¿¡¼ ¹ß»ýÇß´Ù´Â »ý°¢¿¡ »ç·ÎÀâÈ÷¸é ¿À·ùÀÇ ÀÌÀ¯¸¦ ¸ð¸£°í Çì¸á ¼ö ÀÖ´Â ÀÏÀÌ
¹ú¾îÁý´Ï´Ù.
|
´ÙÀ½ Ç¥´Â Æû, º¸°í¼, µ¥ÀÌÅÍ ¾×¼¼½º ÆäÀÌÁö¿¡¼ °è»ê ÄÁÆ®·Ñ¿¡ »ç¿ëÇÒ ¼ö ÀÖ´Â ½ÄÀÇ ¿¹Á¦ÀÔ´Ï´Ù.
=IIf([Confirmed] = "Yes", "°áÀç", "¹Ì°á") |
IIf ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© Confirmed ÇÊµå °ªÀÌ "Yes"À̸é
"°áÀç" ¸Þ½ÃÁö¸¦ Ç¥½ÃÇÏ°í, ¾Æ´Ï¸é "¹Ì°á" ¸Þ½ÃÁö¸¦ Ç¥½ÃÇÕ´Ï´Ù. |
=IIf(IsNull([Country])," ", [Country]) |
Country ÇÊµå °ªÀÌ NullÀÌ¸é ºó ¹®ÀÚ¿À» Ç¥½ÃÇÏ°í, NullÀÌ ¾Æ´Ï¸é
Country ÇÊµå °ªÀ» Ç¥½ÃÇÕ´Ï´Ù. |
=IIf(IsNull([¿ä±¸ÀÏ] - [¼±ÀûÀÏ]), "³¯Â¥È®ÀÎ", [¿ä±¸ÀÏ] - [¼±ÀûÀÏ]) |
[¿ä±¸ÀÏ]¿¡¼ [¼±ÀûÀÏ]¸¦ »« °á°ú°¡ NullÀ̸é " ³¯Â¥È®ÀÎ"À̶ó´Â ¸Þ½ÃÁö¸¦
Ç¥½ÃÇÏ°í, NullÀÌ ¾Æ´Ï¸é [¿ä±¸ÀÏ] °ú [¼±ÀûÀÏ] ÇÊµå °ªÀÇ Â÷À̸¦ Ç¥½ÃÇÕ´Ï´Ù. |
Áý°è ÇÔ¼ö ¹× µµ¸ÞÀÎ Áý°è ÇÔ¼öÀÇ ¿¹Á¦
Âü°í] µµ¸ÞÀÎ Áý°èÇÔ¼ö¸¦ »ç¿ëÇÒ ¼ö ¾ø´Â °æ¿ì
1) µ¥ÀÌÅÍ ¾×¼¼½º ÆäÀÌÁö¿¡¼ Áý°è ÇÔ¼ö¿Í µµ¸ÞÀÎ Áý°è ÇÔ¼ö¸¦ »ç¿ëÇÒ ¼ö
¾ø½À´Ï´Ù.
2) Microsoft Access ÇÁ·ÎÁ§Æ®(.adp)¿¡¼ µµ¸ÞÀÎ Áý°è ÇÔ¼ö¸¦ »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.
3) Å×À̺íÀÇ À¯È¿¼º °Ë»ç±ÔÄ¢ µî¿¡¼ »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù. |
Áý°è ÇÔ¼ö¸¦ »ç¿ëÇÏ´Â ½Ä ¿¹Á¦
½Ä |
¼³ ¸í |
=Avg([Freight]) |
Avg ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© Freight ÄÁÆ®·Ñ °ªÀÇ Æò±ÕÀ» Ç¥½Ã |
=Count([OrderID]) |
Count ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© OrderID ÄÁÆ®·ÑÀÇ ·¹ÄÚµå °³¼ö¸¦ Ç¥½Ã |
=Sum([Sales]) |
Sum ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© Sales ÄÁÆ®·Ñ °ªÀÇ Çհ踦 Ç¥½Ã |
=Sum([Quantity] * [Price]) |
Sum ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© Quantity¿Í Price ÄÁÆ®·Ñ °ªÀÇ °ö¿¡ ´ëÇÑ Çհ踦 Ç¥½Ã |
=[Sales] / Sum([Sales]) * 100 |
Sales ÄÁÆ®·Ñ °ªÀ» Àüü Sales ÄÁÆ®·Ñ °ªÀÇ ÇÕÀ¸·Î ³ª´©¾î ÆǸž×ÀÇ
¹éºÐÀ²À» Ç¥½Ã
Âü°í ÄÁÆ®·ÑÀÇ Çü½Ä/Format ¼Ó¼ºÀ» ¹éºÐÀ²/Percent·Î ¼³Á¤ÇÑ °æ¿ì¿¡´Â
*100À» »ý·«ÇÕ´Ï´Ù. |
µµ¸ÞÀÎ Áý°è ÇÔ¼ö¸¦ »ç¿ëÇÏ´Â ½Ä ¿¹Á¦
Âü°í] µµ¸ÞÀÎ Áý°è ÇÔ¼öÀÇ Àμö´Â ¹®ÀÚ¿ Çü½ÄÀ¸·Î º¸³»ÁÖ¾î¾ß Çϴµ¥ ÀÌ°ÍÀº Ãʺ¸ÀÚ¸¦ Èûµé°Ô ÇÏ´Â ÀÌÀ¯°¡ µË´Ï´Ù.
=DLookup("[ContactName]",
"[Suppliers]", "[SupplierID] = Forms![SupplierID]") |
DLookup ÇÔ¼ö¸¦ »ç¿ëÇϸé Å×À̺íÀÇ
SupplierID ÇÊµå °ªÀÌ ÇöÀç ÆûÀÇ SupplierID ÄÁÆ®·Ñ °ª°ú ÀÏÄ¡ÇÏ´Â Suppliers Å×À̺íÀÇ
ContactName ÇÊµå °ªÀÌ Ç¥½ÃµË´Ï´Ù. |
=DLookup("[ContactName]",
"[Suppliers]", "[SupplierID]
= Forms![New Suppliers]![SupplierID]") |
DLookup ÇÔ¼ö¸¦ »ç¿ëÇϸé Suppliers Å×À̺íÀÇ
SuppliersID ÇÊµå °ªÀÌ New Suppliers ÆûÀÇ SupplierID ÄÁÆ®·Ñ °ª°ú ÀÏÄ¡ÇÏ´Â Suppliers
Å×À̺íÀÇ ContactName ÇÊµå °ªÀÌ Ç¥½ÃµË´Ï´Ù. |
=DSum("[OrderAmount]", "[Orders]", "[CustomerID]
= ¡°RATTC¡±") |
DSum ÇÔ¼ö¸¦ »ç¿ëÇϸé CustomerID°¡ RATTCÀÎ
Orders Å×À̺íÀÇ OrderAmount ÇÊµå °ª ÃÑ°è°¡ Ç¥½ÃµË´Ï´Ù. |
Âü°í] °è»êÄÁÆ®·ÑÀ» ÀÛ¼ºÇÒ ¶§ ÁÖÀÇ»çÇ×
1. °è»ê ÄÁÆ®·ÑÀÇ ÄÁÆ®·Ñ ¿øº»(Control Source) ¼Ó¼ºÀ» »ç¿ëÇÒ ¶§´Â ½Ä ¾Õ¿¡ = ¿¬»êÀÚ°¡ »ç¿ëµË´Ï´Ù.
µ¥ÀÌÅÍ ¾×¼¼½º ÆäÀÌÁö¿¡¼´Â = ¿¬»êÀÚ¸¦ »ý·«ÇÏ°í ´ë½Å ÁúÀÇÅ×À̺íÀÇ °è»êÇʵå¿Í °°ÀÌ
DisplayCountry:
IIf(IsNull([Country]), " ", [Country])¿Í °°ÀÌ º°ÄªÀ» ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù.
2. ÆûÀ̳ª º¸°í¼¿¡¼ °è»ê ÄÁÆ®·ÑÀÇ À̸§(Name) ¼Ó¼ºÀ» ¼³Á¤Çϰųª µ¥ÀÌÅÍ ¾×¼¼½º ÆäÀÌÁö¿¡¼ °è»ê ÄÁÆ®·ÑÀÇ ID ¼Ó¼ºÀ»
¼³Á¤ÇÒ ¶§´Â °íÀ¯ÇÑ À̸§À» »ç¿ëÇØ¾ß ÇÕ´Ï´Ù. ½Ä¿¡¼ »ç¿ëÇß´ø ÄÁÆ®·Ñ À̸§À̳ª ID´Â »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù. Áï, Ç×»ó À̸§À̳ª ID´Â °íÀ¯ÇÏ°Ô Áö¾î¾ß ÇÑ´Ù´Â °ÍÀÔ´Ï´Ù.
3. ÆûÀ̳ª º¸°í¼ÀÇ ½Ä¿¡¼ ¿øº»À¸·Î »ç¿ëÇÏ´Â ·¹ÄÚµå ¿øº»¿¡ ÀÖ´Â ÄÁÆ®·Ñ À̸§À̳ª Çʵå À̸§À» »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ±×·¯³ª
µ¥ÀÌÅÍ ¾×¼¼½º ÆäÀÌÁöÀÇ ½Ä¿¡¼´Â ÆäÀÌÁöÀÇ µ¥ÀÌÅÍ Á¤ÀÇ¿¡ ÀÖ´Â Çʵå À̸§¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
4. ½Ä¿¡¼ »ê¼ú ¿¬»êÀÚ(+, -, *, /)¸¦ »ç¿ëÇÏ´Â °æ¿ì, ½Ä¿¡ Null °ªÀ» °®´Â ÄÁÆ®·ÑÀÌ Çϳª¶óµµ ÀÖÀ¸¸é Àüü ½ÄÀÇ
°á°ú´Â NullÀÌ µË´Ï´Ù. ÆûÀ̳ª º¸°í¼ÀÇ ½Ä¿¡¼ »ç¿ëÇÑ ÄÁÆ®·ÑÀÇ ·¹Äڵ忡 Null °ªÀÌ ÀÖÀ¸¸é ´ÙÀ½°ú °°ÀÌ
Nz ÇÔ¼ö¸¦ »ç¿ëÇÏ¿©
Null °ªÀ» 0À¸·Î º¯È¯ÇÒ ¼ö ÀÖ½À´Ï´Ù.
=Msodsc.Nz([Subtotal]) + Msodsc.Nz([Freight])
¡¡
Äõ¸®¿Í ÇÊÅÍ¿¡¼ ÀÚ·á ÃßÃâÀ» À§ÇØ »ç¿ëÇÏ´Â ½Ä ¿¹Á¦
°ª ¹üÀ§(>, <, >=, <=, <>, or Between...And)
½Ä |
¼³ ¸í |
> 234 |
Quantity Çʵ忡¼ ¼ýÀÚ°¡ 234º¸´Ù Å®´Ï´Ù. |
< 1200.45 |
UnitPrice Çʵ忡¼ ¼ýÀÚ°¡ 1200.45º¸´Ù ÀÛ½À´Ï´Ù. |
>= "Callahan" |
LastName Çʵ忡¼ À̸§ÀÇ ¹üÀ§´Â Callahan¿¡¼ ¾ËÆĺª ³¡±îÁö¿¡
ÇØ´çµË´Ï´Ù. |
Between #1999/2/2# And #1999/12/1# |
OrderDate Çʵ忡¼ ³¯Â¥°¡ 1999³â 2¿ù 2ÀÏ¿¡¼ 1999¸é 12¿ù
1ÀϱîÁö¿¡ ÇØ´çµË´Ï´Ù(ANSI-89). |
Between ¡°1999/2/2¡± And ¡°1999/12/1¡± |
OrderDate Çʵ忡¼ ³¯Â¥°¡ 1999³â 2¿ù 2ÀÏ¿¡¼ 1999³â 12¿ù
1ÀϱîÁö¿¡ ÇØ´çµË´Ï´Ù(ANSI-92). |
ÀÏÄ¡ÇÏÁö ¾Ê´Â °ª ( Not )
½Ä |
¼³ ¸í |
Not "°æ±âµµ" |
ShipCountry Çʵ忡¼ °æ±âµµ°¡ ¾Æ´Ñ ´Ù¸¥ Áö¿ª¿¡ ÁÖ¹®ÀÌ ¼±ÀûµÇ¾ú½À´Ï´Ù. |
Not 2 |
ID Çʵ忡¼ Á÷¿ø ¹øÈ£°¡ 2°¡ ¾Æ´Õ´Ï´Ù. |
Not ¾È* |
LastName Çʵ忡¼ Á÷¿ø ¼ºÀÌ "¾È"À¸·Î ½ÃÀÛÇÏÁö
¾Ê½À´Ï´Ù(ANSI-89). |
Not ¾È% |
LastName Çʵ忡¼ Á÷¿ø ¼ºÀÌ "¾È"À¸·Î ½ÃÀÛÇÏÁö ¾Ê½À´Ï´Ù(ANSI-92). |
¸ñ·Ï¿¡ ÀÖ´Â °ª ( In )
½Ä |
¼³ ¸í |
In("°æ±âµµ", "°¿øµµ") |
ShipCountry Çʵ忡¼ °æ±âµµ³ª °¿øµµ·Î ÁÖ¹®ÀÌ ¼±ÀûµË´Ï´Ù. |
In(ºÎ»ê½Ã, ¼¿ï½Ã, ´ë±¸½Ã) |
CountryName Çʵ忡¼ ºÎ»êÀ̳ª, ¼¿ï, ´ë±¸¿¡ »ì°í ÀÖ´Â Á÷¿øÀÔ´Ï´Ù. |
ÅؽºÆ®, ºÎºÐ, ÀÏÄ¡ÇÏ´Â °ª
½Ä |
¼³ ¸í |
"´ëÀü½Ã" |
ShipCity Çʵ忡¼ ´ëÀü½Ã·Î ¼±ÀûµÈ ÁÖ¹®ÀÔ´Ï´Ù. |
"´ëÀü½Ã" Or "ºÎ»ê½Ã" |
ShipCity Çʵ忡¼ ´ëÀü½Ã³ª ºÎ»ê½Ã·Î ¼±ÀûµÈ ÁÖ¹®ÀÔ´Ï´Ù. |
>="¸¶" |
CompanyName Çʵ忡¼ ȸ»ç À̸§ÀÌ ¸¶¿¡¼ ÇÏ »çÀÌÀÇ ¹®ÀÚ·Î ½ÃÀÛÇÏ´Â
°í°´¿¡°Ô ¼±ÀûµÈ ÁÖ¹®ÀÔ´Ï´Ù. |
Like "½Å*" |
ShipName Çʵ忡¼ À̸§ÀÌ ½ÅÀ¸·Î ½ÃÀÛÇÏ´Â °í°´¿¡°Ô ¼±ÀûµÈ
ÁÖ¹®ÀÔ´Ï´Ù(ANSI-89). |
Like "½Å%" |
ShipName Çʵ忡¼ À̸§ÀÌ ½ÅÀ¸·Î ½ÃÀÛÇÏ´Â °í°´¿¡°Ô ¼±ÀûµÈ ÁÖ¹®ÀÔ´Ï´Ù(ANSI-92). |
Right([OrderID], 2) = "99" |
OrderID Çʵ忡¼ 99·Î ³¡³ª´Â ID °ªÀ» °¡Áö´Â ÁÖ¹®ÀÔ´Ï´Ù. |
Len([CompanyName]) > Val(30) |
CompanyName Çʵ忡¼ À̸§ÀÌ 30ÀÚ ÀÌ»óÀΠȸ»çÀÇ ÁÖ¹®ÀÔ´Ï´Ù. |
ÀϺΠÇÊµå °ª (Like)
½Ä |
¼³ ¸í |
Like "½Å*" |
ShipName Çʵ忡¼ À̸§ÀÌ ½ÅÀ¸·Î ½ÃÀÛÇÏ´Â °í°´¿¡°Ô ¼±ÀûµÈ ÁÖ¹®ÀÔ´Ï´Ù(ANSI-89). |
Like "½Å%" |
ShipName Çʵ忡¼ À̸§ÀÌ ½ÅÀ¸·Î ½ÃÀÛÇÏ´Â °í°´¿¡°Ô ¼±ÀûµÈ ÁÖ¹®ÀÔ´Ï´Ù(ANSI-92). |
Like "*ȗȍ" |
ShipName Çʵ忡¼ À̸§ÀÌ "»ó»ç"·Î ³¡³ª´Â °í°´¿¡°Ô ¼±ÀûµÈ ÁÖ¹®ÀÔ´Ï´Ù(ANSI-89). |
Like "%ȗȍ" |
ShipName Çʵ忡¼ À̸§ÀÌ "»ó»ç"·Î ³¡³ª´Â °í°´¿¡°Ô ¼±ÀûµÈ ÁÖ¹®ÀÔ´Ï´Ù(ANSI-92). |
Like "[¤¡-¤±]*" |
ShipName Çʵ忡¼ À̸§ÀÌ ¤¡¿¡¼ ¤±À¸·Î ½ÃÀÛÇÏ´Â °í°´¿¡°Ô ¼±ÀûµÈ ÁÖ¹®ÀÔ´Ï´Ù(ANSI-89). |
Like "[¤¡-¤±]%" |
ShipName Çʵ忡¼ À̸§ÀÌ ¤¡¿¡¼ ¤±À¸·Î ½ÃÀÛÇÏ´Â °í°´¿¡°Ô ¼±ÀûµÈ ÁÖ¹®ÀÔ´Ï´Ù(ANSI-92). |
Like "*¿ùµå*" |
ShipName Çʵ忡¼ À̸§¿¡ "¿ùµå"¶ó´Â ´Ü¾î°¡ µé¾î°¡´Â °í°´¿¡°Ô ¼±ÀûµÈ ÁÖ¹®ÀÔ´Ï´Ù(ANSI-89). |
Like "%¿ùµå%" |
ShipName Çʵ忡¼ À̸§¿¡ "¿ùµå"¶ó´Â ´Ü¾î°¡ µé¾î°¡´Â °í°´¿¡°Ô ¼±ÀûµÈ ÁÖ¹®ÀÔ´Ï´Ù(ANSI-92). |
Like "°æ¼º Æ®·¹ÀÌ?" |
ShipName Çʵ忡¼ Àüü 7¹®ÀÚ Áß Ã¹ 6ÀÚ°¡ "°æ¼º Æ®·¹ÀÌ"·Î ½ÃÀ۵Ǵ À̸§ÀÇ °í°´¿¡°Ô ¼±ÀûµÈ
ÁÖ¹®ÀÔ´Ï´Ù(ANSI-89). |
Like "°æ¼º Æ®·¹ÀÌ_" |
ShipName Çʵ忡¼ Àüü 7¹®ÀÚ Áß Ã¹ 6ÀÚ°¡ "°æ¼º Æ®·¹ÀÌ"·Î ½ÃÀ۵Ǵ À̸§ÀÇ °í°´¿¡°Ô ¼±ÀûµÈ ÁÖ¹®ÀÔ´Ï´Ù(ANSI-92). |
³¯Â¥
½Ä |
¼³ ¸í |
#2000/2/2# |
ShippedDate Çʵ忡¼ 2000³â 2¿ù 2ÀÏ¿¡ ¼±ÀûµÈ ÁÖ¹®ÀÔ´Ï´Ù(ANSI-89). |
¡°2000/2/2¡± |
ShippedDate Çʵ忡¼ 2000³â 2¿ù 2ÀÏ¿¡ ¼±ÀûµÈ ÁÖ¹®ÀÔ´Ï´Ù(ANSI-92). |
Date() |
RequiredDate Çʵ忡¼ ¿À´Ã ³¯Â¥ÀÇ ÁÖ¹®ÀÔ´Ï´Ù. |
Between Date( ) And DateAdd("M", 3, Date( )) |
RequiredDate Çʵ忡¼ ¿À´Ã ³¯Â¥¿Í ¿À´Ã ³¯Â¥¿¡¼ 3°³¿ù »çÀÌÀÇ ÁÖ¹®ÀÔ´Ï´Ù. |
< Date( ) - 30 |
OrderDate Çʵ忡¼ 30ÀÏÀÌ Áö³ ÁÖ¹®ÀÔ´Ï´Ù. |
Year([OrderDate]) = 1999 |
OrderDate Çʵ忡¼ 1999³â¿¡ ÁÖ¹®µÈ ÁÖ¹®ÀÔ´Ï´Ù. |
DatePart("q", [OrderDate]) = 4 |
OrderDate Çʵ忡¼ 4»çºÐ±â¿¡ ÇØ´çÇÏ´Â ÁÖ¹®ÀÔ´Ï´Ù. |
DateSerial(Year ([OrderDate]), Month([OrderDate]) + 1, 1) - 1 |
OrderDate Çʵ忡¼ °¢ ¿ùÀÇ ¸¶Áö¸· ³¯¿¡ ÇØ´çÇÏ´Â ÁÖ¹®ÀÔ´Ï´Ù. |
Year([OrderDate]) = Year(Now()) And Month([OrderDate]) = Month(Now()) |
OrderDate Çʵ忡¼ ÇöÀç ¿¬µµ¿Í ¿ù¿¡ ÇØ´çÇÏ´Â ÁÖ¹®ÀÔ´Ï´Ù. |
ÁÖÀÇ] ÁúÀǹ®¿¡¼ÀÇ ³¯Â¥Çü½ÄÀº ¡°¿ù/ÀÏ/³âµµ¡±¿Í °°Àº ½ÄÀ¸·Î Ç¥ÇöµÇµµ·Ï ÇϽʽÿÀ.
ºó ÇÊµå °ª(NullÀ̳ª ºó ¹®ÀÚ¿)
½Ä |
¼³ ¸í |
Is Null |
ShipRegion Çʵ忡¼ ShipRegion Çʵ尡 Null
(ºó)ÀÎ °í°´ÀÇ ÁÖ¹®ÀÔ´Ï´Ù. |
Is Not Null |
ShipRegion Çʵ忡¼ ShipRegion Çʵ忡 °ªÀÌ µé¾î ÀÖ´Â °í°´ÀÇ
ÁÖ¹®ÀÔ´Ï´Ù. |
" " |
Fax Çʵ忡¼ Æѽº°¡ ¾ø¾î¼ Fax Çʵ忡 Null °ª(ºó °ª) ´ë½Å ºó
¹®ÀÚ¿ °ªÀÌ ÁöÁ¤µÈ °í°´ÀÇ ÁÖ¹®ÀÔ´Ï´Ù. |
µµ¸ÞÀÎ Áý°è ÇÔ¼öÀÇ °á°ú
½Ä |
¼³ ¸í |
> (DStDev("[Freight]", "Orders") +
DAvg("[Freight]", "Orders")) |
Freight Çʵ忡¼ ¿î¼Û ºñ¿ëÀÌ Æò±Õ°ú ¿î¼Û ºñ¿ëÀÇ Çհ躸´Ù ¸¹½À´Ï´Ù. |
>Davg("[Quantity]", "Order Details") |
Quantity Çʵ忡¼ ÁÖ¹®ÇÑ Á¦Ç°ÀÇ ¾çÀÌ Æò±Õ ÁÖ¹® ¾çº¸´Ù ¸¹½À´Ï´Ù. |
Á¶°ÇÀ¸·Î¼ÀÇ ÇÏÀ§ Äõ¸® °á°ú
½Ä |
¼³ ¸í |
(SELECT [UnitPrice] FROM [Products]
WHERE [ProductName] = "´ë¼º ¾î¹¬") |
UnitPrice Çʵ忡¼ ´ë¼º ¾î¹¬ °¡°Ý°ú °°Àº °¡°ÝÀÇ Á¦Ç°ÀÔ´Ï´Ù. |
> (SELECT AVG([UnitPrice]) FROM
[Products]) |
UnitPrice Çʵ忡¼ Æò±Õº¸´Ù ³ôÀº ´Ü°¡ÀÇ Á¦Ç°ÀÔ´Ï´Ù. |
> ALL (SELECT [Salary] FROM [Employees]
WHERE ([Title] LIKE "*°úÀå*") OR ([Title] LIKE "*ºÎ»çÀå*")) |
Salary Çʵ忡¼ Á÷À§°¡ "°úÀå"À̳ª "ºÎ»çÀå"ÀÎ Á÷¿øÀÇ ±Þ¿©º¸´Ù ³ôÀº
±Þ¿©¸¦ ¹Þ´Â °¢ ¿µ¾÷ »ç¿øÀÇ ±Þ¿©ÀÔ´Ï´Ù. |
> ALL (SELECT AVG([UnitPrice] * [Quantity])
FROM [Order Details]) |
OrderTotal: [Unit Price] * [Quantity] °è»ê
Çʵ忡¼ ÁÖ¹® Æò±Õº¸´Ù ³ôÀº ¿ä¾àÀ» °¡Áø ÁÖ¹®ÀÔ´Ï´Ù. |
°è»ê Çʵ忡¼ »ç¿ëÇÏ´Â ½Ä ¿¹Á¦
ÅؽºÆ® °ª Á¶ÀÛ
½Ä |
¼³ ¸í |
¼º¸í: [¼º] & " " & [À̸§] |
¼º°ú À̸§ÇʵåÀÇ °ªÀ» ÇÑ Ä ¶ç¾î¼ ¼º¸í °è»êÇʵå·Î Ç¥½ÃÇÕ´Ï´Ù. |
»óÇ°¸Ó¸´±ÛÀÚ: Left([»óÇ°¸í], 1) |
»óÇ°¸í ÇʵåÀÇ Ã¹ ¹ø° ¹®ÀÚ¸¸ °¡Á®¿Í »óÇ°¸Ó¸´±ÛÀÚ °è»êÇʵ带 Ç¥½ÃÇÕ´Ï´Ù. |
Áö¿ªÄÚµå: Mid([ÀüȹøÈ£], 2, 3) |
ÀüȹøÈ£ ÇʵåÀÇ °ª Áß¿¡¼ µÎ ¹ø° ¹®ÀÚ·Î ½ÃÀÛÇÏ´Â ¼¼ ¹®ÀÚ¸¦ Áö¿ªÄÚµå
°è»êÇʵ忡¼ Ç¥½ÃÇÕ´Ï´Ù. |
»ê¼ú ¿¬»ê ¼öÇà
½Ä |
¼³ ¸í |
PrimeFreight: [Freight] * 1.1 |
PrimeFreight Çʵ忡¼ ¿î¼Ûºñ¿¡ 10%¸¦ Ãß°¡ÇÑ °ªÀ» Ç¥½ÃÇÕ´Ï´Ù. |
OrderAmount: [Quantity] * [UnitPrice] |
OrderAmount Çʵ忡¼ Quantity¿Í UnitPrice ÇÊµå °ªÀ»
°öÇÑ °ªÀ» Ç¥½ÃÇÕ´Ï´Ù. |
LeadTime: [RequiredDate] - [ShippedDate] |
LeadTime Çʵ忡¼ RequiredDate Çʵå¿Í ShippedDate
ÇʵåÀÇ Â÷ÀÌ °ªÀ» Ç¥½ÃÇÕ´Ï´Ù. |
TotalStock: [UnitsInStock] + [UnitsOnOrder] |
TotalStock Çʵ忡¼ UnitsInStock Çʵå¿Í
UnitsOnOrder ÇÊµå °ªÀÇ Çհ踦 Ç¥½ÃÇÕ´Ï´Ù. |
FreightPercentage: Sum([Freight]) /
Sum([Subtotal]) * 100 |
FreightPercentage Çʵ忡¼ Freight ÇÊµå °ªÀÇ Çհ踦
Subtotal ÇÊµå °ªÀÇ ÇÕ°è·Î ³ª´©¾î °¢ ºÎºÐÇÕ¿¡¼ ¿î¼ÛºñÀÇ ¹éºÐÀ²À» Ç¥½ÃÇÕ´Ï´Ù.
µðÀÚÀÎ ´«±ÝÀÇ ¿ä¾à ÇàÀÌ Ç¥½ÃµÇ¾î¾ß Çϸç ÀÌ ÇʵåÀÇ ¿ä¾à ¼¿ÀÌ ½ÄÀ¸·Î ¼³Á¤µÇ¾î¾ß ÇÕ´Ï´Ù.
ÇʵåÀÇ Çü½Ä ¼Ó¼ºÀÌ ¹éºÐÀ²·Î ¼³Á¤µÇ¾î ÀÖÀ¸¸é *100Àº Æ÷ÇÔÇÏÁö ¾Ê½À´Ï´Ù. |
SumofUnits: Nz([UnitsInStock], 0) +
Nz([UnitsOnOrder], 0) |
SumofUnits Çʵ忡¼ ¸ðµç Àç°í ´ÜÀ§ ¼ö·®°ú ¼öÁÖ·®ÀÇ ÇÕ°è°¡ Ç¥½ÃµË´Ï´Ù.
½Ä¿¡¼ »ê¼ú ¿¬»êÀÚ(+, -, *, /)¸¦ »ç¿ëÇÏ°í ÇÊµå °¡¿îµ¥ Çϳª°¡ NullÀ̸é Àüü ½ÄÀÇ °á°ú´Â
NullÀÌ µË´Ï´Ù. ½Ä¿¡¼ ¾²ÀÌ´Â ÇÊµå °¡¿îµ¥ ¾î¶² ·¹Äڵ尡 Null °ªÀÌ µÉ °ÍÀ¸·Î ¿¹»óµÇ¸é NzÇÔ¼ö¸¦
»ç¿ëÇÏ¿© Null °ªÀ» 0À¸·Î ¹Ù²ß´Ï´Ù.
¿¹¸¦ µé¸é, ´ÙÀ½°ú °°½À´Ï´Ù. |
Âü°í] µðÀÚÀÎ ´«±Ý¿¡ ¿ä¾à ÇàÀÌ Ç¥½ÃµÇµµ·Ï ÇÏ·Á¸é ÁúÀǵðÀÚÀθðµå¿¡¼ ¸Þ´ºÁß ½Ã±×¸¶ Ç¥½ÃÀÇ ¸Þ´º¸¦ ´·¯ÁÖ¾î¾ß ÇÕ´Ï´Ù.
³¯Â¥ Á¶ÀÛ°ú °è»ê
½Ä |
¼³ ¸í |
LagTime: DateDiff("d", [OrderDate], [ShippedDate]) |
LagTime Çʵ忡¼ ÁÖ¹® ³¯Â¥¿Í ¼±Àû ³¯Â¥ »çÀÌÀÇ ¼ýÀÚ¸¦ Ç¥½ÃÇÕ´Ï´Ù. |
YearHired: DatePart("yyyy", [HireDate]) |
YearHired Çʵ忡¼ Á÷¿øÀ» °í¿ëÇÑ ¿¬µµ¸¦ Ç¥½ÃÇÕ´Ï´Ù. |
MonthNo: DatePart("M", [OrderDate]) |
MonthNo Çʵ忡¼ ¿ù ¼ýÀÚ¸¦ Ç¥½ÃÇÕ´Ï´Ù. |
PriorDate: Date( ) - 30 |
PriorDate Çʵ忡¼ ÇöÀç ³¯Â¥ 30ÀÏ ÀÌÀüÀÇ ³¯Â¥¸¦ Ç¥½ÃÇÕ´Ï´Ù. |
SQL°ú µµ¸ÞÀÎ Áý°è ÇÔ¼ö »ç¿ë
½Ä |
¼³ ¸í |
Count(*) |
Äõ¸®¿¡¼ Null(ºó) Çʵ尡 ÀÖ´Â ·¹Äڵ带 Æ÷ÇÔÇÏ¿© ·¹ÄÚµå ¼ö¸¦
°è»êÇÏ´Â Count ÇÔ¼ö¸¦ »ç¿ëÇÕ´Ï´Ù. |
FreightPercentage: Sum([Freight]) /
Sum([Subtotal]) * 100 |
FreightPercentage Çʵ忡¼ Freight ÇÊµå °ªÀÇ Çհ踦
Subtotal ÇÊµå °ªÀÇ ÇÕ°è·Î ³ª´©¾î °¢ ºÎºÐÇÕ¿¡¼ ¿î¼ÛºñÀÇ ¹éºÐÀ²À» Ç¥½ÃÇÕ´Ï´Ù.
µðÀÚÀÎ ´«±ÝÀÇ ¿ä¾à ÇàÀÌ Ç¥½ÃµÇ¾î¾ß Çϸç ÀÌ ÇʵåÀÇ ¿ä¾à ¼¿ÀÌ ½ÄÀ¸·Î ¼³Á¤µÇ¾î¾ß ÇÕ´Ï´Ù.
ÇʵåÀÇ Çü½Ä ¼Ó¼ºÀÌ ¹éºÐÀ²·Î ¼³Á¤µÇ¾î ÀÖÀ¸¸é *100Àº Æ÷ÇÔÇÏÁö ¾Ê½À´Ï´Ù. |
AverageFreight: DAvg("[Freight]",
"[Orders]") |
AverageFreight Çʵ忡¼ ¿ä¾à Äõ¸®¿¡¼ °áÇÕµÈ ¸ðµç ÁÖ¹®¿¡ ÁÖ¾îÁø
Æò±Õ °ªÀ» Ç¥½ÃÇÕ´Ï´Ù. |
Null °ª »ç¿ë
½Ä |
¼³ ¸í |
CurrentCountry: IIf(IsNull([Country]),
" ", [Country]) |
CurrentCountry Çʵ忡¼ Country Çʵ尡 NullÀÎ °æ¿ì ºó ¹®ÀÚ¿À» Ç¥½ÃÇÕ´Ï´Ù. NullÀÌ ¾Æ´Ñ
°æ¿ì Country ÇʵåÀÇ ³»¿ëÀ» Ç¥½ÃÇÕ´Ï´Ù. |
LeadTime: IIf(IsNull([RequiredDate] -
[ShippedDate]), "Check for a missing date", [RequiredDate] - [ShippedDate]) |
RequiredDate ÇÊµå °ªÀ̳ª ShippedDate ÇÊµå °ªÀÌ
NullÀ̸é
LeadTime Çʵ忡 "Check for a missing date"¶ó´Â ¸Þ½ÃÁö¸¦ Ç¥½ÃÇÕ´Ï´Ù. ÀÌ ÇÔ¼ö¸¦ »ç¿ëÇÏÁö ¾ÊÀ¸¸é µÎ
ÇÊµå °£ÀÇ Â÷ÀÌ°¡ ³ªÅ¸³³´Ï´Ù. |
SixMonthSales: Nz([Qtr1Sales], 0) + Nz([Qtr2Sales],
0) |
SixMonthSales Çʵ忡 1/4ºÐ±â¿Í 2/4ºÐ±âÀÇ sales Çʵ带
°áÇÕÇÑ ¿ä¾àÀÇ °ªÀ» Ç¥½ÃÇÏ°í Nz ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© ¸ÕÀú Null °ªÀ» 0À¸·Î ¹Ù²ß´Ï´Ù. |
ÇÏÀ§ Äõ¸® »ç¿ë
½Ä |
¼³ ¸í |
Category: (SELECT [CategoryName] FROM
[Categories] WHERE [Products].[CategoryID] = [Categories].[CategoryID]) |
Category Çʵ忡¼ Categories Å×À̺íÀÇ
CategoryID°¡ Products Å×À̺íÀÇ CategoryID¿Í °°À¸¸é
CategoryNameÀ» Ç¥½ÃÇÕ´Ï´Ù. |
¾÷µ¥ÀÌÆ® Äõ¸®ÀÇ ½Ä ¿¹Á¦
¾÷µ¥ÀÌÆ®ÇÒ Çʵ忡 ´ëÇØ Äõ¸® µðÀÚÀÎ ´«±ÝÀÇ ¾÷µ¥ÀÌÆ® ¼¿¿¡¼ ´ÙÀ½ ½ÄÀ» »ç¿ëÇÕ´Ï´Ù.
½Ä |
¼³ ¸í |
"¿µ¾÷ »ç¿ø" |
ÅؽºÆ® °ªÀ» ¿µ¾÷ »ç¿øÀ¸·Î º¯°æÇÕ´Ï´Ù. |
#99/8/10# |
³¯Â¥ °ªÀ» 1999³â 8¿ù 10ÀÏ·Î º¯°æÇÕ´Ï´Ù. |
¿¹ |
¿¹/¾Æ´Ï¿À ÇʵåÀÇ ¾Æ´Ï¿À °ªÀ» ¿¹·Î °íĨ´Ï´Ù. |
"PN" & [PartNumber] |
ÁöÁ¤µÈ ºÎÇ° ¹øÈ£ ¾Õ¿¡ PNÀ» Ãß°¡ÇÕ´Ï´Ù. |
[UnitPrice] * [Quantity] |
UnitPrice¿Í Quantity¸¦ °öÇÕ´Ï´Ù. |
[Freight] * 1.5 |
¿îÀÓÀ» 50% ´Ã¸³´Ï´Ù. |
DSum("[Quantity] * [UnitPrice]", "Order
Details", "[ProductID]=" & [ProductID]) |
ÇöÀç Å×À̺íÀÇ ProductID°¡ Order Details Å×À̺íÀÇ
ProductID¿Í °°À» ¶§ UnitPrice¿Í QuantityÀÇ °ö¿¡ ±Ù°ÅÇÏ¿© ÆǸŠÇհ踦 ¾÷µ¥ÀÌÆ®ÇÕ´Ï´Ù. |
Right([ShipPostalCode], 5) |
°¡Àå ¿À¸¥ÂÊ ¹®ÀÚ¸¦ ´Ù¼¸ ±ÛÀÚ ³²°ÜµÎ°í °¡Àå ¿ÞÂÊ ¹®ÀÚ¸¦ ÀÚ¸¨´Ï´Ù. |
IIf(IsNull([UnitPrice]), 0, [UnitPrice]) |
UnitPrice Çʵ忡¼ Null °ªÀ» 0À¸·Î ¹Ù²ß´Ï´Ù. |
SQL ¹®¿¡¼ »ç¿ëÇÏ´Â ½Ä ¿¹Á¦
´ÙÀ½ ¿¹Á¦¿¡¼ º¼ ¼ö ÀÖµíÀÌ SQL ¹®¿¡¼ ½ÄÀ» ¿©·¯ °¡Áö ¹æ½ÄÀ¸·Î »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ±½°Ô Ç¥½ÃµÈ ºÎºÐÀÌ ½ÄÀÔ´Ï´Ù.
½Ä |
¼³ ¸í |
SELECT [FirstName], [LastName] FROM [Employees] WHERE [LastName]
= "Davolio"; |
Á÷À§°¡ ¿µ¾÷ »ç¿øÀÎ Á÷¿øÀÇ FirstName Çʵå¿Í LastName Çʵ带 Ç¥½ÃÇÕ´Ï´Ù. |
SELECT [ProductID], [ProductName] FROM [Products] WHERE [CategoryID]
= Forms![New Products]![CategoryID]; |
¿·Á ÀÖ´Â New Products Æû¿¡¼ ÁöÁ¤µÈ CategoryID(Á¦Ç° ºÐ·ù) °ª°ú ÀÏÄ¡ÇÏ´Â CategoryID °ªÀÌ µé¾î
ÀÖ´Â Products Å×ÀÌºí ·¹ÄÚµåÀÇ ProductID(Á¦Ç° ¹øÈ£) ÇÊµå °ª°ú ProductName(Á¦Ç° À̸§) ÇÊµå °ªÀ»
Ç¥½ÃÇÕ´Ï´Ù. |
SELECT Avg([ExtendedPrice]) AS [Average Extended Price] FROM
[Order Details Extended] WHERE [ExtendedPrice] > 1000; |
Average Extended Price Çʵ忡¼ ExtendedPrice ÇÊµå °ªÀÌ 1,000 ÀÌ»óÀÎ ÁÖ¹®ÀÇ Æò±Õ È®Àå
°¡°ÝÀ» Ç¥½ÃÇÕ´Ï´Ù. |
SELECT [CategoryID],Count([ProductID]) AS [CountOfProductID]
FROM [Products] GROUP BY [CategoryID] HAVING Count([ProductID]) >
10; |
CountOfProductID Çʵ忡 10°³ ÀÌ»óÀÇ Á¦Ç°À» °¡Áø Á¦Ç° Á¾·ùº°·Î °¢ Á¾·ù¿¡ µé¾î ÀÖ´Â Á¦Ç° ÃÑ °³¼ö¸¦
Ç¥½ÃÇÕ´Ï´Ù. |
±âº»°ª ½Ä ¿¹Á¦
´ÙÀ½ ¿¹Á¦´Â ÇʵåÀÇ ±âº»°ª ¼Ó¼º¿¡¼ ½ÄÀ» »ç¿ëÇÏ´Â ¹æ¹ýÀÔ´Ï´Ù.
½Ä |
¼³ ¸í |
1 |
1 |
"MT" |
MT |
"New York, N.Y." |
New York, N.Y. °ª¿¡ ±¸µÎÁ¡ÀÌ Æ÷ÇÔµÇ¸é ¹Ýµå½Ã µû¿ÈÇ¥·Î ¹¾î¾ß
ÇÕ´Ï´Ù. |
" " |
ºó ¹®ÀÚ¿ |
Date( ) |
¿À´Ã ³¯Â¥ |
=Yes |
ÄÄÇ»ÅÍ ·ÎÄà ¾ð¾î¿¡ Ç¥½ÃµÈ Yes¸¦ ³ªÅ¸³À´Ï´Ù. |
¸ÅÅ©·Î Á¶°Ç½Ä ¿¹Á¦
True/False³ª Yes/No¸¦ »êÃâÇÏ´Â ½ÄÀ» ¸ÅÅ©·Î Á¶°Ç¿¡¼ »ç¿ëÇÒ ¼öµµ ÀÖ½À´Ï´Ù. Á¶°ÇÀÌ True³ª Yes¸¦ »êÃâÇÒ
°æ¿ì
¸ÅÅ©·Î°¡ ½ÇÇàµË´Ï´Ù.
ÆÁ]
¸ÅÅ©·Î ÇÔ¼ö¸¦ Àá½Ã ¹«½ÃÇÏ·Á¸é Á¶°Ç¿¡ False¸¦ ÀÔ·ÂÇÕ´Ï´Ù. ¸ÅÅ©·ÎÀÇ ¹®Á¦¸¦ È®ÀÎÇÒ ¶§´Â ¸ÅÅ©·Î ÇÔ¼ö¸¦ Àá½Ã ¹«½ÃÇÏ´Â °ÍÀÌ
Æí¸®ÇÕ´Ï´Ù.
½Ä |
¼³ ¸í |
[City]="¼¿ïƯº°½Ã" |
¸ÅÅ©·Î¸¦ ½ÇÇàÇÏ´Â ÆûÀÇ Çʵ忡 ÀÖ´Â City(µµ½Ã¸í) °ªÀÌ ¼¿ïƯº°½ÃÀÔ´Ï´Ù. |
DCount("[OrderID]", "Orders")>35 |
Orders Å×ÀÌºí¿¡ ÀÖ´Â OrderID(ÁÖ¹® ¹øÈ£) Çʵ忡 Ç׸ñÀÌ 36°³ ÀÌ»ó
ÀÖ½À´Ï´Ù. |
DCount("*", "Order Details", "[OrderID]=Forms![Orders]![OrderID]")>3 |
Orders ÆûÀÇ OrderID Çʵ忡 ´ëÀÀÇÏ´Â Order Details
Å×À̺íÀÇ OrderID Çʵ忡 Ç׸ñÀÌ 4°³ ÀÌ»ó ÀÖ½À´Ï´Ù. |
[ShippedDate] Between #2001-02-02# And
#2001-03-02# |
¸ÅÅ©·Î¸¦ ½ÇÇàÇÏ´Â ÆûÀÇ ShippedDate ÇÊµå °ªÀÌ 2001-02-02¿¡¼
2001-03-02 »çÀÌ¿¡ ÀÖ½À´Ï´Ù. |
Forms![Products]![UnitsInStock]<5 |
Products ÆûÀÇ UnitsInStock ÇÊµå °ªÀÌ 5º¸´Ù ÀÛ½À´Ï´Ù. |
IsNull([FirstName]) |
¸ÅÅ©·Î¸¦ ½ÇÇàÇÏ´Â ÆûÀÇ FirstName °ªÀÌ Null(°ªÀÌ ¾øÀ½)ÀÔ´Ï´Ù.
ÀÌ ½ÄÀº [FirstName] Is Null°ú °°½À´Ï´Ù. |
[Region]="°æ±âµµ" And
Forms![SalesTotals]![TotalOrds]>100 |
¸ÅÅ©·Î¸¦ ½ÇÇàÇÏ´Â ÆûÀÇ Region ÇÊµå °ªÀÌ °æ±âµµÀÌ°í, SalesTotals
ÆûÀÇ TotalOrds ÇÊµå °ªÀÌ 100º¸´Ù ÀÛ½À´Ï´Ù. |
[Region] In("°æ±âµµ", "°¿øµµ", "Á¦ÁÖµµ") And
Len([PostalCode])<>5 |
¸ÅÅ©·Î¸¦ ½ÇÇàÇÏ´Â ÆûÀÇ Region ÇÊµå °ªÀÌ °æ±âµµ, °¿øµµ, Á¦ÁÖµµ ÁßÀÇ
ÇϳªÀÌ°í, ¿ìÆí ¹øÈ£´Â ´Ù¼¸ ÀÚ¸®°¡ ¾Æ´Õ´Ï´Ù. |
MsgBox("Confirm changes?",1)=1 |
MsgBox ÇÔ¼ö ´ëÈ »óÀÚ¿¡¼ È®ÀÎÀ» Ŭ¸¯Çϸé "Confirm
changes?"¶ó´Â ¸Þ½ÃÁö°¡ ³ª¿É´Ï´Ù. ´ëÈ »óÀÚ¿¡¼ Ãë¼Ò¸¦ Ŭ¸¯ÇÏ¸é ¸ÅÅ©·Î ÇÔ¼ö°¡ ¹«½ÃµË´Ï´Ù. |
¡¡ |