cancel
Showing results for 
Search instead for 
Did you mean: 

SQL SCRIPT based view error

KulDeepJain
Active Participant
0 Kudos

Hi,

I am just creating simple sql script based view and getting error.

If someone can tell where is the error, please.

below is the code

/********* Begin Procedure Script ************/

BEGIN

  var_out = select bukrs, bstyp, bsart, lifnr, waers, count(ebeln) as order_count, zbd3t,

  from "HANAU"."EKKO"

  group by bukrs, bstyp, bsart, lifnr, waers;

END /********* End Procedure Script ************/

Screens are attached for column and semantics.

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor
0 Kudos

It would always be great to add the error information, instead of just saying "getting an error" .

What can be seen in your coding is, that you have a comma at the end of your field list (behind zbd3t), which is errorneous at that position.

KulDeepJain
Active Participant
0 Kudos

Thanks Florian,

I have correct code as your pointing but still error:

Here is the error message: not able to understand still.

pfefferf
Active Contributor
0 Kudos

No, you don't have corrected the error I mentioned. There is still the additional invalid comma in your query.

KulDeepJain
Active Participant
0 Kudos

Thanks Florian for your constant support.

I have corrected the error. below is the code change I have applied after so many tries.


/********* Begin Procedure Script ************/

BEGIN

          var_out = select bukrs, bstyp, bsart, lifnr, waers, count(ebeln) as ORDER_COUNT, SUM(zbd3t)           AS ZBD3T

          from "_SYS_BIC"."kul_package/ZAV_EKKO"

          group by bukrs, bstyp, bsart, lifnr, waers;

END /********* End Procedure Script ************/

Answers (0)