How can I do a INSERT with parameters inline at SQLite?

I am generating a Sqlite from Sql Server, to do this I first run a script on sql server that returns a string with thousands of lines, like this:

INSERT INTO [Criterio] 
  ([cd1], [cd2], [cd3], [dc4], [dc5], [dt6], [dc7], [dt8],
    [dt9], [dt10], [dt11])
VALUES
  ('FFFFFFFF-FFFF-FFFF-FFFF-B897A4DE6949',10, 20, '', NULL, NULL,'', NULL,
    julianday('2011-11-25 17:00:00'), NULL, NULL);

But it is too slow(I am already using transaction). I did another test using parameters, and I have a big performance improvement.

Does SQLite have any way to pass variables together in an INSERT statament, like sql server do.

Resuming, what I need is to generate a text script to do inserts. But using parameters. SQL Server works using this:

EXECUTE sp_executesql @sqlCommand, N'@city nvarchar(75)', @city = @city

Answers


It´s not possible. I resolved reading the data from SqlServer to a DataTable, then I create a DbCommand with parameters, filling parameters and calling ExecuteNonQuery for each line.


Need Your Help

“script/generate cucumber” on Windows

ruby rubygems cucumber

I'm trying to use Cucumber with Ruby, Watir-Webdriver and without Rails. And that`s all on Windows :(

How to find all paths up to specific length among pairs contained in a set of N vertices with Gremlin

graph orientdb gremlin

I would like to have as an input N vertices, then I would like to return all the paths up to specific length that are between all the pairs among those N vertices. How can this be done in Gremlin?