I am struggling with Access; I barely understand SGL, and I am not using
SGL
(directly). From someplace in the Access Query Design, there is this SGL
coding:
INSERT INTO [tbl-Streets] ( Jurisdiction, Source, [Number], Alpha, Street,
Type, ID, MapNumber )
SELECT [qry-ConvertingRawFCBP'sToBuildingPermits-QueryOnly].*,
[qry-ConvertingRawFCBP'sToBuildingPermits-QueryOnly].Jurisdiction,
[qry-ConvertingRawFCBP'sToBuildingPermits-QueryOnly].Source,
[qry-ConvertingRawFCBP'sToBuildingPermits-QueryOnly].Number,
[qry-ConvertingRawFCBP'sToBuildingPermits-QueryOnly].Alpha,
[qry-ConvertingRawFCBP'sToBuildingPermits-QueryOnly].Street,
[qry-ConvertingRawFCBP'sToBuildingPermits-QueryOnly].Type,
[qry-ConvertingRawFCBP'sToBuildingPermits-QueryOnly].ID,
[qry-ConvertingRawFCBP'sToBuildingPermits-QueryOnly].MapNumber
FROM [qry-ConvertingRawFCBP'sToBuildingPermits-QueryOnly];
The above SGL instruction was created by using the Access Query Design and
Expression Builder. When I try to run this query, I get the error message
"INSERT INTO statement contains the following field name: 'Owner`". Make
sure you have typed the name correctly, and try the operation again."
When I
add the field "Owner," the next field in the source data but not used in
destination table appears in the error statement.
D:\Doc\ADT.mdb
Friday, October 01, 2004
Table: tbl-Streets
Page: 1
Properties
DateCreated: 8/15/2004 9:37:31 AM DefaultView:
Datasheet
GUID: {guid {DCBB7C49- LastUpdated:
9/30/2004 10:28:50 AM
442F-483F-AD65-
NameMap: Long binary data OrderByOn:
True
Orientation: Left-to-Right RecordCount:
2
Updatable: True
Columns
Name Type
Size
Number Long Integer
4
AllowZeroLength: False
Attributes: Fixed Size
CollatingOrder: General
ColumnHidden: False
ColumnOrder: 1
ColumnWidth: 855
DataUpdatable: False
DecimalPlaces: Auto
DisplayControl: Text Box
GUID: {guid
{D391D4A7-88C6-413B-BA26-7DD246196EBE}}
OrdinalPosition: 0
Required: False
SourceField: Number
SourceTable: tbl-Streets
Alpha Text
50
AllowZeroLength: True
Attributes: Variable Length
CollatingOrder: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 675
DataUpdatable: False
DisplayControl: Text Box
GUID: {guid
{C429F1DC-BFD7-43EF-BA3E-
IMEMode: 0
IMESentenceMode: 3
OrdinalPosition: 1
Required: False
SourceField: Alpha
SourceTable: tbl-Streets
UnicodeCompression: True
Street Text
50
AllowZeroLength: True
Attributes: Variable Length
CollatingOrder: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 1260
DataUpdatable: False
D:\Doc\ADT.mdb
Friday, October 01, 2004
Table: tbl-Streets
Page: 2
DisplayControl: Text Box
GUID: {guid
{A2B2D17C-E7CE-40F8-BE3C-
IMEMode: 0
IMESentenceMode: 3
OrdinalPosition: 2
Required: False
SourceField: Street
SourceTable: tbl-Streets
UnicodeCompression: True
Type Text
3
AllowZeroLength: True
Attributes: Variable Length
BoundColumn: 1
CollatingOrder: General
ColumnCount: 1
ColumnHeads: False
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 615
DataUpdatable: False
DisplayControl: Combo Box
GUID: {guid
{E1644FFC-9269-4E68-9A25-51F6D504AB9F}}
IMEMode: 0
IMESentenceMode: 3
LimitToList: False
ListRows: 8
ListWidth: 0twip
OrdinalPosition: 3
Required: False
RowSourceType: Table/Query
SourceField: Type
SourceTable: tbl-Streets
UnicodeCompression: True
City Text
50
AllowZeroLength: True
Attributes: Variable Length
CollatingOrder: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 930
DataUpdatable: False
DisplayControl: Text Box
GUID: {guid
{484F3C6F-1D1F-4AB7-A328-D465242614FF}}
IMEMode: 0
IMESentenceMode: 3
OrdinalPosition: 4
Required: False
SourceField: City
SourceTable: tbl-Streets
UnicodeCompression: True
State Text
50
AllowZeroLength: True
D:\Doc\ADT.mdb
Friday, October 01, 2004
Table: tbl-Streets
Page: 3
Attributes: Variable Length
CollatingOrder: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 645
DataUpdatable: False
DisplayControl: Text Box
GUID: {guid
{A9BF01BE-E1CD-4B1D-8165-
IMEMode: 0
IMESentenceMode: 3
OrdinalPosition: 5
Required: False
SourceField: State
SourceTable: tbl-Streets
UnicodeCompression: True
Zip Long Integer
4
AllowZeroLength: False
Attributes: Fixed Size
CollatingOrder: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 705
DataUpdatable: False
DecimalPlaces: 0
DisplayControl: Text Box
GUID: {guid
{1B160009-B1CA-48CA-8157-207094FEF52C}}
InputMask: 99999
OrdinalPosition: 6
Required: False
SourceField: Zip
SourceTable: tbl-Streets
PlusFour Long Integer
4
AllowZeroLength: False
Attributes: Fixed Size
CollatingOrder: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 960
DataUpdatable: False
DecimalPlaces: 0
DisplayControl: Text Box
GUID: {guid
{15E0B6D0-52AD-45EF-A0BC-847F51F29C33}}
OrdinalPosition: 7
Required: False
SourceField: PlusFour
SourceTable: tbl-Streets
Jurisdiction Text
50
AllowZeroLength: True
Attributes: Variable Length
BoundColumn: 1
CollatingOrder: General
ColumnCount: 1
ColumnHeads: False
D:\Doc\ADT.mdb
Friday, October 01, 2004
Table: tbl-Streets
Page: 4
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 3075
ColumnWidths: 1440
DataUpdatable: False
DisplayControl: Combo Box
GUID: {guid
{FC8C5821-EBE8-42C5-ACE8-
IMEMode: 0
IMESentenceMode: 3
LimitToList: False
ListRows: 8
ListWidth: 1440twip
OrdinalPosition: 8
Required: False
RowSourceType: Value List
SourceField: Jurisdiction
SourceTable: tbl-Streets
UnicodeCompression: True
TaxNumber Text
50
AllowZeroLength: True
Attributes: Variable Length
CollatingOrder: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 1770
DataUpdatable: False
DisplayControl: Text Box
GUID: {guid
{6F2EAFFC-21BA-4839-8523-32C57EC98359}}
IMEMode: 0
IMESentenceMode: 3
OrdinalPosition: 9
Required: False
SourceField: TaxNumber
SourceTable: tbl-Streets
UnicodeCompression: True
MapCoorindinates Text
50
AllowZeroLength: True
Attributes: Variable Length
CollatingOrder: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 1740
DataUpdatable: False
DisplayControl: Text Box
GUID: {guid
{65349B66-D510-4A52-9959-06E830F97CF9}}
IMEMode: 0
IMESentenceMode: 3
OrdinalPosition: 10
Required: False
SourceField: MapCoorindinates
SourceTable: tbl-Streets
UnicodeCompression: True
MapNumber Text
50
D:\Doc\ADT.mdb
Friday, October 01, 2004
Table: tbl-Streets
Page: 5
AllowZeroLength: True
Attributes: Variable Length
CollatingOrder: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 1230
DataUpdatable: False
DisplayControl: Text Box
GUID: {guid
{119FA506-CC1E-4A3C-8A67-53D61F9F2462}}
IMEMode: 0
IMESentenceMode: 3
OrdinalPosition: 11
Required: False
SourceField: MapNumber
SourceTable: tbl-Streets
UnicodeCompression: True
MapQuest1 OLE Object
-
AllowZeroLength: False
Attributes: Variable Length
CollatingOrder: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 1185
DataUpdatable: False
GUID: {guid
{2A4CBE6C-6421-4ADC-89E7-786A5345B46B}}
OrdinalPosition: 12
Required: False
SourceField: MapQuest1
SourceTable: tbl-Streets
MapQuest2 OLE Object
-
AllowZeroLength: False
Attributes: Variable Length
CollatingOrder: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 1185
DataUpdatable: False
GUID: {guid
{7E28B8DD-35BE-4E43-841D-477E9A44C3E9}}
OrdinalPosition: 13
Required: False
SourceField: MapQuest2
SourceTable: tbl-Streets
DrivingDirections Memo
-
AllowZeroLength: True
Attributes: Variable Length
CollatingOrder: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 1620
DataUpdatable: False
GUID: {guid
{30837220-2E81-456A-AE5D-B03C81F90B55}}
IMEMode: 0
IMESentenceMode: 3
D:\Doc\ADT.mdb
Friday, October 01, 2004
Table: tbl-Streets
Page: 6
OrdinalPosition: 14
Required: False
SourceField: DrivingDirections
SourceTable: tbl-Streets
UnicodeCompression: True
Source Text
50
AllowZeroLength: True
Attributes: Variable Length
CollatingOrder: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 795
DataUpdatable: False
DisplayControl: Text Box
GUID: {guid
{A5467786-D1BB-4A62-AB1E-4710556A80E8}}
IMEMode: 0
IMESentenceMode: 3
OrdinalPosition: 15
Required: False
SourceField: Source
SourceTable: tbl-Streets
UnicodeCompression: True
ID Text
50
AllowZeroLength: True
Attributes: Variable Length
CollatingOrder: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 360
DataUpdatable: False
DisplayControl: Text Box
GUID: {guid
{E2A7A085-4A0A-4C04-8E73-42475CAEF5E3}}
IMEMode: 0
IMESentenceMode: 3
OrdinalPosition: 16
Required: False
SourceField: ID
SourceTable: tbl-Streets
UnicodeCompression: True
SourceDate Text
50
AllowZeroLength: True
Attributes: Variable Length
CollatingOrder: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: 1200
DataUpdatable: False
DisplayControl: Text Box
GUID: {guid
{78E92E47-F8C5-4F8D-B023-DD93ADB47242}}
IMEMode: 0
IMESentenceMode: 3
OrdinalPosition: 17
Required: False
D:\Doc\ADT.mdb
Friday, October 01, 2004
Table: tbl-Streets
Page: 7
SourceField: SourceDate
SourceTable: tbl-Streets
UnicodeCompression: True
Permit Text
50
AllowZeroLength: True
Attributes: Variable Length
CollatingOrder: General
ColumnHidden: False
ColumnOrder: Default
ColumnWidth: Default
DataUpdatable: False
DisplayControl: Text Box
GUID: {guid
{DE3C9C11-A6E6-4445-981B-A0510CE8F8AE}}
IMEMode: 0
IMESentenceMode: 3
OrdinalPosition: 18
Required: False
SourceField: Permit
SourceTable: tbl-Streets
UnicodeCompression: True
Table Indexes
Name Number of
ID 1
Clustered: False
DistinctCount: 1
Foreign: False
IgnoreNulls: False
Name: ID
Primary: False
Required: False
Unique: False
Fields:
ID Ascending
Number 1
Clustered: False
DistinctCount: 2
Foreign: False
IgnoreNulls: False
Name: Number
Primary: False
Required: False
Unique: False
Fields:
Number Ascending
StreetTypesShort 1
Clustered: False
DistinctCount: 1
Foreign: False
IgnoreNulls: False
Name: StreetTypesShort
Primary: False
Required: False
D:\Doc\ADT.mdb
Friday, October 01, 2004
Table: tbl-Streets
Page: 8
Unique: False
Fields:
Type Ascending
User Permissions
admin Delete, Read Permissions, Set
Permissions, Change Owner,
Read Definition, Write Definition, Read
Data, Insert Data,
Group Permissions
Admins Delete, Read Permissions, Set
Permissions, Change Owner,
Read Definition, Write Definition, Read
Data, Insert Data,
Users Delete, Read Permissions, Set
Permissions, Change Owner,
Read Definition, Write Definition, Read
Data, Insert Data,
Brendan Reynolds said:
The tables don't have to have the same number of fields, but in your
query
you should select from the source table only those fields that you intend
to
append to the target table. If there are fields in the source table that
you
don't intend to append to the target table, don't select those fields in
the
query.
If you're still stuck after reading this, try posting the SQL for the
query
(in query design view, select SQL View from the View menu).
--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com
The spammers and script-kiddies have succeeded in making it impossible
for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
message