I am trying to do with pervasive sql somehting like this,
basically if it a nested subquery in a case. I can do this in MSSQL but pervasive is trickier.
select "Date","FNAME","LASTNAME","ID",select case "ID when
10 then
(select "altid" from "system")
else
"ID"
end select
as "DAYID"
from "Account"