Closed vivekratnavel closed 8 years ago
Hmmm... dont know why CONCAT()
is not supported.
You can make a user defined function to let it work.
alasql.fn.CONCAT = function(){
return arguments.join('');
}
now it should work (Sorry - cant test it now)
This needs to be implemented as part of the library
@mathiasrw Close, but the arguments object is not an Array, so you'd have to do something like
alasql.fn.CONCAT = function(){
return Array.prototype.slice.call(arguments).join(' ');
}
:+1:
Thanks for improvement...
JS - the language that keeps giving you surprises... :)
I knew that when you do a console.log(arguments) it spits out like an array - but only now do I realise that you cant join the damn thing
a = function(){console.log(arguments)}
a(3,4) // [3, 4]
a = function(){console.log(arguments.join(','))}
a(3,4) // Uncaught TypeError: arguments.join is not a function(…)
Just added CONCAT() to the standard library.
Closed per request from #628
Is there an in-built function to concatenate columns or strings like CONCAT() in mysql?