Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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?

Tags (1)
6 Replies
jsn
Honored Contributor

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

Why doesn't it work?

Not applicable

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

I have this error:

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

jsn
Honored Contributor

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

Why don't you just do:

Load

          *,

          'TOTO' as Name;

select *

from----

Not applicable

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

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 '*' ?

jsn
Honored Contributor

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

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

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

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.

Community Browser