Subject | Re: [firebird-support] Importing from spreadsheet |
---|---|
Author | Kjell Rilbe |
Post date | 2012-02-29T12:47Z |
Depending on the amount of data etc, I sometimes create an Excel formula
that outputs an SQL insert statement that I copy into e.g. FlameRobin.
A formula could look like this (UNTESTED and I'm used to Swedish Excel...):
="insert into ""MyTable"" (""Id"", ""Name"", ""Nickname"") values
("&A2&", '"&B2&"', "&if(isempty(c2),"null","'"&c2&"'")&");"
Assuming the formula is entered into D2 and column A contains numeric
id:s, B contains non-nullable name and C contains optional/nullable
nickname. Then just fill/copy the formula to all data rows and paste the
resulting contents of col D into FlameRobin or similar.
Kjell
Mags Phangisa skriver:
that outputs an SQL insert statement that I copy into e.g. FlameRobin.
A formula could look like this (UNTESTED and I'm used to Swedish Excel...):
="insert into ""MyTable"" (""Id"", ""Name"", ""Nickname"") values
("&A2&", '"&B2&"', "&if(isempty(c2),"null","'"&c2&"'")&");"
Assuming the formula is entered into D2 and column A contains numeric
id:s, B contains non-nullable name and C contains optional/nullable
nickname. Then just fill/copy the formula to all data rows and paste the
resulting contents of col D into FlameRobin or similar.
Kjell
Mags Phangisa skriver:
>[Non-text portions of this message have been removed]
> Hi,
>
> Is there a way I can import data from a spreadsheet into a table? Any help
> will be greatly appreciated.
>
> Mags
>
> [Non-text portions of this message have been removed]
>
>
> ~-|**|PrettyHtmlEnd|**|-~ ~-|**|PrettyHtmlStart|**|-~
> ~-|**|PrettyHtmlEnd|**|-~ end group email
> --
> ------------------------------
> Kjell Rilbe
> DataDIA AB
> E-post: kjell.rilbe@...
> Telefon: 08-761 06 55
> Mobil: 0733-44 24 64