if you know this, then you are god!

Results 1 to 3 of 3

Thread: if you know this, then you are god!

  1. #1
    Ben Timby Guest

    Default if you know this, then you are god!

    hello all, I would like to know how to select columns from a .csv file w/o knowing the column names (in this case there are none), I want something like:<BR><BR>SELECT COL(1) AS column1, COL(2) AS column2 FROM whatever.csv<BR><BR>but I can find nothing on how to do this.

  2. #2
    Join Date
    Dec 1969

    Default Have you tried...???

    SELECT * FROM whatever.csv<BR><BR>AND *then* using the ordinal notation in the Recordset object?<BR><BR>i.e.:<BR><BR>objRS(0) &#039;Gets column1<BR>objRS(1) &#039;Gets column2<BR>etc.<BR><BR>???<BR><BR>Any reason this would not work?<BR><BR>Happy Programming!

  3. #3
    Ben Timby Guest

    Default RE: Have you tried...???

    That works great, but is not what I want to do, of course you can get the column by number using an ADO recordset. I however want to execute a select query that only returns the columns I specify by number, thus:<BR><BR>SELECT COL(1) AS column1 ...<BR><BR>in my original post. remember, I don&#039;t know the column names, and I am dealing w/ alot of columns, and only want to select the ones I want. I am dealing w/ over 100 columns, and sometimes 1,000&#039;s of records. Anyone else know how to accomplish this?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts