nembel / apps / txtsql
app name
SQL: csv → sql
command
/txtsql
description
Given delimited data like CSV or TSV, generate insert SQL statements. [EXPERIMENTAL]

Auto-detects the delimiter for column separation.

Tip: Will work on text copied/pasted from MS Excel, and similar spreadsheet programs.

EXAMPLE:
abc, -
def, +

insert into #tmp(id, c1, c2, c3) values (1, N'abc', N'-')
insert into #tmp (id, c1, c2, c3) values (2, N'def', N'+')

Output includes SQL to create the #tmp table.

TIP: use search/replace on the output to modify the table or column names.

RELATED: /csvtbl, /httbl, /txtsplita
how to use this app

Option 1: Click the "try it now button" above.

Option 2: Go to nembel.com and type /txtsql

Option 3: Install this bookmarklet: /txtsql

Option 4: Install the Nembel toolbar bookmarklet to instantly access hundreds of tools like this on any web page.

about nembel web apps

Nembel web applications are online tools, utilities, and search shortcuts. Each one can be used from the home page, the toolbar, or saved as separate bookmarklets. Our instant online apps can be used without logging in or signing in. No account, no signup, and no registration is required or necessary.

Many can be used directly and instantly on the Nembel home page.

Visit the home page and type keywords to see relevant tools, or browse the list at nembel.com/apps/