-2

I am searching... and I don't find how can I find in SQlite what is the position of an item in the column.

When i use ROW_NUMBER() i get:

ERROR: near "(": syntax error (code 1)

SELECT Nom ROW_NUMBER () OVER (ORDER BY Score) AS Rownumber 
FROM tableau

I'm using MIT App Inventor with Taifun extension sqlite

Other question how to know which item is in position 2 (or another number) in the column?

Taifun
  • 6,165
  • 17
  • 60
  • 188
clement pignet
  • 105
  • 2
  • 9

2 Answers2

0

This is too long for a comment.

ROW_NUMBER() is an ANSI-standard function. However, not all databases use it. For instance, SQLite, MySQL, and MS Access (among others) do not support this functionality.

Presumably, you are using one of these database that does not support this function.

I would suggest that you research what database you are using. Then, try investigating how to implement the functionality you want using that database. If you can't figure out how, ask another question, providing sample data, desired results, and a tag for the database you are using.

Matt Gibson
  • 37,886
  • 9
  • 99
  • 128
Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786
0

If this is indeed the code you are running:

SELECT Nom ROW_NUMBER () OVER (ORDER BY Score) AS Rownumber FROM tableau

Then what is Nom? This is a syntax error in practically every implementation. What you are probably looking to do is:

SELECT Nom, ROW_NUMBER () OVER (ORDER BY Score) AS Rownumber FROM tableau

Notice the comma after Nom.

AOK
  • 493
  • 5
  • 16