Puneet Kishor-2 wrote:
>
>
> On Apr 18, 2012, at 11:10 PM, starvingpilot wrote:
>
>>
>> Here's a query that works
>>
>> sqlStatement = [NSString stringWithFormat:@"SELECT * FROM stations WHERE
>> state like '%@ %'",theState]; <--- this yields a result: 0
>>
>> sqlStatement = [NSString stringWithFormat:@"SELECT state, power || ' kW'
>> power FROM (SELECT state, Cast(Rtrim(power, 'kW') AS 'numeric') power
>> FROM
>> stations ORDER BY power)",theState];
>>
>> I get a result: 1 from that last one... "theState" in this code is a
>> variable for that specific state I need.
>
>
> I don't see a question above. It's not clear if you are asking something.
> Wrt to filtering by state, I already sent you an example for that. Hope
> that helped.
>
>
> --
> Puneet Kishor
>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
Your query netted a result of ALL states... I'd like to search a specific
state for example.. I'd like to find antennas in CA only and order by
power.
--
View this message in context:
http://old.nabble.com/trim-alpha-numeric-string-so-it%27s-numeric-cast-then-order-tp33711898p33712020.html
Sent from the SQLite mailing list archive at Nabble.com.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users