{"id":44,"date":"2013-09-15T02:39:12","date_gmt":"2013-09-15T02:39:12","guid":{"rendered":"http:\/\/access-diva.com\/blog\/?p=44"},"modified":"2015-12-30T22:08:34","modified_gmt":"2015-12-31T03:08:34","slug":"update-query-samples","status":"publish","type":"post","link":"https:\/\/access-diva.com\/blog\/?p=44","title":{"rendered":"UPDATE Query Samples"},"content":{"rendered":"<p>Simple UPDATE query\u2026<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\nUPDATE YourTable SET YourTable.YourField1 = &quot;Your Value&quot;;\r\n<\/pre>\n<p>Update a field in your table with values from another field in your table\u2026<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\nUPDATE YourTable SET YourTable.YourField1 = &#x5B;YourField2];\r\n<\/pre>\n<p>Update a field based on a field on your form\u2026<br \/>\n<strong>Note:<\/strong>\u00a0 The form must be open to perform this action!<\/p>\n<p><strong>TEXT<\/strong><\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\nUPDATE YourTable SET YourTable.YourField1 = &quot;YourValue&quot;\r\nWHERE (((YourTable.YourField2)=&#x5B;Forms]!&#x5B;YourFormNameGoesHere]!&#x5B;YourTextBoxOrComboBox]));\r\n<\/pre>\n<p><strong>NUMERIC<\/strong><\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\nUPDATE YourTable SET YourTable.YourField1 = 1234\r\nWHERE (((YourTable.YourField2)=&#x5B;Forms]!&#x5B;YourFormNameGoesHere]!&#x5B;YourTextBoxOrComboBox]));\r\n<\/pre>\n<p>Remember&#8230;\u00a0 Change the names to match your Fields, Tables, Forms, Controls, etc&#8230; to match yours.<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_44\" class=\"pvc_stats all  \" data-element-id=\"44\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/access-diva.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Simple UPDATE query\u2026<\/p>\n<p> UPDATE YourTable SET YourTable.YourField1 = &quot;Your Value&quot;; <\/p>\n<p>Update a field in your table with values from another field in your table\u2026<\/p>\n<p> UPDATE YourTable SET YourTable.YourField1 = &#x5B;YourField2]; <\/p>\n<p>Update a field based on a field on your form\u2026 Note: The form must be open to perform this action!<\/p>\n<p>TEXT<\/p>\n<p> UPDATE YourTable SET YourTable.YourField1 [&#8230;]<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_44\" class=\"pvc_stats all  \" data-element-id=\"44\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/access-diva.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[72,52],"tags":[18],"class_list":["post-44","post","type-post","status-publish","format-standard","hentry","category-queries","category-update","tag-queries","odd"],"a3_pvc":{"activated":true,"total_views":551,"today_views":0},"_links":{"self":[{"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/44","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=44"}],"version-history":[{"count":3,"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/44\/revisions"}],"predecessor-version":[{"id":287,"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/44\/revisions\/287"}],"wp:attachment":[{"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=44"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=44"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=44"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}