Export to CSV with no decimals

G

Guest

I am trying to get rid of decimals in one of two columns displayed by my
query as follows:

SELECT VENDOR.[VendorID], ENTITY.[Building Reference] INTO
[Text;HDR=Yes;DATABASE=C:\Temp].MyData4.csv
FROM VENDOR, ENTITY;

This query exports my over 380,000 lines into a CSV file (Excel cannot take
more than a little over 65,000 lines and saves it as MyData4.csv. My VendorID
field displays as a number with 2 decimals, e.g. 274458.00. I need this to
read 274458. My Building Reference field displays as "RQS0057" (with the
inverted commas. I would prefer it read as RQS0057, (without the inverted
commas). THis is the format needed to export this CVS file into another
system. I could use the Find and Replace when I open the file in Notepad but
it takes forever (over 380,000 lines).

How can modify my SQL to get the correct format that I need?

Thanks.
 
G

Guest

If you define a linked table to your csv file you can define the vendor id
column as a long integer (which doesn't have decimal places) and you can
define the text qualifier as {none} (which will remove the quotes from the
reference).

Also, make sure vendor id is defined as a long integer in your database
table too.

HTH

Andy Hull
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top