Board index » delphi » MS SQL 6.5 Stored procedure
Sini1a Vuleta
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
|
Sini1a Vuleta
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
MS SQL 6.5 Stored procedure
I am a new with MS SQL and reading documentation I didn't found way how to
implement stored procedure which will set present date-time (GetDate()) in some record datetime field on insert event (primary key is not autoinc - I solve probem with autoinc). Something like this Interbase trigger: Triggers on Table SOMETABLE: Help, please ! Sinisa |
Reid Roma
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:MS SQL 6.5 Stored procedureQuote"Sini1a Vuleta" wrote: MS SQL it would be something like this: PROCEDURE Add_Customer AS INSERT INTO Customer GO The GetDate() call is just placed into the column you want to insert the HTH Rkr \|||/ |
Sinisa Vulet
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:MS SQL 6.5 Stored procedureMany thank for replay, I made mistake when I (some how) wrote 'Stored procedure', I just looking for trigger (what is more less same in MSSQL) or something like that. Accidentally, I found somewhere in MSSQL help that I could use GetDate() function as default value for my datetime field, what is exactly what I looking for. That was little surprise for me, because I didn't except that function call could be a default value. So, my next question will be 'Where is a limit ?', or is GetDate() exception ? Sinisa P.S. Excuse me for my English QuoteReid Roman wrote: |
Reid Roma
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:MS SQL 6.5 Stored procedureQuoteSinisa Vuleta wrote: I don't know quite what you mean "The Limit" or "Exception" ... Exception to the rule?? But as far as the TRIGGER -vs- Stored Procedure concept, a TRIGGER is Rkr \|||/ |
Sini?a Vulet
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:MS SQL 6.5 Stored procedureI newbie with MS SQL and I was supprised that function could be default value. Today I found in help that all nilic (functions without input parameters) could be used like default value (GetDate(), User_ID, etc...). Is this true and for user defined functions ? Sinisa |
1. Debuging MS SQL 6.5 stored procedures with Delphi
2. stored procedure with MS SQL 6.5
3. Stored Procedure MS Sql Server 6.5 and Delphi 2.0
4. MS SQL 6.5,Delphi 2,Stored Procedures
5. MS SQL 6.5 Extended Stored Procedures with Delphi
6. extended stored procedures for MS SQL 6.5
7. MS SQL Server 6.5, Stored Procedures, Temp Tables and Delphi 4 C/S
8. Calling MS SQL 6.5 LARGE Stored procedures
9. Missing Records with Stored Procedures and SQL Server 6.5
10. Huge problem with Delphi 2.0 and SQL 6.5 Stored procedures