This topic is locked

concatenate fields

12/4/2007 3:22:04 PM
PHPRunner General questions
J
jskewes author

Hi - a little help please.

I have poured through the forums looking for help on concatenation but nothing that I have found seems work.

How would I go about concatenating all these "options" fields into one --> "option" field?

Thanks in advance.

/john
select [ID],

[DIS],

[Series],

[Make],

[ST#],

[YEAR],

[MODEL],

[MILES],

[COLOR],

[INTERIOR],

[TRANS],

[OPTIONS],

[OPTIONS2],

[OPTIONS3],

[OPTIONS4],

[OPTIONS5],

[OPTIONS6],

[CPO],

[PRICE],

[Sales Rep],

[Inputed],

[Status]

From [CarsBMW] where [series]='7 Series'

mic'',) 12/4/2007

Hi John,
Try to do this, in the visual editor if you use drop down option you will find your answer there, try to use this for example to view MODEL and MAKE concat(model,' ',make) but fisrt you will choose the index you will need.

J
jskewes author 12/5/2007

Hi Miceiw,

Thanks for your response. I am not sure what you are saying. Forgive me if I am missing the obvious.
"in the visual editor if you use drop down option you will find your answer there,"

Where in the Visual Editor are you referring to? I am not creating a selection box. I am trying to combine a number of fields into one for display on the list page.
The string you show --> concat(model,' ',make) looks right and is what I have been trying to feed into the 'Edit SQL' area (which it seems to me to be where it belongs.)

I would modify it to be something like,
concat(model,' ',make)as features
Some of what I find out there looks like 'concat' has been (or in other SQL variants) replaced with 'select'. so the statement would be;
select(model,' ',make)as features
The SQL editor will not bite.
Thanks for the help. I appreciate it.

/john

mic'',) 12/5/2007

Hi John,
I see what you mean.
(THIS IS ONLY A SAMPLE OF CONCAT IN SQL)

Try this in EDIT sql "SELECT select `ID``, `DIS`,`Series`,`Make`,`MODEL`,`COLOR`,`INTERIOR`,`TRANS`,`Status`, CONCAT(MODEL,' ',MAKE) AS CAR

FROM `CarsBMW` WHERE [series]='7 Series'
-mi©eiw