Advertisement

12.24.2002 at 01:10AM PST, ID: 20435475
[x]
Attachment Details

Automatic insertion of a rown into a table.

Asked by Mateen in MS SQL Server

Tags: rown, automatic, insertion, server

Table Name : Period
period  start_date              end_date
JAN-02     2002-01-01 00:00:00 2002-01-31 00:00:00
FEB-02     2002-02-01 00:00:00 2002-02-28 00:00:00
MAR-02     2002-03-01 00:00:00 2002-03-31 00:00:00
APR-02     2002-04-01 00:00:00 2002-04-30 00:00:00
MAY-02     2002-05-01 00:00:00 2002-05-31 00:00:00
JUN-02     2002-06-01 00:00:00 2002-06-30 00:00:00
JUL-02     2002-07-01 00:00:00 2002-07-31 00:00:00
AUG-02     2002-08-01 00:00:00 2002-08-31 00:00:00
SEP-02     2002-09-01 00:00:00 2002-09-30 00:00:00
OCT-02     2002-10-01 00:00:00 2002-10-31 00:00:00
NOV-02     2002-11-01 00:00:00 2002-11-30 00:00:00
DEC-02     2002-12-01 00:00:00 2002-12-31 00:00:00

Currently on first of each new month I add a row i.e.
on January 01,2003 I will add a row like this
JAN-03     2003-01-01 00:00:00 2003-01-31 00:00:00

Is it possible that at beginning of each new month one
row is inserted into table period automatically.

If possible then what will be the good event.
1. When sql server starts.
2. When database is connected.
3. When database is accessed.
4. When the particular table (period) is accessed.
5. or any other eventStart Free Trial
[+][-]12.24.2002 at 01:52AM PST, ID: 7628096

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.24.2002 at 02:50AM PST, ID: 7628247

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.24.2002 at 05:31AM PST, ID: 7628539

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS SQL Server
Tags: rown, automatic, insertion, server
Sign Up Now!
Solution Provided By: gjmoyer
Participating Experts: 2
Solution Grade: C
 
 
 
Loading Advertisement...
20080716-EE-VQP-32