Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
moises_vargas
Contributor
Contributor

SAP Query whit two tables

Good day, I can not find why the query does not work I'm testing it in two ways but it does not achieve the extraction,

it just says General Script Error

any idea that I'm doing wrong, thanks so much

query_1:

SELECT

               EQUI.SERNR

FROM

             EQUI

,            EQBS

WHERE

               EQUI.EQUNR = EQBS.EQUNR

               AND EQBS.B_WERK <> '8054';

query_2:

SQL SUBSELECT

                           A.EQUNR

,       FROM

                           EQUI A

        WHERE

                           A.SERNR IN (

                                                     SELECT

                                                              EQUI.SERNR

                                                     FROM

                                                              EQUI

                                                    ,          EQBS

                                                    WHERE

                                                               EQUI.EQUNR = EQBS.EQUNR

                                                               AND EQBS.B_WERK <> '8054'

                                                 );

3 Replies
giovanneb
Creator II
Creator II

Hi, where are you pointing the database? I did not find it in your script

Are you making the connection to SAP?

FROM

                                                              ***database***.EQUI

                                                    ,         ***database***.EQBS


Best reguards



cwolf
Creator III
Creator III

SAP sql is not like standard sql.

Try:

SELECT

EQUI~EQUNR,

EQUI~SERNR

FROM

EQUI join EQBS on EQBS~EQUNR = EQUI~EQUNR

WHERE EQBS~B_WERK <> '8054';

-Christian

moises_vargas
Contributor
Contributor
Author

thank you Christian the query works