Quantcast
Channel: SCN : Unanswered Discussions - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 5115

Query with a bad syntax works, but with correct syntax fails. This occurs in a Calculation View.

$
0
0

Hi.

 

I have a very strange case here and I hope you can help me, please.

 

I have a calculation view where I use a UNION node to combine 3 analytic views; In each one of them, I have an inner join between a table and 1 attribute view.

Everything works fine, but just a few hours ago we start noticing some strange behaviour.

 

For example, we have this:

 

SELECT TIPO, ESTADO, TIPO_CORREO, TIPO_TELEFONO, TIPO_DIRECCION, CONT
FROM "_SYS_BIC"."BUCDWREPORTE/CV_SK"
WHERE ESTADO = 'AG AGUASCALIENTES'

and then the resultset is

 

resultEstado1.png

 

there are 3 results.

 

I've tried with these different queries, without any lucky nor different resultset:

 

SELECT TIPO, ESTADO, TIPO_CORREO, TIPO_TELEFONO, TIPO_DIRECCION, CONT FROM (  SELECT TIPO, ESTADO, TIPO_CORREO, TIPO_TELEFONO, TIPO_DIRECCION, CONT  FROM "_SYS_BIC"."BUCDWREPORTE/CV_SK"  WHERE ESTADO = 'AG AGUASCALIENTES'
)
WHERE ESTADO = 'AG AGUASCALIENTES'
SELECT TIPO, ESTADO, TIPO_CORREO, TIPO_TELEFONO, TIPO_DIRECCION, CONT FROM (  SELECT *  FROM "_SYS_BIC"."BUCDWREPORTE/CV_SK"  WHERE ESTADO = 'AG AGUASCALIENTES'
)
WHERE ESTADO = 'AG AGUASCALIENTES'

Still having the 3 different values in ESTADO.

 

Then...

When I run the first query with a syntax error, i.e. without a comma in the column names, I have the desired resultset!

 

resultEstado2.png

 

What happens here?

 

I've tried in different HANA Studio versions: 95, 93, 85 with the same behaviour.

In this case, SAP HANA rev. is 85.


Viewing all articles
Browse latest Browse all 5115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>