SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL 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 ASP Free Forums Sponsor:
  #1  
Old August 15th, 2004, 01:22 AM
Shams Al Shams Al is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 25 Shams Al User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
reply to a dumb person for a change

whats the difference b/w "inner join" and "outer join"?

is anything wrong with the following code?
code:

PHP Code:
 ALTER PROCEDURE selectjobsearch
(
@
emuser varchar(20)=null,
@
emcity varchar (50)=null,
@
emprovince char(2)=null,
@
emcountry char (2)=null,
@
joposted smalldatetime=null,
@
jotitle varchar(100)=null,
@
jodetails varchar(4000),
@
category varchar(50)=null,
@
industry varchar(50)=null
)
AS
SELECT Jobs.jidEmployer.emnameJobs.jotitleJobs.jocutoffIndustries.industry
FROM 
(Industries INNER JOIN (Employer INNER JOIN Jobs ON Employer.emuser Jobs.emuserON Industries.indid Jobs.indidINNER JOIN (Categories INNER JOIN JobCat ON
Categories
.catid JobCat.catidON Jobs.jid JobCat.jid
Where Employer
.emuser=@emuser 
or Employer.emcity=@emcity 
or Employer.emprovince=@emprovince 
or Employer.emcountry=@emcountry 
or Jobs.joposted=@joposted 
or Jobs.jotitle like '%' + @jotitle '%' 
or Jobs.jodetails like '%' + @jodetails '%' 
or Categories.category=@category 
or Industries.industry=@industry 


i m trying to search for some job detials.
when i run the SQL command i dont get any records in return
what did i do wrong?

Reply With Quote
  #2  
Old August 15th, 2004, 07:00 AM
Kris_Vanherck's Avatar
Kris_Vanherck Kris_Vanherck is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Belgium, Antwerp
Posts: 177 Kris_Vanherck User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 sec
Reputation Power: 5
http://www.w3schools.com/sql/sql_join.asp

you can't use the same compare operator for normal values and null values
= for normal values
IS for NULL

Reply With Quote
  #3  
Old August 16th, 2004, 12:45 AM
Shams Al Shams Al is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 25 Shams Al User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
the IS NULL i think works on vb.net
but in SQL =null works i think
cause when i put is null i get error

Reply With Quote
  #4  
Old August 20th, 2004, 08:26 PM
ProEdge's Avatar
ProEdge ProEdge is offline
Contributing User
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Jan 2004
Location: Somewhere I belong
Posts: 1,565 ProEdge User rank is Sergeant Major (2000 - 5000 Reputation Level)ProEdge User rank is Sergeant Major (2000 - 5000 Reputation Level)ProEdge User rank is Sergeant Major (2000 - 5000 Reputation Level)ProEdge User rank is Sergeant Major (2000 - 5000 Reputation Level)ProEdge User rank is Sergeant Major (2000 - 5000 Reputation Level)ProEdge User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 17 h 7 m 15 sec
Reputation Power: 39
The inner joing returns all rows from both tables where there is a match. Outer join return all rows from at least one of the tables or views mentioned in the "from" clause, as long as those rows meet any "where" or "having" search conditions.

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > reply to a dumb person for a change


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 6 hosted by Hostway
Stay green...Green IT