{"id":580,"date":"2014-12-03T10:23:56","date_gmt":"2014-12-03T10:23:56","guid":{"rendered":"http:\/\/codethataint.com\/blog\/?p=580"},"modified":"2015-01-20T09:39:33","modified_gmt":"2015-01-20T09:39:33","slug":"580","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/580\/","title":{"rendered":"Simple Oracle Function which Returns Boolean"},"content":{"rendered":"<p><strong>Simple Oracle Function which Returns Yes or No<\/strong><\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nCREATE OR REPLACE FUNCTION isStudentInArmy(p_location  IN VARCHAR(255),\r\n                                           p_age       IN LONG)\r\nRETURN CHAR\r\nIS\r\n   isArmyMen CHAR(1);\r\nBEGIN\r\n  SELECT CASE \r\n          WHEN  BodyType == 'Well Built and Strong' THEN  'Y'\r\n          ELSE 'N'\r\n       END INTO isArmyMen\r\n  FROM tblMens \r\n WHERE Location = p_location AND\r\n       Age      = p_age;\r\n\r\n  RETURN isArmyMen;\r\nEND isStudentInArmy;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Simple Oracle Function which Returns Yes or No CREATE OR REPLACE FUNCTION isStudentInArmy(p_location IN VARCHAR(255), p_age IN LONG) RETURN CHAR IS isArmyMen CHAR(1); BEGIN SELECT CASE WHEN BodyType == &#8216;Well Built and Strong&#8217; THEN &#8216;Y&#8217; ELSE &#8216;N&#8217; END INTO isArmyMen FROM tblMens WHERE Location = p_location AND Age = p_age; RETURN isArmyMen; END isStudentInArmy;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,75],"tags":[],"class_list":["post-580","post","type-post","status-publish","format-standard","hentry","category-oracle-database-2","category-packages-procedures"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/comments?post=580"}],"version-history":[{"count":6,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/580\/revisions"}],"predecessor-version":[{"id":722,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/580\/revisions\/722"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}