July 26, 2004 at 10:09 am
How can I put a formula in field defination using enterprise manage so that the data entered by user is converted to uppercase
July 26, 2004 at 10:44 am
You could use a trigger to force it.
create trigger mytrig on Mytable for insert, update as
update mytable
set myfield = upper(myfield)
from inserted i
where i.pk = mytable.pk
July 26, 2004 at 11:41 am
If possible I want to use formula property of field to achieve the same.
Thanks for the reply.
July 26, 2004 at 1:43 pm
Don't know how to do it in field def. Why not write the code to always UPPER(textbox.value)?????
Good Hunting!
AJ Ahrens
webmaster@kritter.net
July 26, 2004 at 2:38 pm
As I just started using Sql Server I want to use as much option as possible in Sql Server. I can do it in Front End but that would leave me without knowing the use of formula property in Filed Defination While using Sql Server.
July 26, 2004 at 6:15 pm
I'm pretty sure you can't do a self reference in the "Formula" for a field. This is due to the fact that "Formula" makes the field a computed column and thus the result of a formula derived from an expression that may reference another field in the record. Lookup "Expressions and Computed Columns in INSTEAD OF Triggers" in SQL Books Online.
Gary Johnson
Microsoft Natural Language Group
DBA, Sr. DB Engineer
This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply