Best way to query a flat fixed length text file

Ask a Question related to Microsoft SQL / MS SQL Server, Design and Development.

  1. #1

    Default Best way to query a flat fixed length text file

    I am trying to insert a semi fixed length file into a SQL database.
    Does anyone know of a way to query a fixed length file like you can a
    csv to only insert the records that meet certain criteria? So far, I
    have had success using vbscript to open the file and then parse out
    the lines, but I am wondering if there is a more efficient method?

    Thanks for any help.
    Random Guest

  2. Similar Questions and Discussions

    1. #38327 [Asn->Bgs]: False notice: lookbehind assertion is not fixed length
      ID: 38327 Updated by: nlopess@php.net Reported By: php dot net at bokehman dot com -Status: Assigned +Status: ...
    2. PDFs with some text fixed and some text editable by Acrobat Reader
      Hi there. Can someone help? I have Acrobat 6.0 Standard and I need to create a PDF that has almost all of the text and images fixed but also has a...
    3. Fixed Length Text Extract, Write to Excel
      Hello All, I am trying to work with the code I have to extract fields from a text file report, and write the values into excel. I am having...
    4. shell script to transfer flat file generated from isql query to microsoft access database
      Can someone help me with a way in shell script to transfer flat file generated from isql query to microsoft access database. Thanks
    5. sql*loader fixed width column / variable length record
      im trying to figure this out. i have a datafile with the following records tony sometext 120121122 mark sometext2 120 ethan ...
  3. #2

    Default Re: Best way to query a flat fixed length text file

    See if the way I use the ODBC text driver to query a DOS
    directory listing is any help:

    [url]http://www.users.drew.edu/skass/sql/TextDriver.htm[/url]

    You could also bcp or bulk insert the entire file in and then evaluate
    the criteria. There are options, so play around and see
    what's efficient.

    Steve Kass
    Drew University

    Random wrote:
    >I am trying to insert a semi fixed length file into a SQL database.
    >Does anyone know of a way to query a fixed length file like you can a
    >csv to only insert the records that meet certain criteria? So far, I
    >have had success using vbscript to open the file and then parse out
    >the lines, but I am wondering if there is a more efficient method?
    >
    >Thanks for any help.
    >
    >
    Steve Kass Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139