‎2017 Jan 23 11:01 AM

‎2017 Jan 24 11:59 AM
Hello Duraisamy,
as far as I can see is your SQL statement correct.
I check it with this statement on the table SFLIGHT:
CARRID = 'AA' AND (PLANETYPE LIKE '%-%' AND PLANETYPE NOT LIKE '%300%')Plantypes are 747-400 and A310-300. With this statement I expect only the flights with 747-400 planetype, and that is what I get.

Cheers
Stefan
‎2017 Jan 23 11:39 AM
Hello Duraisamey,
try
oRow.Value(1) = "WERKS = '5000' AND BEDNR LIKE '%TEST%'"Let us know your result.
Cheers
Stefan
‎2017 Jan 23 12:08 PM
Hello Stefan....
Thank you so mush for your reply.. Its working correctly.
If you do not mind , I have one more questions.
If I want to exclude some Item , how should I write ? . I want to include Which has TA17 and Want to exclude which has BADTA17

‎2017 Jan 24 11:59 AM
Hello Duraisamy,
as far as I can see is your SQL statement correct.
I check it with this statement on the table SFLIGHT:
CARRID = 'AA' AND (PLANETYPE LIKE '%-%' AND PLANETYPE NOT LIKE '%300%')Plantypes are 747-400 and A310-300. With this statement I expect only the flights with 747-400 planetype, and that is what I get.

Cheers
Stefan
‎2017 Jan 25 4:10 AM
Hi Stefan,
Thanks for your reply.. Sorry its not working. I am using Visual basic (VB) to download data from SAP table. First statement is working correctly. second is not working.

‎2017 Jan 25 7:33 AM
Hello Duraisamy,
sure it is not working because the length of your line is to long.
This line is okay, because it is < 72 characters:
WERKS = '5000' AND LOEKZ <> 'X' AND BEDNR LIKE '%TA17%'But this line is not okay, it is > 72 characters:
WERKS = '5000' AND LOEKZ <> 'X' AND (BEDNR LIKE '%TA17%' AND BEDNR NOT LIKE '%TG%')OPTIONS is from type SO_TEXT072 (CHAR with a length of 72).

Add a new line.

Cheers
Stefan
‎2017 Jan 25 10:09 AM
Hello Stefan, I am getting syntax error. when split it to two lines

‎2017 Jan 26 6:45 AM
Hello Duraisamy,
try
Set oRow = oTOPT.Rows.Add
oRow.Value(1) = "WERKS = '5000' AND LOEKZ <> 'X' AND "
Set oRow = oTOPT.Rows.Add
oRow.Value(1) = "(BEDNR LIKE '%TA17%' AND BEDNR NOT LIKE '%TG%')"
Cheers
Stefan
‎2017 Jan 29 11:27 AM
hello Stefan.. Thank you so much.. Its working Correctly.