Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

classic asp inner join - 2 tables - will not work Sql Svr 2000

Status
Not open for further replies.

VBVines

MIS
Jun 11, 1999
98
US
I have tried a bunch of stuff on this one including putting the table names in with the field names most recently. I can do a select statement and get values from one table but when I try to join two I get nothing. Please let me know if you see something I don't, thanks in advance.

sql="SELECT Track_Violations.violation_ID,Track_Violations.date, Track_Violations.inspector, "
sql= sql & " Track_Violations.narrative, Track_Violations.venue_response, "
sql= sql & " Venues.Venue_ID, Venues.venue_name "
sql= sql & " FROM Track_Violations INNER JOIN Venues "
sql= sql & " On Track_Violations.Venue_ID = Venues.Venue_ID "
sql= sql & " Where Track_Violations.Violation_ID = '" & valVid & "'"

aspvbwannab
 
Is Violation_ID a textfield? If it is numeric value then get rid of the surrounding ' around valVid.


in cases like this a response.write the sql statement (followed by response.end). I can see the final sql, and copy /paste the statement into de SQL enterprise manager...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top