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.

Single character column names

See original GitHub issue

As of the submission of this issue I am using the latest version of this package. When I perform a SELECT query on my IBM Db2 database it returns only the first character of the column name.

app.get("/getNegatives", function (req, res, next) {
	odbc.connect(process.env.CONN_STR, (err, conn) => {
		if (err) return console.log(err);
		conn.query(`SELECT B4CONB AS PRODNUM, B4C2QT AS STOCK FROM PRODSTOCK WHERE B4C2QT<0 AND B4BKCD='STORL1' ORDER BY B4C2QT ASC`, (err, data) => {
			conn.close((err) => {
				if (err) return console.log(err);
				res.send(data);
			});
		});
	});
});
[
  {
    "P": 289233,
    "S": -71
  },
  {
    "P": 289240,
    "S": -63
  },
  {
    "P": 2987008,
    "S": -53
  }
]

This is the first time I’ve created an issue on a GitHub repository so forgive me if I’m doing something wrong.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
markdirishcommented, Jul 31, 2020

Getting a change out soon. As a temporary fix, you can remove UNICODE from the defines in binding.gyp and recompile with npm install --build-from-source, or you can downgrade to version 2.3.1

0reactions
markdirishcommented, Aug 10, 2020

Should be fixed on version 2.3.4, available now on NPM.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Column Name Limitations - Open Database Connectivity ...
If column names contain any characters except letters, numbers, and underscores, the name must be delimited by enclosing it in back quotes (`)....
Read more >
Special Characters in Column Names
Column names with special characters require special treatment. ... Single quotes, 'column name'. Double quotes, "column name".
Read more >
Separate a character column into multiple columns with ... - tidyr
Given either a regular expression or a vector of character positions, separate() turns a single character column into multiple columns.
Read more >
Vaex: replace single character in column names
Since you know how you want to update each column name, you can loop over the column names and call the df.rename method:...
Read more >
colnames: Row and Column Names - Rdrr.io
Retrieve or set the row or column names of a matrix-like object. ... For a data frame, value for rownames should be a...
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