This topic is locked

Joint table

11/4/2003 9:24:01 AM
ASPRunnerPro General questions
wingchan author

i would like to know how to use joint table in the SQL query manually .. basically I 'm having two tables, one is a lookup table for the mall's name one is the tenants detail in the mall. I want to display the mall's name in the tenant's list view.. the sql will be similar to
SELECT a.tenant_id, b.mall_name, a.cat_id, a.tenant_name, a.tenant_location From tb_tenant a, tb_mall b where a.mall_id = b.id
it seems not working ... how ? please help, many thanks.
-Wing

wingchan author 11/4/2003

i have also tried below sql
select a.id,

b.name,

a.name as mall_name,

a.location

From tb_tenant a

inner join tb_mall b

on a.mall_id=b.id
still doesn't work .. it seems it can retrieve the type of "mall_name" ... it returns

DATABASEIMAGE## ##/DATABASEIMAGE## ##FILEIMAGE## ##/FILEIMAGE## ##TEXTFIELD## ##BSTART## ##ISTART## MS ##IEND## ##BEND## ##/TEXTFIELD##



in that column, please help, thanks.

Sergey Kornilov admin 11/5/2003

Wing,
Please tell me what exactly is happening. Do you see any error messages?

"It doesn't work" don't tell me anything.
Best regards,

Sergey Kornilov