January 20, 2010 at 2:28 am
Hi,
I'am with a problem inserting to a view that writes to 2 tables, using triggers.
Ok, I have 2 phisical tables:
- Table1 and Table2
And I have one view:
- View1, used for insert, update and delete to Table1 and Table2. The inserts, updates and deletes are made using triggers(Instead Of) on the View1.
My problem is this:
- In the Table2 I have a TEXT field, and when I try to insert directly to the table I'am able to insert 2000+ characters, but when I insert to the View1, the I'am able to insert to the field only 2000 characters.
What could be the problem? Any clues?
Best Regards,
January 20, 2010 at 8:15 am
What's the datatype of the column in the view definition? Might help if you post the code for the view.
_____________________________________________________________________
- Nate
January 20, 2010 at 10:49 am
The problem is solved. The problem was a function called in the view that TRIM strings, and the return variable was set to varchar(2000).
Thanks for the help.
Best Regards,
January 23, 2010 at 2:24 pm
You might also want to consider changing that TEXT field to a VARCHAR(MAX) as Microsoft recommends.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply