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.

Usage of NEXT in find is not supported SQL server 2008

See original GitHub issue

When I try the find method on a string based column using where clause, I get a result of the following:

Executing (default): SELECT [UserID], [UserCreateDate], [UserCreateIP], [UserModifyDate], [UserModifyIP], [UserDeleted], [UserReset], [UserEmail], [UserPassword], [UserName], [UserAdmin], [Participant
ID], [UserIsEmployee] FROM [Users] AS [Users] WHERE [Users].[UserEmail] = 'a' ORDER BY [UserID] OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY;

This is the code for my find method:

models.Users.find({
 where:{
  UserEmail: "b"
 },
}).then(function(projects) {
 console.log(projects)
}).catch(function(error){
 console.log(error);
});

It looks like it is adding offset, order by, and fetch, but I didn’t specify those. For what I know this is not compatible with Microsoft SQL Server 2008, which is what I am using. Correct me when I am wrong. Any information will be appreciated.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
SteveyPugscommented, Apr 2, 2015

Currently the only way I found with @kiddkevin00 to get around that is to set the limit to null in the find method.

1reaction
kiddkevin00commented, Jul 25, 2015

@itsravenous Cuz the way we get around this so far is set the limit to null or 0. But, do you know why this can work magically? Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

List of issues that are fixed by SQL Server 2008 Service Pack 3
This article lists SQL Server 2008 issues that are fixed by Microsoft SQL Server 2008 Service Pack 3 (SP3). Notes. Some issues that...
Read more >
What is not supported in SQL Server 2016 over 2008 R2
I want to upgrade SQL Server from 2008 R2 to 2016. Is there a query on SQL Server 2008 R2 that is no...
Read more >
node-mssql | Microsoft SQL Server client for Node.js
Also you should use this if you're plan to work with local temporary tables (more information here). NOTE: Table-Valued Parameter (TVP) is not...
Read more >
Using a Microsoft SQL Server database as a source for AWS ...
AWS DMS doesn't support server level audits on SQL Server 2008 or SQL Server 2008 R2 as sources ... Set up ongoing replication...
Read more >
SQL Comments - W3Schools
Comments are used to explain sections of SQL statements, or to prevent execution of SQL ... Comments are not supported in Microsoft Access...
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