cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to import csv in Windows system

soum_guli
New Contributor
Not sure where I am going wrong..I am trying to import a csv to kdb. The following command works fine.In this case the examplefile.csv is in the same folder as q.exe

exampletablename:("ZFIIIFIJJJ"; enlist ",") 0:`:examplefile.csv




However if I want to specify the file from an external location I use the following command and it fails.
exampletablename:("ZFIIIFIJJJ"; enlist ",") 0:`:C:\\Users\\Gul\\AppData\\examplefile.csv


The error says 

ERROR: '/ 
(attempt to use variable / without defining/assigning first (or user-defined signal))



What is the correct syntax?


2 REPLIES 2

charlie
New Contributor II
New Contributor II
if you need to embed special chars in a symbol, construct it with `$"...."
e.g.
exampletablename:("ZFIIIFIJJJ"; enlist ",") 0:`$":C:\\Users\\Gul\\AppData\\examplefile.csv"

clarkem8
New Contributor
Try use / not \\.

Marcus