cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to write select query in BW transformations

Vincent801
Explorer
0 Kudos

Dear Experts,

I want to display current date in one of the field routine of the BW transformations. I wrote the below code in field routine and getting the error message as
Incorrect syntax error near :CUR_DATE.

outtab = select (select current_date into CUR_DATE from dummy AS "CUR_DATE"),
"RECORD",
"SQL__PROCEDURE__SOURCE__RECORD"
from :INTAB;

Please guide me how to solve this error.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Torsten_
Advisor
Advisor

Hi,

try this without INTO and the alias is related to the column not to the table (dummy):

 

outtab = 
  select (select current_date from dummy) AS "CUR_DATE",
         "RECORD",
         "SQL__PROCEDURE__SOURCE__RECORD"
    from :INTAB;

 

Torsten

Vincent801
Explorer
0 Kudos
Thank you very much for the quick answer Torsten. It is working perfect as expected.

Answers (0)