× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I am trying to get the user ID to default on additions and changes to a table defined using DDL. The only special register value I can get to work is USER. When I add records to the table outside of SQL the user ID field is blank. I am also using the CURRENT_TIMESTAMP register for a timestamp value and it works fine.

Using SYSTEM_USER or SESSION_USER results in an error creating the table. It doesn't like the , at the end of the line.

Anyone have any ideas how to get the user ID to default on adds outside of SQL?

Here's the SQL statement:
Create table #785/ERRSVRTY (
Error_Severity for ERRSEV Numeric(1,0) not null,
Description for DESCR Char(50) not null,
Add_User for ADDUSER Char(18) not null with default USER,
Add_Timestamp for ADDTMSTP Timestamp not null
with default CURRENT_TIMESTAMP,
Update_User for UPDUSER Char(18) not null with default USER,
Update_Timestamp for UPDTMSTP Timestamp
with default CURRENT_TIMESTAMP,

-- Add primary key
Constraint ERRSVRTY_Key Primary Key (Error_Severity));

Rick Chevalier
IT Software Solutions - Loan Servicing
AmeriCredit<http://www.americredit.com/images/acf_email_sig.gif>
817-525-7178 (w)
rick.chevalier@xxxxxxxxxxxxxxx<mailto:rick.chevalier@xxxxxxxxxxxxxxx>




________________________________
Privileged and Confidential. This e-mail, and any attachments there to, is intended only for use by the addressee(s) named herein and may contain privileged or confidential information. If you have received this e-mail in error, please notify me immediately by a return e-mail and delete this e-mail. You are hereby notified that any dissemination, distribution or copying of this e-mail and/or any attachments thereto, is strictly prohibited.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.