Groups > dBase > dBase SQL Servers > Re: using a conditon in concat ( )




using a conditon in concat ( )

using a conditon in concat ( )
Fri, 29 Feb 2008 12:29:09 -060
Is is possible to include a condition in your concat to derive one of two 
values within a concat( )


example:

The following returns either a T or F and I would like to return either a 1 
or 0

q.sql = [select ]+;
 [concat(t1.respond) as "Responded", ]





Post Reply
Re: using a conditon in concat ( )
Fri, 29 Feb 2008 12:34:26 -060
Never mind.  I was focused on the wrong part of the equation.

It was not the name of the field I wanted changed it was the value

> q.sql = [select ]+;
> [concat(t1.respond) as "Responded", ]

So my test was in the output of the field ie:

cValue = iif( f['Respond'].value = "T", "1","0")
puts([<td>])
puts( cValue )
puts([</td>])

Post Reply
about | contact