Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 my delete query not work

Author  Topic 

wawansur
Starting Member

44 Posts

Posted - 2009-07-27 : 04:18:44

I Want delete the data with FCOA--> Null

I Run this query but not work

Delete From COA_R Where FCOA=Null
or
delete From COA_R Where FCOA NOT IN (Select FCOA From COA)

quote:

________________________________________________
Table: name COA_R
________________________________________________
FCOA |FYear |Fmonth |FNominal
________________________________________________
5500-002.02 | 2009 |5 |1102918.0000
7300-002 | 2009 |5 |-23375.0000
3100-003 | 2009 |5 |-225000.0000
2106-001 | 2009 |5 |-255349463.0000
2109-002 | 2009 |5 |5717082.0000
1102-001 | 2009 |5 |21892363.7500
3400-01 | 2009 |3 |143271170.0000
5500-003.02 | 2009 |5 |433025.0000
2109-003 | 2009 |5 |7173.0000
1103-304.1 | 2009 |5 |2920000.0000
5400-004.01 | 2009 |5 |2413715.0000
NULL | 2009 |5 |-200000.0000
NULL | 2009 |5 |-200000.0000
NULL | 2009 |5 |200000.0000
NULL | 2009 |5 |200000.0000
NULL | 2009 |5 |-200000.0000
NULL | 2009 |5 |200000.0000
NULL | 2009 |5 |200000.0000
2101-300 | 2009 |5 |.0000
1101-001 | 2009 |6 |103332515.0000
2102-001 | 2009 |6 |-339250000.0000
7100-001.01 | 2009 |6 |-2527978.0500
5500-001.01 | 2009 |6 |1536500.0000
1103-304.2 | 2009 |6 |44391496.0000
5500-005.01 | 2009 |6 |98500.0000
__________________________________________________

__________________________________________________
Table: COA
__________________________________________________
FCOA
__________________________________________________
5500-002.02
7300-002
3100-003
2106-001
2109-002
1102-001
3400-01
5500-003.02
2109-003
1103-304.1
5400-004.01
2101-300
1101-001
2102-001
7100-001.01
5500-001.01
1103-304.2
5500-005.01
___________________________________________________


.

Rgds

senthil_nagore
Master Smack Fu Yak Hacker

1007 Posts

Posted - 2009-07-27 : 04:20:05
Try this

Delete From COA_R Where FCOA is Null

Senthil.C
------------------------------------------------------
[Microsoft][ODBC SQL Server Driver]Operation canceled

http://senthilnagore.blogspot.com/
Go to Top of Page

wawansur
Starting Member

44 Posts

Posted - 2009-07-27 : 04:24:07
thx bro


its work

Rgds
Go to Top of Page

senthil_nagore
Master Smack Fu Yak Hacker

1007 Posts

Posted - 2009-07-27 : 04:27:26
Ya welcome.

Senthil.C
------------------------------------------------------
[Microsoft][ODBC SQL Server Driver]Operation canceled

http://senthilnagore.blogspot.com/
Go to Top of Page
   

- Advertisement -