Tags: access, account-code, contain, contains, dash, database, enter, field, ive, linked, microsoft, mysql, names, oracle, parameter, produces, progress, query, run, sql, tables, value

Field name contains a dash, produces "enter parameter value" in query

On Database » Microsoft Access

1,991 words with 1 Comments; publish: Sun, 01 Jun 2008 16:17:00 GMT; (25046.88, « »)

I've got linked tables in access from a progress database whose field names contain a dash in them, like "account-code". I was hoping to run sql queries in access as the designer is far better than anything progress supplies, but the second half of the field name "code" is stripped off of the field name and I am prompted to "enter parameter value" for a now invalid field name.

The db I'm linking to is a 3rd party db being used by an existing app, so I really can't change any field names, besides there's about 25 db's with over 1500 tables and who knows how many fields with dashes in them, so copying the db and renaming fields on a test db isn't feasible.

Is there any way of querying using fields with dashes in the names without causing this problem?

Thanks,

All Comments

Leave a comment...

  • 1 Comments
    • Placing brackets around the field name allowed it to execute as expected...

      Quote:
      === Original Words ===

      Ozimandius

      I've got linked tables in access from a progress database whose field names contain a dash in them, like "account-code". I was hoping to run sql queries in access as the designer is far better than anything progress supplies, but the second half of the field name "code" is stripped off of the field name and I am prompted to "enter parameter value" for a now invalid field name.

      The db I'm linking to is a 3rd party db being used by an existing app, so I really can't change any field names, besides there's about 25 db's with over 1500 tables and who knows how many fields with dashes in them, so copying the db and renaming fields on a test db isn't feasible.

      Is there any way of querying using fields with dashes in the names without causing this problem?

      Thanks,

      #1; Sun, 01 Jun 2008 16:19:00 GMT