Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 IsDate function for stored proc?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-02-18 : 21:43:55
Apu writes "My ASP page retrieves a row from the sql database and displays it. Part of that retrieval is a non-displayed varchar field called TS which is a converted datetime type 121 field. Its purpose is optimistic locking and it is passed back to the stored procedure that updates the record for comparison to ensure that the underlying source is unchanged since retrieval.

I am finding that the 121 datetime format, while it allows great control over record edits down to the millisecond level, is difficult to validate in either vbscript or T-SQL. IsDate() does not recognize it as a valid datetime format and I cannot track down an sql equivalent. Is there one?

Also, what is the best way to manually fire a trigger? I have an insert/update trigger on an invoice table that has relationships with both a parts table and a labour table. If I wanted to fire the invoice trigger via one of the FK tables update/insert would I: 1. Create triggers on the FK tables which update a "semaphore" field on the invoice table, thus forcing an update trigger event OR 2. Can I make a manual reference to another trigger within the FK trigger itself? Does this make sense? I want to force a trigger to fire via an event that is not designed to fire it, like updating a related table.

Thanks for your time and assistance."
   

- Advertisement -