Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting "Hyphenated Field Names"

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,

I'm trying to select specific fields from a table contained within a pervasive DDF. Many fieldnames contain a hyphen, for instance, "OIL-FLOW", "OIL-TEMP", "OIL-TYPE", and this is causing me some problems.

My select statements are failing everytime I attempt to touch hyphenated field names. All my other select statements work perfectly.

Added note: I'm trying to send "uninterpreted" SQL statements using SQL that's specific to pervasive. I want to avoid parsing and modification.

Thank you to one and all that have a clue about this and are willing to fill me in. Alex
 
You didn't say what version of Pervasive you're using but you should use double quotes around the field name. If you don't have them surrounded by double quotes, Access/VB or any ODBC app will treat it as a subtraction operator.
mirtheil@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top