Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 moises_vargas
		
			moises_vargas
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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'
);
 
					
				
		
 giovanneb
		
			giovanneb
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
		
			cwolf
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
		
			moises_vargas
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		thank you Christian the query works
