Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
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:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old April 13th, 2004, 03:12 PM
pumpkin head pumpkin head is offline
what do I know about diamonds?
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2003
Location: ON, Canada
Posts: 950 pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)  Folding Points: 51652 Folding Title: Beginner FolderFolding Points: 51652 Folding Title: Beginner FolderFolding Points: 51652 Folding Title: Beginner Folder
Time spent in forums: 1 Week 1 Day 23 m 45 sec
Reputation Power: 168
oracle, stored proceedures, PL/sql query question

Hey everybody, i've got a bit of a problem, i'm trying to write an sql statement in pl/sql stored proceedure that gets a variable passed to it from an asp page(that part works). and i'm having trouble figureing out the best way(well really a working way) to write the sql that i need.

i have 2 tables...

empl has data like employee_num, Skill_No
skills has... skill_no, short_desc, long_desc

and what i want to do is select all the rows from skills where the skill_no isnt found in the employee table with the employee_num from the asp page.

so if we have data like this

empl table
1 | 1
1 | 2
2 | 2
2 | 3
3 | 1
3 | 4

skills table
1 | skill one
2 | skill 2
3 | skill 3
4 | skill 4

and the asp page passes '3' it would give me the info from the skills table for skill 2 and 3.

i'm thinking this SHOULD be simple, but it's been a long day and my brain isnt working properly anymore

thanks
Patricia
__________________


Reply With Quote
  #2  
Old April 14th, 2004, 09:04 AM
pumpkin head pumpkin head is offline
what do I know about diamonds?
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2003
Location: ON, Canada
Posts: 950 pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)pumpkin head User rank is First Lieutenant (10000 - 20000 Reputation Level)  Folding Points: 51652 Folding Title: Beginner FolderFolding Points: 51652 Folding Title: Beginner FolderFolding Points: 51652 Folding Title: Beginner Folder
Time spent in forums: 1 Week 1 Day 23 m 45 sec
Reputation Power: 168
i figured it out, i knew it was simple. in case someone else has the same sillly brain lapse.... heres what you gotta do...

strsql := 'select sk.skill_no, sk.short_desc sk.long_desc from skills sk where sk.skill_no not in (select em.skill_no from empl em where em.empl_no = ' || empl_no_in) ;

where empl_no_is is the employee number from the asp page.

its so simple, i don't know why i didnt think of it. thanks for look ppl

Patricia

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > oracle, stored proceedures, PL/sql query question


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway