title: Converting PBSELECT to standard SQL
body: <p>I am trying to convert PowerBuilder stuff(containing PBSELECT statement) to java.
  I am pretty comfortable to other stuff except PBSELECT statement within it.</p>
  
  <p>I want to convert below PBSELECT statement to standard SQL formate.</p>
  
  <pre><code>PBSELECT( VERSION(400) 
  TABLE(NAME="table_barcode" )  
  TABLE(NAME="table_barcode_attrib_map" )  
  TABLE(NAME="table_barcode_attribute" ) 
  COLUMN(NAME="table_barcode.label_name") 
  COMPUTE(NAME="IsNull(table_barcode_attrib_map.value,0) pacmed_valid")    
  JOIN (LEFT="table_barcode.barcode_id"    OP ="=" RIGHT="table_barcode_attrib_map.barcode_id"    OUTER1 ="table_barcode.barcode_id" )    
  JOIN (LEFT="table_barcode_attrib_map.attribute_id"    OP ="=" RIGHT="table_barcode_attribute.attribute_id"    OUTER1 ="table_barcode_attrib_map.attribute_id" ) 
  WHERE(    EXP1 ="( ~~"table_barcode~~".~~"barcode_id~~""   OP ="="    EXP2 =":as_barcode_id )"    LOGIC ="and" ) 
  WHERE(    EXP1 ="table_barcode_attribute.attribute_name"   OP ="="    EXP2 ="'PACMED VALID FLAG'" ) ) 
  ARG(NAME = "as_barcode_id" TYPE = string)
  </code></pre>
  
  <p>within PBSELECT statement, i am not able understand JOIN clause with OUTER1 and first WHERE containing ~~" pattern.</p>
  
  <p>Please help me converting PBSELECT to standard SQL. Any help highly appreciated. </p>