Skip to content

Commit e0cbf82

Browse files
committed
Fix for columns with spaces in name
1 parent 32fab8a commit e0cbf82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/views/schemaBrowser/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ export default class schemaBrowser {
479479
if(hasHeaders) {
480480
// Get headers using the first row of data
481481
const colNames = Object.keys(rows[0]);
482-
const cols = colNames.join(', ');
482+
const cols = colNames.map(c => c.includes(` `) ? `"${c}"` : c).join(', ');
483483

484484
// Generate the INSERT statement
485485
content = `INSERT INTO SYSIBM.SYSDUMMY1 (${cols}) \nVALUES\n`;

0 commit comments

Comments
 (0)