Needed urgent [message #25959] |
Wed, 28 May 2003 09:56 |
Cool
Messages: 2 Registered: February 2001
|
Junior Member |
|
|
Here is the problem
Accout Table
AcctiD ColId FieldName
101 Col1 A
101 Col2 B
101 Col3 C
101 Col4 D
101 Col5 E
Entity Table
AcctiD EntityID Col1 Col2 Col3 Col4 Col5
101 1001 v1 v2 v3 v4 v5
101 1002 v6 v7 v8 v9 v10
101 1003 v11 v12 v13 v14 v15
101 1004 v16 v17 v18 v19 v20
101 1005 v22 v23 v24 v25 v26
Now I know the AcctId, EntityID and FieldName I want the value
Say AcctID=101
EntityID=1001
FieldName=A
Value= ????
First I will get the ColId from Account Table
select result of first table from Entity Table where AcctId=101 and EntityId=1001
I want this in one query. Is it possible ????
|
|
|
Re: Needed urgent [message #25962 is a reply to message #25959] |
Wed, 28 May 2003 15:19 |
Sunny
Messages: 25 Registered: November 2001
|
Junior Member |
|
|
select a.acctid, b.entityid, a.fieldname from account a, entity b
where a. colid='COL1' and a.acctid=b.acctid and b.entityid='1001';
|
|
|