question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bulkload to Temporary Table Error

See original GitHub issue

Having an issue then trying to bulkload to a temporary table:

Temp Table Creation Script:

CREATE TABLE ##DummyTable_Site ( [DimId] int NOT NULL, [Type] nvarchar(200), [Status] nvarchar(200), [Grp] nvarchar(200), [Cat] nvarchar(200), [Desc] nvarchar(500), [Name] nvarchar(200), [Cd] nvarchar(200) NOT NULL,[CRD] datetime2, [CUId] int, [DSId] int)

connection.newBulkLoad('##DummyTable_Site', { keepNulls: true }, ... );
... Columns and Rows added here
connection.execBulkLoad(bulkLoad);

After executing execBulkLoad getting the below error

Error: message:“An unknown error has occurred. This is likely because the schema of the BulkLoad does not match the schema of the table you are attempting to insert into.”

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mikalai-sokaraucommented, Nov 28, 2019

Hi @IanChokS, thank you very much, it helped!

1reaction
IanChokScommented, Nov 19, 2019

You can try just using a regular SQL command such as

let sqlCommand = 'ALTER TABLE table_name ADD column_name datatype;'

Then using the regular tedious API connection.execSql(sqlCommand);. See if that works?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sql Server Bulk Insert into temporary table syntax error
It is not possible to bulk insert in table variable. so you can use temp table. USE magdasync GO CREATE Table #TempTable( insz...
Read more >
oimbulkload gives error for loading accounts — oracle-tech
Hi All, We are trying to use bulk load utility to load accounts to Unix machine. ... We checked the log files &...
Read more >
Bulk Load Security Considerations (SQLXML) - SQL Server
Bulk Load can create and delete temporary tables within the database, and needs permissions to do so. Permissions to these tables will be...
Read more >
Bulk Insert to a temorary table – SQLServerCentral Forums
Hi;. I would like to use the following code to insert data from a CSV file into a temporary table. IF OBJECT_ID(N'TempDb.
Read more >
SELECT INTO TEMP TABLE statement in SQL Server
In this way, we can copy the source table data into the temporary tables in a quick manner. SELECT INTO TEMP TABLE statement...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found