|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
Hi,
Can someone help me here ! I want to delete a row in a table. The table have 2 primary key. I mean it's 2 foreign key that make 1 primary. I hope you understand what I mean. It's a combination of 2 property to make a primary. It's a program in Vb.Net where I need to delete one row in this table. I am using a SQL request to do it Code:
Delete adresse where (norue = '" + _
OleDataR.Item("norue") + "' and (noreleve = " + _
"(select noreleve from releve where codeprojet = '" + _
NoReleve + "'))
but it's not working ! It's telling me that I can't delete a row by doing a AND ! why ? is there anyother way to do it? I can't delete it by using only 1 property, cause more then 1 row can have the same property. That's why I use 2 foreign key to make the primary key. Can someone help me ? thank you
__________________
|
|
#2
|
|||
|
|||
|
Try deleteing using a sub query
|
|
#3
|
|||
|
|||
|
what do you mean by a sub query ?
I already have one query in another one ? Could you be a little bit more specific ? I really don't understand why it's not working. I have done some test and I can do a select on it but not a delete Code:
select * from adresse where ( norue = '2777' ) and (noreleve = (select noreleve from releve where codeprojet = 't700')) might be the way I use it with vb.net I don't know ! it's just kinda weird. |
|
#4
|
|||
|
|||
|
What SQL program are you using? Oracle right?
|
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Deleting an adress in a table ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|