How to find the specific badge id by using the inner join

Thread Solved

Join Date: Jun 2009
Posts: 95
Reputation: gingank is an unknown quantity at this point 
Solved Threads: 0
gingank's Avatar
gingank gingank is offline Offline
Junior Poster in Training

How to find the specific badge id by using the inner join

 
0
  #1
Jul 24th, 2009
Hi guys i got a problem with this i can get data from the table by using sql :-Select * from staff_badgeTracking inner join staff_badgeTrackingNew
On staff_badgeTracking.Badge_ID = staff_badgeTrackingNew.Badge_ID

The point is if i wan to find a specific badge id like 1234 then it will get the data from two table so how to write the code ?

I write like this but it show error


Select * from staff_badgeTracking inner join staff_badgeTrackingNew
On staff_badgeTracking.Badge_ID = staff_badgeTrackingNew.Badge_ID where badge_id = '1234'
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 304
Reputation: aktharshaik is an unknown quantity at this point 
Solved Threads: 37
aktharshaik's Avatar
aktharshaik aktharshaik is offline Offline
Posting Whiz

Re: How to find the specific badge id by using the inner join

 
0
  #2
Jul 24th, 2009
what is the error msg u r getting.
Regards
Shaik Akthar
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 304
Reputation: aktharshaik is an unknown quantity at this point 
Solved Threads: 37
aktharshaik's Avatar
aktharshaik aktharshaik is offline Offline
Posting Whiz

Re: How to find the specific badge id by using the inner join

 
0
  #3
Jul 24th, 2009
if badge_id column a numeric, then omit the quotation marks for '1234'
Regards
Shaik Akthar
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 809
Reputation: vb5prgrmr will become famous soon enough vb5prgrmr will become famous soon enough 
Solved Threads: 147
vb5prgrmr vb5prgrmr is offline Offline
Practically a Posting Shark

Re: How to find the specific badge id by using the inner join

 
0
  #4
Jul 24th, 2009
You may also have to prefix badge id with one of the two table names since you have an inner join on badge id.


Good Luck
If anyone has helped you solve your problem, please mark your thread as solved.

Thanks
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 95
Reputation: gingank is an unknown quantity at this point 
Solved Threads: 0
gingank's Avatar
gingank gingank is offline Offline
Junior Poster in Training

Re: How to find the specific badge id by using the inner join

 
0
  #5
Jul 26th, 2009
Originally Posted by vb5prgrmr View Post
You may also have to prefix badge id with one of the two table names since you have an inner join on badge id.


Good Luck

I don't understand what you said can you write the example for me and correct me on the sql statement
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 809
Reputation: vb5prgrmr will become famous soon enough vb5prgrmr will become famous soon enough 
Solved Threads: 147
vb5prgrmr vb5prgrmr is offline Offline
Practically a Posting Shark

Re: How to find the specific badge id by using the inner join

 
0
  #6
Jul 27th, 2009
WHERE staff_badgeTracking.Badge_ID = 1234



Good Luck
If anyone has helped you solve your problem, please mark your thread as solved.

Thanks
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC