November 30, 2009 at 2:39 am
i just want write a trigger for adding two text box field then put the result into the third text box in the same page how can i do that?
November 30, 2009 at 2:53 am
For a good introduction to triggers in SQL, please read this: http://www.sqlservercentral.com/articles/Triggers/64214/
I also have to ask, why do you want to do this? Storing redundant data is usually a bad idea. You can regenerate the added columns easily when selecting from the table, or you could use a calculated column. Why store the duplicate and go through the hassle of keeping it updated?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 30, 2009 at 2:54 am
Hi
You are asking for SQL or for .Net ,If you are asking for SQL then Give me any Example related to that.
Thanks
Parthi
November 30, 2009 at 5:24 am
iam asking Sql
November 30, 2009 at 5:28 am
i have three text boxes
1.start date
2.planned days
3.end date
now i enter the first two field the end date will show automatically sum of start date and planned days
November 30, 2009 at 5:36 am
manikandan.chokkalingam (11/30/2009)
i have three text boxes
Doesn't sound like SQL to me. SQL has no text boxes. Maybe you can give us some more information, including where these 'text boxes' appear. The table structure would also be useful.
Again, I'm going to ask, if this is in SQL, why do you want to store redundant data?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 30, 2009 at 10:19 pm
I think this is thing you are looking for as per your Requirement
DECLARE @STARTDATE DATETIME
DECLARE @ENDDATE DATETIME
DECLARE @PLANNED SMALLINT
SET @STARTDATE ='12/01/2009'
SET @PLANNED=10
SELECT @ENDDATE=DATEADD(dy,@PLANNED,@STARTDATE)
SELECT CONVERT(VARCHAR,@ENDDATE,101)
Thanks
Parthi
November 30, 2009 at 10:53 pm
Thank U
November 30, 2009 at 11:16 pm
When ever You post on Development You better post with example so that we can get the idea ,so that you might get the result sooner
Thanks
Parthi
November 30, 2009 at 11:20 pm
Yeah sure.
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply