Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Every time I try to use a calculation in a where clause for an SAP select statement I get an open stream error. Below is the load/select statement that I am issuing. Does anyone know if this works?
LOAD [/BIC/ZBATCHA],
CALDAY,
ISSTOTSTCK,
MATERIAL,
RECTOTSTCK;
SQL SELECT /BIC/ZBATCHA,
CALDAY,
ISSTOTSTCK,
MATERIAL,
RECTOTSTCK
FROM /BIC/AZIC_D0500 WHERE RECTOTSTCK - ISSTOTSTCK <> 0;;
Try:
LOAD [/BIC/ZBATCHA],
CALDAY,
ISSTOTSTCK,
MATERIAL,
RECTOTSTCK;
SQL SELECT /BIC/ZBATCHA,
CALDAY,
ISSTOTSTCK,
MATERIAL,
RECTOTSTCK
FROM [/BIC/AZIC_D0500] WHERE [RECTOTSTCK] - [ISSTOTSTCK] <> 0;
If doesn't work you may have to move your WHERE condition in preload section. Some thing like this:
LOAD [/BIC/ZBATCHA],
CALDAY,
ISSTOTSTCK,
MATERIAL,
RECTOTSTCK
WHERE RECTOTSTCK - ISSTOTSTCK <> 0;
SQL SELECT /BIC/ZBATCHA,
CALDAY,
ISSTOTSTCK,
MATERIAL,
RECTOTSTCK,
FROM [/BIC/AZIC_D0500];
Just putting the fields in brackets does not help.
If I put it in the load statement, wouldn't it still pull all the data? I am working with a table that has 65 million records. 20 million+ of which can be weeded out if I can do the calculation.