Subject | Select in 'Computed By' field |
---|---|
Author | Jason Dodson |
Post date | 2005-07-18T16:45:29Z |
Hi all,
Aside from this being pretty unappealing in appearance, I am playing
around with having a calculated field that, more or less, selects a
fields from a stored procedure, that is sure to return only one record.
Ive gotten the syntax down (For whatever reason, you need double parens
around a select statement in the 'computed by' declaration), but I am
still not 100% there. Here is more or less what I have:
Alter Table Table1
Add MyNewField Computed By ((Select Field1 from
MyStoredProcedure(Table1.Field1)));
For a reason unknown to me, I get the error 'Column Unknown
Table1.Field1'. Now I would HOPE that I can access field values of the
current record, like I can WITHOUT a select statement. Is there some
other syntax magic I am missing, or is this a limitation of this
functionality?
Jason
Aside from this being pretty unappealing in appearance, I am playing
around with having a calculated field that, more or less, selects a
fields from a stored procedure, that is sure to return only one record.
Ive gotten the syntax down (For whatever reason, you need double parens
around a select statement in the 'computed by' declaration), but I am
still not 100% there. Here is more or less what I have:
Alter Table Table1
Add MyNewField Computed By ((Select Field1 from
MyStoredProcedure(Table1.Field1)));
For a reason unknown to me, I get the error 'Column Unknown
Table1.Field1'. Now I would HOPE that I can access field values of the
current record, like I can WITHOUT a select statement. Is there some
other syntax magic I am missing, or is this a limitation of this
functionality?
Jason