June 22, 2004 at 7:17 am
I have writing a small query and have a quest. I need to use something like the following statement
Select Status From StatusXref Where StatusXref.StatusId = ITRegInfo.Status
I know how to accomplish this using a Join, but this statement is part of a sub select. Is is currently returning
"The column prefix 'ITRegInfo' does not match with a table name or alias name used in the query."
Does anyone know of a way to accomplish this with the use of Joins.
June 22, 2004 at 8:10 am
what you want to achieve ? send the table definition for both Statusxref and ITRegInfo tables.
Assume its something like this...
Select StatusXref.StatusId , ITRegInfo.Status From StatusXref Where StatusXref.StatusId = ITRegInfo.StatusId
define your problem with table definitions, then somebody will be able to help!
Linto
June 22, 2004 at 3:51 pm
Like this???
Select SX.Status
From StatusXref SX
join ITRegInfo ITRI
on SX.StatusId = ITRI.Status
Steve
June 23, 2004 at 1:09 am
Dear Awanvil,
As SEQUEL Terminology Concerns,You can not have any reference to other table unless untill u join the both table.
You can write in this manner....
Select StatusXref .Status
From StatusXref INNER JOIN ITRegInfo
on StatusXref .StatusId = ITRegInfo .Status
Now you check it out ...
Deepak
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply