title: "DAL exception occured" error when using SAP B1 query to generate number in Produmex
body: <p>I have defined already written Batch Number generation query in SAP B1, but as we use HANA database, I have converted it.</p>
  
  <p>At first, query looked like this:</p>
  
  <p>SELECT T0.[CardCode] + '-' + CONVERT(varchar, GETDATE(), 112) AS 'BXBATNUM' 
  FROM OPOR T0 WHERE T0.[DocEntry] = [%4] </p>
  
  <p>then, I converted it to HANA syntax</p>
  
  <p>SELECT T0."CardCode" || '-' || cast(current_date as varchar) || '/' || cast (current_time as varchar)  AS "BXBATNUM" 
  FROM OPOR T0 WHERE T0."DocEntry" = [%4] </p>
  
  <p>P.S I Also get this error on different screen:</p>
  
  <p>"DAL Exception occured ---> System.Data.Odbc.OdbcException: ERROR [S1000] [SAP AG][LIBODBCHDB32 DLL][HDBODBC32] General error;260 invalid column name: current_date: line 1 col 39 (at pos 38)"</p>
  
  <p>When I am trying to generate number with this query in another software called "Produmex Scan" - I get "DAL exception occured" error.</p>
  
  <p>What can be done in this matter?</p>
  
  <p>Thanks.</p>