Questions tagged [flat-file]

A flat-file database model is any system using a single file for storage with one record per line, usually plain-text or text mixed with binary data.

A "flat file" is a plain text or mixed text and binary file which usually contains one record per line or 'physical' record (example on disc or tape). Within such a record, the single fields can be separated by delimiters, e.g. commas, or have a fixed length. In the latter case, padding may be needed to achieve this length. Extra formatting may be needed to avoid delimiter collision. There are no structural relationships between the records.

Typical examples of flat files are /etc/passwd and /etc/group on Unix-like operating systems. Another example of a flat file is a name-and-address list with the fields Name, Address, and Phone Number.

Source: Wikipedia (Flat file database)

830 questions
2
votes
1 answer

SSIS - Export Master-Detail data to a single flat file that contains both master and detail row

I have DB with a master table with its detail table, let's say Master (ID, MField1) Det (ID, IDMaster, DetField1) and I need to export a flat file with fixed column size, with both master rows and detail rows, here's below the records'…
Luigi Dallavalle
  • 300
  • 1
  • 5
  • 12
2
votes
1 answer

How do I Compare two text files, with same information but different rows

I am a really big fan of Beyond Compare and Notepad ++ and use it at my work for many comparisons on a daily basis. I am using the latest version software. So this is my question. I have two Text files, Where as text file 1 has the following…
2
votes
3 answers

SSIS Text Qualifier not working on last column

My flat files fields are tab delimited (\t) with a quotation mark (") text qualifier, and each row is linefeed (LF) separated. My SSIS package works great when no fields are text qualified any field EXCEPT the last column is text qualified When…
sorrell
  • 1,801
  • 1
  • 16
  • 27
2
votes
3 answers

The most elegant way to import flatfiles into SQL server 2005 without using SSIS

For some reasons, SSIS is not avalialble. I read about OPENROWSET, but I will have others problem from on the format file and path of file. How can I do it in a elegant way?
Dennis C
  • 24,511
  • 12
  • 71
  • 99
2
votes
3 answers

Download data into SQL Server

I have a file without any extension and I need to download data into a SQL Server table. Here's an example of one string opened in Notepad: 7600 20160701 20160701 20160630 20160630 20160630 ZSO ### 5501 850170371 In Excel it…
Andriy
  • 123
  • 1
  • 9
2
votes
2 answers

Importing a txt file into SQL Server with a where clause

I have a .txt file which is 6.00 GB. It is a tab-delimited file so when I try to load it into SQL Server, the column delimiter is tab. I need to load that .txt file into the database, but I don't need all the rows from the 6.00 Gb file. I need to…
user1960217
  • 131
  • 2
  • 3
  • 15
2
votes
1 answer

Storing user data in JSON files on server

I am building a web application that uses PHP and MySQL on the backend. I want to store some user data -- basically a set of objects in JSON format that detail the user's "favorites" info for the application. I don't want to store this JSON data…
user5282069
2
votes
0 answers

Can't read flat file in SSIS (but the live job still works!)

I have inherited a bunch of SSIS packages. In some of these packages there is a connection manager being used to grab a flat file. These flat files are downloaded daily from FTP and unzipped - then used in these packages. The packages are executed…
default_noob_network
  • 1,204
  • 3
  • 19
  • 39
2
votes
1 answer

Regular Expression for selecting a block of code that isn't all numbers

I am attempting to clean up a flat file in a C-ISAM database that has corrupt data. The flat file is fixed position delimited, and the field I'm trying to clean up is a date field. The field uses an eight digit format (YYYYMMDD). What I am trying…
K_Cruz
  • 729
  • 6
  • 17
2
votes
2 answers

Pull and list most common id inside a flat file database

I have a flat file database of twitter ids that are following daesh accounts with just under half a million lines that looks like this: 722030494578122752 | User Followes/followed pxayrxxcz When I want to search for an id I just do a simple bash…
Matt
  • 107
  • 1
  • 2
  • 10
2
votes
1 answer

How to add new column to a flat file using PHP?

Quick update: The reason I need this solution is that this one php file is used to expand the flat file for about hundred users (that all use the same php file, but have their own flat files) SOLUTION: I worked with this one more day, rephrased the…
Preben
  • 1,277
  • 2
  • 11
  • 20
2
votes
3 answers

SQL Developer spooling: how to get rid of the first, empty line

I am using the following spooling script with Oracle SQL Developer 4.1: set echo off set feedback off set termout off spool A.txt select /*csv*/ * from A where rownum <= 1000; spool off spool B.txt select /*csv*/ * from B where rownum <=…
Danilo Piazzalunga
  • 7,590
  • 5
  • 49
  • 75
2
votes
1 answer

Framework for loading flat files into SQL Server

I have to import flat files into SQL Server. So far, I've used SSIS packages and Delphi programs to do the job but I'm getting more and more files to load. Many are very wide (more than 90 fields) and they all have their own specifics: some are…
Stephane
  • 3,173
  • 3
  • 29
  • 42
2
votes
1 answer

Split Flat Files into smaller files (on row count) using Custom Pipeline

I am trying to create a custom pipeline component for BizTalk 2010 that splits an incoming flat file into multiple smaller files. I want to split the file (lets say of ~30 000 rows) into files of about 5000 rows each or a bit less (lets say if the…
2
votes
1 answer

How can one to dynamically parse a CSV file using C# and the Smart Format Detector in FileHelpers 3.1?

As per in this FileHelpers 3.1 example, you can automatically detect a CSV file format using the FileHelpers.Detection.SmartFormatDetector class. But the example goes no further. How do you use this information to dynamically parse a CSV file? It…
VinceJS
  • 1,254
  • 3
  • 18
  • 38