Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

recordset help!

Community Beginner ,
Jun 28, 2007 Jun 28, 2007
Hi to all! I'm sort of a newbie in databases so I'm facing this problem.
I got these tables in access database :
tblNames ---------------------------- tblDebts
namesID ----------------------------- debtsID
name ---------------------------------- namesID
surname------------------------------- amount

So, the namesID and namesID are related one to many relation.
What I want to do is in my debts dynamic table in dreamweaver to show the debts but instead of the numeric values of namesID column to show actual name and surname from names table. I know this has some stupid and easy solution but you know me the newbie lost in SQL :)
Please anyone can help? It's urgent!!
Thanks in advance !
TOPICS
Server side applications
291
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 28, 2007 Jun 28, 2007
LATEST
Use a join statement, something like this:
SELECT debts.nameID, debts.amount, (whatever the other columns in debts you need are), names.name, names.surname FROM debts JOIN names ON names.ID = debts.nameID
This will join the columns with the same numeric nameID from each table you have to use the advanced dialog when making the sql statement and be sure to define your variable as the proper type that matches db column types( numeric, text, date ect)
Look at these:
http://www.w3schools.com/sql/sql_join.asp

http://msdn2.microsoft.com/en-us/library/bb208854.aspx
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines