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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Working with special characters in SQL statements 1

Status
Not open for further replies.

iojbr

Technical User
Feb 12, 2003
129
US
Hi:

I am currently using a select query to parse an invoice text file (that I imported in) based on string functions that I enter into the column headings of my query. The query works, but I want to be able to be able to parse the information using a SQL statement instead in VBA. But the file contains special characters (a small square symbol) that the query will display and accept, but does not appear when I paste it into the VBA code windows. Anyway I can make this work. For example, one of my Field headings in my query is : "Part Number: SF_SplitLeft([Field2],"[]Qty")" (The []in front of Qty is where the square symbol appears since I can't reproduce it in this message). Thanks for your help in advance.
 
The square you see is a non printable character, and since it is a text file it is probably a line feed, carriage return, or tab.

The non printable character can be referenced by the Ascii representation.
chr(10) = line feed
chr(13) = carraige return

If you open you text file with an Editor, such as, Textpad (download off internet) then you can see the binary representation of the character.
binary 0A = ascii chr(10)
binary 0D = ascii chr(13)

This should help you know what the character is so that you can deal with it in your SQL.
 
Thanks. I'll try it out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top