Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 25th, 2003, 04:02 PM
Watever Watever is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Montreal, Canada
Posts: 486 Watever User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 20 sec
Reputation Power: 10
Question Deleting an adress in a table ?

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
__________________

Reply With Quote
  #2  
Old September 25th, 2003, 11:34 PM
Jimdogee Jimdogee is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Brick City, NJ, USA
Posts: 11 Jimdogee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to Jimdogee Send a message via Yahoo to Jimdogee
Try deleteing using a sub query

Reply With Quote
  #3  
Old September 29th, 2003, 08:40 AM
Watever Watever is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Montreal, Canada
Posts: 486 Watever User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 20 sec
Reputation Power: 10
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.

Reply With Quote
  #4  
Old September 30th, 2003, 09:16 PM
Jimdogee Jimdogee is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Brick City, NJ, USA
Posts: 11 Jimdogee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to Jimdogee Send a message via Yahoo to Jimdogee
What SQL program are you using? Oracle right?

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Deleting an adress in a table ?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap