var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Select Sql Error
PLease help me solve this syntax error.
select * ,'ALL' as all from TEST.SAMPLE;
3:42:37 [SELECT - 0 row(s), 0.000 secs] [Error Code: -104, SQL State: 42601] An unexpected token "*" was found following "select ". Expected tokens may include: "?".
Trying to add a column to the select results.
Thanks in Advance,
Select * tells DB2 to Select all columns.
Your statement should look like - SELECT * FROM Test.Sample
When naming your own column in your results you would do something like:
SELECT count(*) as CNT FROM Test.Sample
SELECT fName as FirstName FROM Test.Sample
Originally Posted by venky5436
select T.* ,'ALL' as all from TEST.SAMPLE T;
Originally Posted by nidm
Thanks this works,