Skip to content

Bug in ORDER BY 1 #125

Closed
Closed

Description

@agershun

This sequence

    alasql('SELECT * FROM TSV("sensor_data.txt",{headers:true}) ORDER BY 1',[],function(res){
        console.log(res);
    });

gives error:

    alasql.min.js:5 Uncaught TypeError: Cannot read property 'reduced' of undefined
    yy.Expression.toJavaScriptalasql.min.js:5 (anonymous function)
    yy.Select.compileOrder

Activity

  1. agershun commented on Apr 18, 2015

    @agershun
    MemberAuthor

    :) The problem was that I sed star in the query. AlaSQL could not find any column name, of course.
    Now all works fine.

  2. agershun commented on Apr 20, 2015

    @agershun
    MemberAuthor

    Sample:

         -- works fine
          var res = alasql('SELECT COLUMN DISTINCT city#country#name AS country\
               FROM Person ORDER BY country');
    
         -- does not work
           var res = alasql('SELECT COLUMN DISTINCT city#country#name\
               FROM Person ORDER BY 1');
    

    error

         ReferenceError: alasql is not defined 
    
  3. mathiasrw commented on Dec 28, 2015

    @mathiasrw
    Member

    Can you elaborate on the # part of the city#country#name notation?

  4. added a commit that references this issue on Nov 19, 2025
    28b1be2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions