Skip to Content
0
Former Member
May 11, 2011 at 12:42 PM

Manipulate Data in SQL Statement

20 Views

Hello there!

I want to manipulate Data in a SQL Statement. For instance:

SELECT
   name
   age
FROM pers INTO CORROSPONDING FIELDS OF it_ppl WHERE company = '01'.

The outcome would be something like

Hans   25
Sam    23
Marie  28
Julia  23

So what if I want to add an column behind the selected data, where the data output should not be variable from the database but a konstant, fix value?

I tried it like that:

SELECT
   name
   age
   'Fix value' AS value
FROM pers INTO CORROSPONDING FIELDS OF it_ppl WHERE company = '01'.

Outcome should be like

Hans   25  Fix value
Sam    23  Fix value
Marie  28  Fix value
Julia  23  Fix value

The big question is: a) Is this possible with Open SQL and if so b) how?!

Thanks in advance,

kind regards,

Christof!