Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

help in delete

Former Member
0 Likes
694

Hi,

I do this statement and its not working,

what is the way to delete table when subty ne the nuber in brackets?

DELETE t_4000 WHERE subty NOT IN ( 01 , 12 , 11, 16 , 17 , 29).

Regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
676

Hi

try like this



DELETE t_4000 WHERE  subty ne ' 01' and
                                       subty ne  '12'  and
                                       subty ne  '11'  and
                                       subty ne  '16'  and
                                       subty ne  '17'  and
                                       subty ne  '29' ).

Hope it would help you.

Regards,

Venkatram

7 REPLIES 7
Read only

Former Member
0 Likes
676

HI,

try like dis.......

DELETE t_4000 WHERE subty NOT IN ('0001','0012','0011','0016','0017','0029').

Read only

0 Likes
676

Hi Jose

i try like u write and i get error :

Field "('0001','0012','0011','0016','0017','0029')" is unknown. It is

neither in one of the specified tables nor defined by a "DATA"

statement.

Read only

0 Likes
676

leave a space after the '(' and before ')'

Read only

0 Likes
676

Hi,

Seems Where not in ('.....) is allowed only with SELECT statement

code like below...

DELETE t_4000 WHERE  ( subty NE '0001' 
                    or subty NE '0012' 
                    or subty NE '0011' 
                    or subty NE '0016' 
                    or subty NE '0017' 
                    or subty NE '0029' ).

Cheers,

jose.

Edited by: Jose on Mar 19, 2008 9:47 AM

Read only

ak_upadhyay
Contributor
0 Likes
676

Hi,

Check this....

DELETE t_4000 WHERE subty NOT IN ( '01' , '12' , '11', '16' , '17' , '29').

Reward points if useful....

Regards

AK

Read only

Former Member
0 Likes
676

not answerd

Read only

Former Member
0 Likes
677

Hi

try like this



DELETE t_4000 WHERE  subty ne ' 01' and
                                       subty ne  '12'  and
                                       subty ne  '11'  and
                                       subty ne  '16'  and
                                       subty ne  '17'  and
                                       subty ne  '29' ).

Hope it would help you.

Regards,

Venkatram