Subject | Re: insert into with primary key |
---|---|
Author | alfredlanger35 |
Post date | 2009-01-09T18:52:27Z |
--- In firebird-support@yahoogroups.com, "Martijn Tonies"
<m.tonies@...> wrote:
for a month. Then I make a report for this month. Then I will
save this data in a table example employee_2008_11, for audit
purpose only. The maintable is always employee_2008.
insert into employee_2008_11 select * from employee_2008
and employee_2008_11 lost the information of the primary key.
Every data record has 32 fields. Every field could change in every
month. The teacher of my sun says book-keeper have special brain
windings. I hope I could explain my little problem.
With regards
Alfred Langer
<m.tonies@...> wrote:
>I had a little program which save the wages of every employee
> Hi,
>
> >> >I copy a table with
> >> >
> >> > insert into newtable select * from oldtable
> >> >
> >> > The oldtable has a primary key. The newtable not.
> >> >
> >> > With kind regards
> >> > Alfred
> >>
> >> What's the question?
> > the newtable lost the information which is the field with
> > the primary key.
> > I have always to set the primary key to the field manual.
> > If I forgot, I got trouble with the update of the newtable.
>
> But you created "newtable", didn't you?
>
> So, did you create it with a primary key?
>
>
> You're not telling us much - start with your exact steps,
> and describe closely what the problem actually is.
for a month. Then I make a report for this month. Then I will
save this data in a table example employee_2008_11, for audit
purpose only. The maintable is always employee_2008.
insert into employee_2008_11 select * from employee_2008
and employee_2008_11 lost the information of the primary key.
Every data record has 32 fields. Every field could change in every
month. The teacher of my sun says book-keeper have special brain
windings. I hope I could explain my little problem.
With regards
Alfred Langer
>
> With regards,
>
> Martijn Tonies
> Upscene Productions
> http://www.upscene.com
>
> Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
> Anywhere, MySQL, InterBase, NexusDB and Firebird!
>
> Database questions? Check the forum:
> http://www.databasedevelopmentforum.com
>