﻿{"id":149,"date":"2019-11-19T09:53:05","date_gmt":"2019-11-19T01:53:05","guid":{"rendered":"http:\/\/www.linux-dba.com\/?p=149"},"modified":"2020-07-02T16:07:50","modified_gmt":"2020-07-02T08:07:50","slug":"powerbuilder-%e7%b3%bb%e7%bb%9f%e5%87%bd%e6%95%b0%e6%95%b4%e7%90%86%e4%b8%80","status":"publish","type":"post","link":"http:\/\/www.linux-dba.com\/index.php\/2019\/11\/149\/","title":{"rendered":"PowerBuilder \u7cfb\u7edf\u51fd\u6570\u6574\u7406\u4e00"},"content":{"rendered":"<p><strong>1.<\/strong><strong>\u6570\u7ec4\u51fd\u6570<\/strong><\/p>\n<p><strong>1.1 UpperBound(array {,n})<\/strong><\/p>\n<p><strong>1.2 LowerBound(array {,n})<\/strong><\/p>\n<p>\u8fd4\u56de\u503c\uff1along\u3002\u6267\u884c\u6210\u529f\u8fd4\u56deN\u7ef4\u6570\u7ec4\u7684\u4e0a\u754c\/\u4e0b\u754c<\/p>\n<p>&nbsp;<\/p>\n<p><strong>2.blob(<\/strong><strong>\u5927\u4e8c\u8fdb\u5236\u5bf9\u8c61)\u51fd\u6570<\/strong><\/p>\n<p><strong>2.1 Blob(text)<\/strong><\/p>\n<p>\u8fd4\u56de\u503c\uff1ablob\u3002\u6267\u884c\u6210\u529f\u65f6\u8fd4\u56de\u8f6c\u6362\u540e\u7684blob\u7c7b\u578b\u6570\u636e<\/p>\n<p><strong>2.2 BlobEdit(blobvariable,n,data)<\/strong><\/p>\n<p>Blobvariable: blob\u7c7b\u578b\u7684\u521d\u59cb\u5316\u53d8\u91cf\uff0c\u5c06\u5411\u8be5\u53d8\u91cf\u4e2d\u63d2\u5165\u6570\u636e<\/p>\n<p>n: \u6307\u5b9a\u63d2\u5165\u4f4d\u7f6e\uff0c\u6709\u6548\u503c\u4e3a1-4,294,967,295<\/p>\n<p>data: \u8981\u63d2\u5165\u5230blob\u7c7b\u578b\u53d8\u91cf\u4e2d\u7684\u6570\u636e<\/p>\n<p>\u8fd4\u56de\u503c\uff1aUnsigned long\u3002\u6267\u884c\u6210\u529f\u65f6\u8fd4\u56de\u4e0b\u6b21\u53ef\u4ee5\u63d2\u5165\u6570\u636e\u7684\u4f4d\u7f6e\u3002<\/p>\n<p><strong>2.3 BlobMid(data,n {,length})<\/strong><\/p>\n<p>Data: blob\u7c7b\u578b\u7684\u6570\u636e<\/p>\n<p>N: \u6307\u5b9a\u8981\u63d0\u53d6\u6570\u636e\u7684\u8d77\u59cb\u4f4d\u7f6e<\/p>\n<p>Length: \u53ef\u9009\u9879\uff0c\u6307\u5b9a\u8981\u63d0\u53d6\u6570\u636e\u7684\u957f\u5ea6<\/p>\n<p>\u8fd4\u56de\u503c\uff1ablob\u3002\u6267\u884c\u6210\u529f\u65f6\u8fd4\u56de\u6307\u5b9a\u5b57\u8282\u6570\u7684\u6570\u636e<\/p>\n<p><strong>2.4 Len(blob)<\/strong><\/p>\n<p>\u8fd4\u56de\u503c\uff1along\u3002\u6267\u884c\u6210\u529f\u65f6\u8fd4\u56deblob\u53d8\u91cf\u7684\u957f\u5ea6\uff0c\u9519\u8bef\u65f6\u8fd4\u56de-1;\u672a\u8d4b\u503c\u7684blob\u7c7b\u578b\u53d8\u91cf\u7684\u957f\u5ea6\u4e3a0<\/p>\n<p><strong>2.5 String(blob)<\/strong><\/p>\n<p>\u8fd4\u56de\u503c\uff1astring\u3002\u6267\u884c\u6210\u529f\u8fd4\u56de\u8f6c\u6362\u540e\u7684\u6570\u636e\uff0c\u5931\u8d25\u65f6\u8fd4\u56de\u7a7a\u5b57\u7b26\u4e32<\/p>\n<p>&nbsp;<\/p>\n<p><strong>3.<\/strong><strong>\u6570\u636e\u7c7b\u578b\u68c0\u67e5\u4e0e\u8f6c\u6362\u51fd\u6570<\/strong><\/p>\n<p><strong>3.1 Asc(string)<\/strong><\/p>\n<p>\u8fd4\u56de\u503c\uff1ainteger\u3002\u6267\u884c\u6210\u529f\u65f6\u8fd4\u56destring\u53c2\u6570\u7b2c\u4e00\u4e2a\u5b57\u7b26\u7684ASCII\u503c<\/p>\n<p><strong>3.2 Char(n)<\/strong><\/p>\n<p>N: \u5b57\u7b26\u4e32\u3001blob\u53d8\u91cf\u6216\u6574\u6570<\/p>\n<p>\u8fd4\u56de\u503c\uff1achar\u3002\u8fd4\u56de\u53c2\u6570N\u7684\u7b2c\u4e00\u4e2a\u5b57\u7b26<\/p>\n<p><strong>3.3 Dec(stringorblob)<\/strong><\/p>\n<p>\u8fd4\u56de\u503c\uff1adecimal\u3002\u6267\u884c\u6210\u529f\u65f6\u8fd4\u56de\u76f8\u5e94\u7684decimal\u7c7b\u578b\u503c\uff1b\u5f53stringorblob\u4e0d\u662fPB\u6709\u6548\u6570\u636e\u7c7b\u578b\u65f6\u8fd4\u56de0<\/p>\n<p><strong>3.4 Double(stringorblob)<\/strong><\/p>\n<p>\u8fd4\u56de\u503c\uff1aDouble\u3002\u6267\u884c\u6210\u529f\u65f6\u8fd4\u56de\u76f8\u5e94\u7684double\u7c7b\u578b\u503c\uff1b\u5f53stringorblob\u4e0d\u662fPb\u6709\u6548\u6570\u636e\u7c7b\u578b\u65f6\u8fd4\u56de0<\/p>\n<p><strong>3.5 Integer(stringorblob)<\/strong><\/p>\n<p>\u8fd4\u56de\u503c\uff1aInteger\u3002\u6267\u884c\u6210\u529f\u65f6\u8fd4\u56de\u76f8\u5e94\u7684Integer\u7c7b\u578b\u503c\uff1b\u5f53stringorblob\u4e0d\u662fPb\u6709\u6548\u6570\u636e\u7c7b\u578b\u65f6\u8fd4\u56de0<\/p>\n<p><strong>3.6 Long()<\/strong><\/p>\n<p>Long(lowword,highword)<\/p>\n<p>\/\/\u5c06\u4e24\u4e2a\u65e0\u7b26\u53f7\u6574\u6570\u7ec4\u5408\u6210\u4e00\u4e2a\u957f\u6574\u6570<\/p>\n<p>\u8fd4\u56de\u503c\uff1along\u3002\u53d1\u751f\u9519\u8bef\u65f6\u8fd4\u56de-1<\/p>\n<p>Long(stringorblob)<\/p>\n<p>\/\/\u5c06\u5b57\u7b26\u4e32\u6216blob\u503c\u8f6c\u6362\u6210long\u7c7b\u578b\u503c<\/p>\n<p>\u8fd4\u56de\u503c\uff1along\u3002\u6267\u884c\u6210\u529f\u65f6\u8fd4\u56de\u76f8\u5e94\u7684long\u7c7b\u578b\u503c\uff1b\u5f53stringorblob\u4e0d\u662fPb\u6709\u6548\u6570\u636e\u7c7b\u578b\u65f6\u8fd4\u56de0<\/p>\n<p><strong>3.7 Real(stringorblob)<\/strong><\/p>\n<p>\u8fd4\u56de\u503c\uff1aReal\u3002\u6267\u884c\u6210\u529f\u65f6\u8fd4\u56de\u76f8\u5e94\u7684Real\u7c7b\u578b\u503c\uff1b\u5f53stringorblob\u4e0d\u662fPb\u6709\u6548\u6570\u636e\u7c7b\u578b\u65f6\u8fd4\u56de0<\/p>\n<p><strong>3.8 Date()<\/strong><\/p>\n<p>\u8bed\u6cd5\u4e00\uff1aDate(datetime)<\/p>\n<p>\u8bed\u6cd5\u4e8c\uff1aDate(string)<\/p>\n<p>\u8bed\u6cd5\u4e09\uff1aDate(year,month,day)<\/p>\n<p>\u8fd4\u56de\u503c\uff1adate\u3002\u5982\u679c\u53c2\u6570\u4e0d\u662f\u6709\u6548\u7684PB\u6570\u636e\u7c7b\u578b\u65f6\u8fd4\u56de1900-01-01<\/p>\n<p><strong>3.9 DateTime()<\/strong><\/p>\n<p>\u8bed\u6cd5\u4e00\uff1aDateTime(date {,time})<\/p>\n<p>\u8bed\u6cd5\u4e00\uff1aDateTime(blob)<\/p>\n<p>\u8fd4\u56de\u503c\uff1adatetime\u3002<\/p>\n<p><strong>3.10 IsDate(datevalue)<\/strong><\/p>\n<p>\u8fd4\u56de\u503c\uff1aBoolean\u3002\u68c0\u6d4b\u6307\u5b9a\u5b57\u7b26\u4e32\u662f\u5426\u5305\u542b\u6709\u6548\u7684\u65e5\u671f\u3002<\/p>\n<p><strong>3.11 IsNull(any)<\/strong><\/p>\n<p>\u8fd4\u56de\u503c\uff1aBoolean\u3002\u6d4b\u8bd5\u53d8\u91cf\u6216\u8868\u8fbe\u5f0f\u7684\u503c\u662f\u5426\u662fNull<\/p>\n<p><strong>3.12 IsNumber(string)<\/strong><\/p>\n<p>\u8fd4\u56de\u503c\uff1aBoolean\u3002\u6d4b\u8bd5\u5b57\u7b26\u4e32\u662f\u5426\u662f\u6709\u6548\u7684\u6570\u503c<\/p>\n<p><strong>3.13 IsTime(TimeValue)<\/strong><\/p>\n<p>\u8fd4\u56de\u503c\uff1aBoolean\u3002\u6d4b\u8bd5\u5b57\u7b26\u4e32\u662f\u5426\u662f\u6709\u6548\u7684\u65f6\u95f4<\/p>\n<p><strong>3.14 String(data{,format})<\/strong><\/p>\n<p>\u8fd4\u56de\u503c\uff1aString\u3002\u6309\u6307\u5b9a\u683c\u5f0f\u5c06\u6570\u636e\u8f6c\u6362\u6210\u5b57\u7b26\u4e32<\/p>\n<p><strong>3.15 Time()<\/strong><\/p>\n<p>\u8bed\u6cd5\u4e00\uff1aTime(datetime)<\/p>\n<p>\u8bed\u6cd5\u4e8c\uff1aTime(string)<\/p>\n<p>\u8bed\u6cd5\u4e09\uff1aTime(hour,minute,second {,microsecond})<\/p>\n<p>\u8fd4\u56de\u503c\uff1atime\u3002\u524d\u4e24\u79cd\u5f53\u53c2\u6570\u4e0d\u662f\u6709\u6548\u7684PB\u6570\u636e\u7c7b\u578b\u65f6\u8fd4\u56de00:00:00:0000\uff1b\u7b2c\u4e09\u79cd\u5f53\u53c2\u6570\u662f\u65e0\u6548\u503c\u65f6\u8fd4\u56denull<\/p>\n<p>&nbsp;<\/p>\n<p><strong>4.<\/strong><strong>\u65e5\u671f\u65f6\u95f4\u51fd\u6570<\/strong><\/p>\n<table width=\"624\" border=\"0\">\n<tbody>\n<tr>\n<td width=\"204\">\u51fd\u6570<\/td>\n<td width=\"91\">\u8fd4\u56de\u503c<\/td>\n<td width=\"329\">\u529f\u80fd<\/td>\n<\/tr>\n<tr>\n<td width=\"204\">Day(date)<\/td>\n<td width=\"91\">Integer<\/td>\n<td width=\"329\">\u5f97\u5230\u65e5\u671f\u578b\u6570\u636e\u4e2d\u7684\u53f7\u6570<\/td>\n<\/tr>\n<tr>\n<td width=\"204\">DayName(date)<\/td>\n<td width=\"91\">String<\/td>\n<td width=\"329\">\u5f97\u5230\u4e00\u5468\u4e2d\u7684\u661f\u671f\u51e0(Sunday\u00b7\u00b7\u00b7)<\/td>\n<\/tr>\n<tr>\n<td width=\"204\">DayNumber(date)<\/td>\n<td width=\"91\">Integer<\/td>\n<td width=\"329\">\u5f97\u5230\u4e00\u661f\u671f\u4e2d\u7684\u7b2c\u51e0\u5929\uff081-7\uff09<\/td>\n<\/tr>\n<tr>\n<td width=\"204\">DayAfter(date1,date2)<\/td>\n<td width=\"91\">Long<\/td>\n<td width=\"329\">\u5f97\u5230\u4e24\u4e2a\u65e5\u671f\u95f4\u7684\u5929\u6570<\/td>\n<\/tr>\n<tr>\n<td width=\"204\">Hour(time)<\/td>\n<td width=\"91\">Integer<\/td>\n<td width=\"329\">\u5f97\u5230\u65f6\u95f4\u503c\u4e2d\u7684\u5c0f\u65f6\uff0c24\u65f6\u5236<\/td>\n<\/tr>\n<tr>\n<td width=\"204\">Minute(time)<\/td>\n<td width=\"91\">Integer<\/td>\n<td width=\"329\">\u5f97\u5230\u65f6\u95f4\u4e2d\u7684\u5206\u949f<\/td>\n<\/tr>\n<tr>\n<td width=\"204\">Month(date)<\/td>\n<td width=\"91\">Integer<\/td>\n<td width=\"329\">\u5f97\u5230\u65e5\u671f\u503c\u4e2d\u7684\u6708\u4efd<\/td>\n<\/tr>\n<tr>\n<td width=\"204\">Now(time)<\/td>\n<td width=\"91\">Time<\/td>\n<td width=\"329\">\u5f97\u5230\u5ba2\u6237\u673a\u5f53\u524d\u7cfb\u7edf\u65f6\u95f4<\/td>\n<\/tr>\n<tr>\n<td width=\"204\">RelativeDate(date,n)<\/td>\n<td width=\"91\">Date<\/td>\n<td width=\"329\">\u5f97\u5230\u6307\u5b9a\u65e5\u671f\u524d\/\u540e\u591a\u5c11\u5929\u7684\u65e5\u671f<\/td>\n<\/tr>\n<tr>\n<td width=\"204\">RelativeTime(time,n)<\/td>\n<td width=\"91\">Time<\/td>\n<td width=\"329\">\u5f97\u5230\u6307\u5b9a\u65f6\u95f4\u524d\/\u540e\u591a\u5c11\u79d2\u7684\u65f6\u95f4<\/td>\n<\/tr>\n<tr>\n<td width=\"204\">Second(time)<\/td>\n<td width=\"91\">Integer<\/td>\n<td width=\"329\">\u5f97\u5230\u65f6\u95f4\u503c\u4e2d\u7684\u79d2<\/td>\n<\/tr>\n<tr>\n<td width=\"204\">Today()<\/td>\n<td width=\"91\">Date<\/td>\n<td width=\"329\">\u5f97\u5230\u7cfb\u7edf\u65e5\u671f\u548c\u65f6\u95f4<\/td>\n<\/tr>\n<tr>\n<td width=\"204\">Year(date)<\/td>\n<td width=\"91\">Integer<\/td>\n<td width=\"329\">\u5f97\u5230\u65e5\u671f\u503c\u4e2d\u7684\u5e74\u5ea6(1000-3000)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u6574\u7406\u65f6\u95f4\uff1a2019-11-19 09:51:00<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: right;\">\u65f6\u95f4\uff1a2019-11-19 09:52:00<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u6570\u7ec4\u51fd\u6570 1.1 UpperBound(array {,n}) 1.2 LowerBound(array  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[39],"tags":[16,5,19],"_links":{"self":[{"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/posts\/149"}],"collection":[{"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/comments?post=149"}],"version-history":[{"count":1,"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/posts\/149\/revisions"}],"predecessor-version":[{"id":285,"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/posts\/149\/revisions\/285"}],"wp:attachment":[{"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/media?parent=149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/categories?post=149"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/tags?post=149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}