Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Field type in triggers
Mon, Jan 21 2008 5:38 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

Any chance of being able to detect the field type in triggers. It will make re-introducing RTRIM for VARCHARs easier.

Roy Lambert
Mon, Jan 21 2008 8:04 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Any chance of being able to detect the field type in triggers. It will
make re-introducing RTRIM for VARCHARs easier. >>

Access to the NEWROW columns is hard-coded like a variable, therefore you
need to know which columns are which prior to creating the trigger anyways.

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Jan 21 2008 9:17 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


OK so is there any easier way than hard coding every varchar field name in the database?

Roy Lambert
Mon, Jan 21 2008 9:58 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


And a slightly different question. I want to ensure that VARCHAR fields are NULL not empty string and I want to remove trailing spaces. Is a trigger the best place or is there a better option, if so what?

Roy Lambert
Mon, Jan 21 2008 12:33 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< OK so is there any easier way than hard coding every varchar field name
in the database? >>

No, because you have to hard-code the NEWROW reference.

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Jan 21 2008 12:34 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< And a slightly different question. I want to ensure that VARCHAR fields
are NULL not empty string and I want to remove trailing spaces. Is a trigger
the best place or is there a better option, if so what? >>

No, triggers are where you should put that type of code.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image