Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

-- SQL : How to select all fields + add a field in the same query? --

Hello,

I have a question about using SQL in QlikView:

I have these 2 queries and I want to merge them:

1/  select *

     from----

2/  select 'TOTO'   as Name

     from----

and I want to do something like :

select *,'TOTO'  as Name

from---

but of course this doesn't work.

Someone have a idea?

6 Replies
Anonymous
Not applicable
Author

Why doesn't it work?

Not applicable
Author

I have this error:

SQL##f - SqlState: S1000, ErrorCode: 923, ErrorMsg: [Oracle][ODBC][Ora]ORA-00923: FROM keyword not found where expected

Anonymous
Not applicable
Author

Why don't you just do:

Load

          *,

          'TOTO' as Name;

select *

from----

Not applicable
Author

I need in this file to select and store,

not to load!

And you dont have another idea using the select?or to replace the '*' ?

Anonymous
Not applicable
Author

I'm a bit lost as to what you're doing actually.

You want to load a table and add a field called Name containing the string 'TOTO'.

Then you want to store this table.. as a QVD I assume?

Not applicable
Author

Ok,i will be more explicit:

I have 2 qwv files, 1 to select the fields I need  (in this case all the fields and the field 'TOTO')

and another fields to load the fields (maybe 2 fields and 'TOTO') .

And Yes i store them in a qvd file.

So i need to use the select to dont make connection with tables.