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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with SQL Join

Status
Not open for further replies.

JimmyLo

Programmer
Apr 11, 2006
2
FR
I'm not sure what ANSI_SQL is, but this is the only SQL forum I found on Tek Tips. If there is a better forum for this question, please let me know.

Here is my problem. I have two tables. One is called Images and one is called Text and I want to join them. I am calling SQL from an ASP page. The database is a MS Access database. This is the command I use

SELECT * FROM Images, Text WHERE Images.Text = Text.textID AND Images.imgID = 5

I get this error:

Syntax error in FROM clause.
/wages2/getimages.asp, line 16

I don't see anything wrong with my SQL statement. It looks exactly like the one in this tutorial:
I also tried using INNER JOIN, LEFT JOIN, and RIGHT JOIN and none of those worked either. Only thing I can think of is perhaps my SQL is different from the SQL that the tutorial is talking about.

Any help will be greatly appreciated, thanks!

~jimmy.
 


American National Standards Institute (ANSI) SQL is the Standard that all Database vendors try to live up to.

If you write your SQL in accordance with the ANSI standard you 'should' be able to run your SQL on any vendors Database product without having to change it if that vendor supports the ANSI standard.

Each vendor may have their own Extensions or exceptions to the ANSI standard they do or do not support and those issues you need to resolve with the vendor you are using.

There are over 30 different Database Vendor forums on Tek-Tips and if you are looking for the best way to Code something for a specific vendor and you don't care if it is portable among various other Database vendors you can ask your SQL questions in one of those forums.


General database discussion
Centura Software / Gupta : SQLBase
Upright Database Technology: Mimer SQL
T.C.X DataKonsult AB: MySQL
Pervasive: Pervasive.SQL
Pervasive: Btrieve
NCR: Teradata
Sapphire: DataEase
SoftVelocity: Clarion solutions
Computer Associates: Clipper
Inprise (Borland): Visual dBase
Pick Systems: Pick
Inprise (Borland): dBase
Progress Software: PROGRESS
FileMaker Inc.: FileMaker Pro
Unisys DBMS solutions
Computer Associates: Datacom
Computer Associates: IDMS
Computer Associates: Jasmine
Computer Associates: Openingres
Corel: Paradox
Microsoft: SQL Server
IBM: DB2
Microsoft: FoxPro (versions 1 through 2.6)
IBM: Informix Dynamic Server
Microsoft: Access Other topics
Lotus/IBM: Approach
Microsoft: Visual FoxPro (versions 3.0 and higher)
Oracle: Oracle release 5, 6, and 7
Oracle: Oracle release 8 and 8i
Sybase: Adaptive Server
Sybase: SQL Server

 
Read faq220-1073 - What is ANSI SQL? Why This Forum?

You should use forum701 - Microsoft: Access Queries and JET SQL.

I concur with Rudy's comment about the keyword text. I do not use keywords for table or column names. Though brackets work, I dislike using them.

I recommend that you become a Tek-Tips member. Email notification and ease of finding your own posts are just two of the benefits. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Thanks everybody!!! That helps a lot!

~jimmy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top