From: Brad on 18 May 2010 14:48 I ran into something strange while doing a Make Table Query that was followed by an Append Query (from a “purchased system” table that has many field names with embedded blanks.) To understand this issue better, here is what I did to recreate the problem. Created a new table with only one field named “Cust Name” (note the embedded space in the field name) Used an Access “Make Table” query – this worked nicely. Then I tried an Access “Append Query”. Access generated this field name in the Append To: field [Cust Name] (Note the brackets that Access inserted) When I run it, I receive the following error msg. “The INSERT INTO statement contains the following unknown field name: '[Cust Name]”. Make sure you have typed the name correctly, and try the operation again” I can resolve this by removing the brackets. This is not a big deal for this little test, but the original production table has many fields with embedded spaces in the field names. It would be nice if I could somehow ask Access to not wrapper these field names with brackets when doing an Append Query. Is this a feature? Am I missing something obvious? Thanks, Brad
From: KARL DEWEY on 18 May 2010 15:41 Field names with space must have brackets (use underscore instead). Post your complete query SQL for both queries. -- Build a little, test a little. "Brad" wrote: > I ran into something strange while doing a Make Table Query that was followed > by an Append Query (from a “purchased system” table that has many field names > with embedded blanks.) > > To understand this issue better, here is what I did to recreate the problem. > > Created a new table with only one field named “Cust Name” (note the embedded > space in the field name) > > Used an Access “Make Table” query – this worked nicely. > > Then I tried an Access “Append Query”. Access generated this field name in > the Append To: field [Cust Name] (Note the brackets that Access > inserted) > > When I run it, I receive the following error msg. > “The INSERT INTO statement contains the following unknown field name: '[Cust > Name]”. Make sure you have typed the name correctly, and try the operation > again” > > I can resolve this by removing the brackets. > > This is not a big deal for this little test, but the original production > table has many fields with embedded spaces in the field names. It would be > nice if I could somehow ask Access to not wrapper these field names with > brackets when doing an Append Query. > > Is this a feature? Am I missing something obvious? > > Thanks, > Brad > > > > >
|
Pages: 1 Prev: No data returned from query Next: Help with expression builder in a select Query |