I set up a database of civic league members and residences.
I set the primary key to conform to addresses by street numbers.
Unfortunately, I omitted two buildings.
How do I insert the data for these two items where they should be ?
The Primary Key doesn't seem to like that :(
Thanks much,
newbie here 4 1511
"ams" <no**@cox.net> wrote in message
news:m2Lqc.31352$Md.29945@lakeread05... I set up a database of civic league members and residences. I set the primary key to conform to addresses by street numbers. Unfortunately, I omitted two buildings. How do I insert the data for these two items where they should be ? The Primary Key doesn't seem to like that :(
Thanks much, newbie here
I've just done this (and probably did it a very roundabout way), but I used
a make table query, with the records sorted the way I wanted, but without
the Primary key, to make a new Temp table. I then deleted all the records
from the original table, and used an append query to add the sorted ones
from my new Temp table, then deleted the Temp table.
Hey ! Worked for me !
Rob Lepper
"OM" <le******@loxinfo.dot.co.th> wrote in message
news:c8**********@news.loxinfo.co.th... "ams" <no**@cox.net> wrote in message news:m2Lqc.31352$Md.29945@lakeread05... I set up a database of civic league members and residences. I set the primary key to conform to addresses by street numbers. Unfortunately, I omitted two buildings. How do I insert the data for these two items where they should be ? The Primary Key doesn't seem to like that :(
Thanks much, newbie here I've just done this (and probably did it a very roundabout way), but I
used a make table query, with the records sorted the way I wanted, but without the Primary key, to make a new Temp table. I then deleted all the records from the original table, and used an append query to add the sorted ones from my new Temp table, then deleted the Temp table.
Hey ! Worked for me !
Rob Lepper
Thanks, Rob. I did the round-about as well. I exported in Excel format.
Inserted the two buildings, and imported back into Access with a new table
name.
Much appreciated.
ams
The order that items are in a table should be irrelevant to you. If you want
them sorted, use a query. You can set sorting options in a query. Also, if
by inserting into the primary key, you mean that you have an autonumber and
you want to insert into the middle of it then - don't. Autonumbers will give
each record a unique ID, beyond that they have no meaning. You shouldn't
expect to be able to keep them lined up. If you need a field to do that,
you'll need to create one yourself. You could then have updated the ones
beyond where you wanted to insert by running an Update Query to add 2 to
each of the values beyond that point then inserted your other 2 records,
setting the field value to the sequence that you want.
--
Wayne Morgan
Microsoft Access MVP
"ams" <no**@cox.net> wrote in message
news:m2Lqc.31352$Md.29945@lakeread05... I set up a database of civic league members and residences. I set the primary key to conform to addresses by street numbers. Unfortunately, I omitted two buildings. How do I insert the data for these two items where they should be ? The Primary Key doesn't seem to like that :(
Thanks much, newbie here
Wayne,
I was more or less asking, how do you insert a new row with new data in
between existing
rows that already have a primary key assigned. For some reason, in the
table dataview mode,
I am unable to insert such a row between existing ones. I will try out the
Update Query as you
suggested.
I know, I am not explaining myself well. Sorry.
Thank you,
ams
"Wayne Morgan" <co***************************@hotmail.com> wrote in message
news:gK******************@newssvr31.news.prodigy.c om... The order that items are in a table should be irrelevant to you. If you
want them sorted, use a query. You can set sorting options in a query. Also, if by inserting into the primary key, you mean that you have an autonumber
and you want to insert into the middle of it then - don't. Autonumbers will
give each record a unique ID, beyond that they have no meaning. You shouldn't expect to be able to keep them lined up. If you need a field to do that, you'll need to create one yourself. You could then have updated the ones beyond where you wanted to insert by running an Update Query to add 2 to each of the values beyond that point then inserted your other 2 records, setting the field value to the sequence that you want.
-- Wayne Morgan Microsoft Access MVP
"ams" <no**@cox.net> wrote in message news:m2Lqc.31352$Md.29945@lakeread05... I set up a database of civic league members and residences. I set the primary key to conform to addresses by street numbers. Unfortunately, I omitted two buildings. How do I insert the data for these two items where they should be ? The Primary Key doesn't seem to like that :(
Thanks much, newbie here
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: TThai |
last post by:
HI,
I'm trying to insert records to a table using bcp command. The
problem is the input file to the bcp is a text file that looks like
this:
Text file data:
1234 abc def ghi jkl mno
...
|
by: Mattias B |
last post by:
Hello!
I have a question about how stl's insert works on containers and on
vector in particular.
The question is: is it OK to insert a value before end() with something
like:
vector<int>...
|
by: akej via SQLMonster.com |
last post by:
Hi, i have table with 15 columns
CREATE TABLE . (
PRIMARY KEY ,
NULL ,
NULL ,
NULL ,
NULL ,
(50) NULL ,
NULL
|
by: Jean-Christian Imbeault |
last post by:
I have a table with a primary field and a few other fields. What is the
fastest way to do an insert into that table assuming that sometimes I
might try to insert a record with a duplicate primary...
|
by: Daniel Tan |
last post by:
I got a syntax error in SQL insert into statement , hope someone can
help me .Thanks.
job_search = "='" & Me.Jobno & "' "
sqlstr = "INSERT INTO Custorder (job_order) " & _
"values " &...
|
by: Russ Schneider |
last post by:
I downloaded the port for Postgres for PHP-NUKE.
All insert statements are as follows:
For table:
Table "nuke_referer"
Column | Type | Modifiers...
|
by: David Eades |
last post by:
Hi all
Complete newbie here, so apologies if this is the wrong forum.
I've been asked to use mysql and asp to make a simple bidding system (rather
like a simple ebay), whereby users can use a...
|
by: josie23 |
last post by:
Egad,
I'm not a coder/programmer by nature or occupation but understand things like html and css and a small amount of perl. So, basically, I'm a perl/mysql imbecile.
But, I've been trying to...
|
by: PrakashRS |
last post by:
Given the table T1, created by:
CREATE TABLE t1
(id INTEGER GENERATED BY DEFAULT AS IDENTITY,
c1 CHAR(3)
)
The following SQL statements are issued:
INSERT INTO t1 VALUES (1, 'ABC')
INSERT INTO...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |