{"id":1483,"date":"2025-11-15T14:26:41","date_gmt":"2025-11-15T06:26:41","guid":{"rendered":"http:\/\/www.dxQerp.com\/?p=1483"},"modified":"2026-01-24T08:10:03","modified_gmt":"2026-01-24T00:10:03","slug":"dbase-2019-%e7%9a%84-command-%e8%88%87-expression-%e5%b7%ae%e7%95%b0%e5%9c%a8%e5%93%aa","status":"publish","type":"post","link":"http:\/\/www.dxQerp.com\/?p=1483","title":{"rendered":"dbase 2019 \u7684 command \u8207 Expression \u5dee\u7570\u5728\u54ea ?"},"content":{"rendered":"<p dir=\"auto\">\u5728 <strong>dBASE 2019<\/strong>\uff08\u6216\u5176\u524d\u8eab\u5982 dBASE PLUS\u3001Visual dBASE \u7b49\uff09\u4e2d\uff0c<strong>Command<\/strong>\uff08\u6307\u4ee4\uff09\u8207 <strong>Expression<\/strong>\uff08\u904b\u7b97\u5f0f\uff09\u662f\u5169\u500b\u6838\u5fc3\u6982\u5ff5\uff0c\u5b83\u5011\u5728\u8a9e\u6cd5\u3001\u7528\u9014\u8207\u57f7\u884c\u65b9\u5f0f\u4e0a\u6709\u660e\u986f\u5dee\u7570\u3002\u4ee5\u4e0b\u662f\u8a73\u7d30\u5c0d\u6bd4\uff1a<\/p>\n<hr \/>\n<h3 dir=\"auto\">1. <strong>\u5b9a\u7fa9\u8207\u672c\u8cea\u5dee\u7570<\/strong><\/h3>\n<div>\n<div>\n<div><\/div>\n<\/div>\n<div dir=\"auto\">\n<div><\/div>\n<table dir=\"auto\">\n<thead>\n<tr>\n<th data-col-size=\"xs\">\u9805\u76ee<\/th>\n<th data-col-size=\"lg\"><strong>Command\uff08\u6307\u4ee4\uff09<\/strong><\/th>\n<th data-col-size=\"lg\"><strong>Expression\uff08\u904b\u7b97\u5f0f\uff09<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-col-size=\"xs\"><strong>\u672c\u8cea<\/strong><\/td>\n<td data-col-size=\"lg\">\u5b8c\u6574\u7684\u300c\u52d5\u4f5c\u6307\u4ee4\u300d\uff0c\u7531 dBASE \u89e3\u8b6f\u5668\u76f4\u63a5\u57f7\u884c<\/td>\n<td data-col-size=\"lg\">\u8a08\u7b97\u5f8c\u300c\u7522\u751f\u4e00\u500b\u503c\u300d\u7684\u8a9e\u6cd5\u7247\u6bb5<\/td>\n<\/tr>\n<tr>\n<td data-col-size=\"xs\"><strong>\u7bc4\u4f8b<\/strong><\/td>\n<td data-col-size=\"lg\">LIST\u3001USE customer\u3001REPLACE name WITH &#8220;John&#8221;<\/td>\n<td data-col-size=\"lg\">&#8220;John&#8221; + &#8221; Doe&#8221;\u3001UPPER(name)\u3001DATE() + 7<\/td>\n<\/tr>\n<tr>\n<td data-col-size=\"xs\"><strong>\u985e\u578b<\/strong><\/td>\n<td data-col-size=\"lg\">\u52d5\u4f5c\uff08Action\uff09<\/td>\n<td data-col-size=\"lg\">\u503c\uff08Value\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div><\/div>\n<\/div>\n<\/div>\n<hr \/>\n<h3 dir=\"auto\">2. <strong>\u8a9e\u6cd5\u4f4d\u7f6e\u5dee\u7570<\/strong><\/h3>\n<div>\n<div>\n<div><\/div>\n<\/div>\n<div dir=\"auto\">\n<div><\/div>\n<table dir=\"auto\">\n<thead>\n<tr>\n<th data-col-size=\"xs\">\u4f7f\u7528\u60c5\u5883<\/th>\n<th data-col-size=\"lg\">Command<\/th>\n<th data-col-size=\"lg\">Expression<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-col-size=\"xs\">\u7368\u7acb\u57f7\u884c<\/td>\n<td data-col-size=\"lg\">\u53ef\u76f4\u63a5\u5728\u547d\u4ee4\u5217\u8f38\u5165\uff1a ? &#8220;Hello&#8221;<\/td>\n<td data-col-size=\"lg\">\u4e0d\u53ef\u76f4\u63a5\u57f7\u884c\uff0c\u5fc5\u9808\u653e\u5728\u6709\u63a5\u6536\u503c\u7684\u6307\u4ee4\u4e2d\uff1a ? UPPER(&#8220;hello&#8221;)<\/td>\n<\/tr>\n<tr>\n<td data-col-size=\"xs\">\u689d\u4ef6\u5f0f\u4e2d<\/td>\n<td data-col-size=\"lg\">IF x &gt; 10 DO something ENDIF<\/td>\n<td data-col-size=\"lg\">IF age &gt;= 18 \u2192 age &gt;= 18 \u662f Expression<\/td>\n<\/tr>\n<tr>\n<td data-col-size=\"xs\">\u8ce6\u503c<\/td>\n<td data-col-size=\"lg\">name = &#8220;John&#8221;\uff08\u7b49\u865f\u662f\u8ce6\u503c\u6307\u4ee4\uff09<\/td>\n<td data-col-size=\"lg\">name = UPPER(first) + &#8221; &#8221; + last \u2192 \u53f3\u908a\u662f Expression<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 dir=\"auto\">3. <strong>\u5178\u578b Command \u7bc4\u4f8b\uff08\u52d5\u4f5c\uff09<\/strong><\/h3>\n<div dir=\"auto\">\n<div data-testid=\"code-block\">\n<div>dbase<\/div>\n<div>\n<div>\n<div><\/div>\n<\/div>\n<\/div>\n<div><code>USE customer<br \/>\nINDEX ON name TO cust_name<br \/>\nGO TOP<br \/>\nLIST name, phone<br \/>\nREPLACE ALL status WITH \"A\" FOR balance &gt; 1000<br \/>\nCLOSE DATABASES<\/code><\/div>\n<div><\/div>\n<div><\/div>\n<\/div>\n<\/div>\n<p dir=\"auto\">\u9019\u4e9b\u90fd\u662f <strong>Command<\/strong>\uff0c\u6703\u300c\u505a\u67d0\u4ef6\u4e8b\u300d\u3002<\/p>\n<hr \/>\n<h3 dir=\"auto\">4. <strong>\u5178\u578b Expression \u7bc4\u4f8b\uff08\u7522\u751f\u503c\uff09<\/strong><\/h3>\n<div dir=\"auto\">\n<div data-testid=\"code-block\">\n<div>dbase<\/div>\n<div>\n<div>\n<div><\/div>\n<\/div>\n<\/div>\n<div><code>? UPPER(TRIM(name)) + \", \" + city<br \/>\n? DTOS(birthdate)<br \/>\n? IIF(balance &gt; 0, \"\u6b20\u6b3e\", \"\u7121\u6b20\u6b3e\")<br \/>\n? YEAR(DATE()) - YEAR(birthdate)<\/code><\/div>\n<div><\/div>\n<div><\/div>\n<\/div>\n<\/div>\n<p dir=\"auto\">\u9019\u4e9b <strong>Expression<\/strong> \u5fc5\u9808\u642d\u914d Command\uff08\u5982 ? \u986f\u793a\u3001=, STORE &#8230; TO, REPLACE &#8230; WITH \u7b49\uff09\u624d\u80fd\u57f7\u884c\u3002<\/p>\n<hr \/>\n<h3 dir=\"auto\">5. <strong>\u5e38\u898b\u6df7\u6dc6\u9ede\u8207\u6f84\u6e05<\/strong><\/h3>\n<div>\n<div>\n<div><\/div>\n<\/div>\n<div dir=\"auto\">\n<div><\/div>\n<table dir=\"auto\">\n<thead>\n<tr>\n<th data-col-size=\"sm\">\u60c5\u5883<\/th>\n<th data-col-size=\"xl\">\u6b63\u78ba\u7528\u6cd5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-col-size=\"sm\">\u60f3\u986f\u793a\u8a08\u7b97\u7d50\u679c<\/td>\n<td data-col-size=\"xl\">? 100 + 200 \u2192 100 + 200 \u662f Expression\uff0c? \u662f Command<\/td>\n<\/tr>\n<tr>\n<td data-col-size=\"sm\">\u689d\u4ef6\u5224\u65b7<\/td>\n<td data-col-size=\"xl\">IF age &gt; 18 \u2192 age &gt; 18 \u662f Expression\uff0cIF&#8230;ENDIF \u662f Command \u7d50\u69cb<\/td>\n<\/tr>\n<tr>\n<td data-col-size=\"sm\">\u6b04\u4f4d\u8ce6\u503c<\/td>\n<td data-col-size=\"xl\">REPLACE age WITH YEAR(DATE()) &#8211; YEAR(birth) \u2192 \u53f3\u908a\u662f Expression<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 dir=\"auto\"><\/h3>\n<h3 dir=\"auto\">. <strong>\u7e3d\u7d50\u8868\u683c<\/strong><\/h3>\n<div>\n<div dir=\"auto\">\n<table dir=\"auto\">\n<thead>\n<tr>\n<th data-col-size=\"sm\">\u7279\u5fb5<\/th>\n<th data-col-size=\"lg\">Command<\/th>\n<th data-col-size=\"lg\">Expression<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-col-size=\"sm\">\u662f\u5426\u53ef\u7368\u7acb\u57f7\u884c<\/td>\n<td data-col-size=\"lg\">&#x2705; \u662f<\/td>\n<td data-col-size=\"lg\">&#x274c; \u5426<\/td>\n<\/tr>\n<tr>\n<td data-col-size=\"sm\">\u662f\u5426\u7522\u751f\u503c<\/td>\n<td data-col-size=\"lg\">&#x274c; \u5426\uff08\u6216\u526f\u4f5c\u7528\uff09<\/td>\n<td data-col-size=\"lg\">&#x2705; \u662f<\/td>\n<\/tr>\n<tr>\n<td data-col-size=\"sm\">\u5e38\u7528\u958b\u982d<\/td>\n<td data-col-size=\"lg\">USE, LIST, REPLACE, DO, IF<\/td>\n<td data-col-size=\"lg\">\u8b8a\u6578\u3001\u5b57\u4e32\u3001\u51fd\u6578\u3001\u904b\u7b97\u5b50<\/td>\n<\/tr>\n<tr>\n<td data-col-size=\"sm\">\u642d\u914d\u4f7f\u7528<\/td>\n<td data-col-size=\"lg\">\u4e3b\u5c0e\u6d41\u7a0b<\/td>\n<td data-col-size=\"lg\">\u63d0\u4f9b\u8cc7\u6599\/\u689d\u4ef6\/\u503c<\/td>\n<\/tr>\n<tr>\n<td data-col-size=\"sm\">\u7bc4\u4f8b\u6307\u4ee4<\/td>\n<td data-col-size=\"lg\">?, REPLACE &#8230; WITH, STORE &#8230; TO<\/td>\n<td data-col-size=\"lg\">\u5fc5\u9808\u653e\u5728 WITH\u3001TO\u3001\u689d\u4ef6\u5f0f\u53f3\u908a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 dBASE 2019\uff08\u6216\u5176\u524d\u8eab\u5982 dBASE PLUS\u3001Visual dBASE \u7b49\uff09\u4e2d\uff0cCommand\uff08 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[2],"tags":[],"class_list":["post-1483","post","type-post","status-publish","format-standard","hentry","category-dbase-problems"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"http:\/\/www.dxQerp.com\/index.php?rest_route=\/wp\/v2\/posts\/1483","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.dxQerp.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.dxQerp.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.dxQerp.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.dxQerp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1483"}],"version-history":[{"count":1,"href":"http:\/\/www.dxQerp.com\/index.php?rest_route=\/wp\/v2\/posts\/1483\/revisions"}],"predecessor-version":[{"id":1484,"href":"http:\/\/www.dxQerp.com\/index.php?rest_route=\/wp\/v2\/posts\/1483\/revisions\/1484"}],"wp:attachment":[{"href":"http:\/\/www.dxQerp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.dxQerp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1483"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.dxQerp.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}