954,160 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

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

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'

gingank
Junior Poster
109 posts since Jun 2009
Reputation Points: 10
Solved Threads: 0
 

what is the error msg u r getting.

aktharshaik
Posting Whiz
316 posts since Aug 2008
Reputation Points: 26
Solved Threads: 40
 

if badge_id column a numeric, then omit the quotation marks for '1234'

aktharshaik
Posting Whiz
316 posts since Aug 2008
Reputation Points: 26
Solved Threads: 40
 

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

vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
 

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

gingank
Junior Poster
109 posts since Jun 2009
Reputation Points: 10
Solved Threads: 0
 

WHERE staff_badgeTracking.Badge_ID = 1234

Good Luck

vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You