SQL Wrappers



The recent discussion about SQL-wrappers reminded me of something.

I once worked with a dialect of SQL that provided access to data stored in
files as well as data stored in a database.
The format of the files was comma separated values (CSV), the access was
read only, and a secondary file was needed to declare the column names,
among other things.

In that context, it was straightforward to code something into the CSV file
that would result in a NULL being passed to the SQL user. All you had to do
was code two commas in a row. Since there was nothing between the commas,
the wrapper generated a NULL.

That raises the question, how do you pass an empty string? The answer was
that you had to put a pair of quote marks between the two commas in the CSV
file. The two quotes explicitly marked a string, and the fact that there
was nothing between them marked an empty string. This was a nuisance, to be
sure, but it was a minor nuisance.

All of this raises another question for me. When is SQL NOT a wrapper?


.



Relevant Pages

  • Saving Excel as a CSV
    ... I have an excel file with 63 columns and 3000+ rows. ... to be csv files. ... The table in sql has 74 columns to which i am trying to insert this ... But its not putting commas ...
    (microsoft.public.excel.misc)
  • Can somebody help me with this! Please!!!
    ... I have an excel file with 63 columns and 3000+ rows. ... to be csv files. ... The table in sql has 74 columns to which i am trying to insert this ... But its not putting commas ...
    (microsoft.public.excel.misc)
  • Re: C# Nullable types
    ... applicable" have never been identified with "null" in SQL or anywhere else. ... purpose and meaning and the minute you try to attach a meaning that is ... empty string will do. ... but if we don't know the price, that doesn't make the price null, it ...
    (microsoft.public.dotnet.framework)
  • Re: C# Nullable types
    ... I will just end with how the SQL Server doc explains this. ... meaning of null, which is the point of this thread. ... into the field" which is IMO bad form at least to do systematically. ... use an empty string or 0 as a default value if it makes senses. ...
    (microsoft.public.dotnet.framework)
  • Re: What is the logic of storing XML in a Database?
    ... will trap most major errors. ... In fact one does, XML. ... CSV is useful for unloading an SQL table into a text ...
    (comp.databases.theory)