PERFECT! Thanks Puneet!
Mr. Puneet Kishor-2 wrote:
>
>
> On Apr 18, 2012, at 11:20 PM, starvingpilot wrote:
>
>>
>>
>>
>> Puneet Kishor-2 wrote:
>>>
>>>
>>> On Apr 18, 2012, at 11:10 PM, starvingpilot wrote:
>>>
Here's a query that works
sqlStatement = [NSString
On Apr 18, 2012, at 11:20 PM, starvingpilot wrote:
>
>
>
> 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 '%@ %'",theSt
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 str
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 || ' k
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')
one last thing, sorry to be such a pain... how can I search for a specific
state? Right now it's listing ALL the states, I need to list from a
specific state like "CA"
--
View this message in context:
http://old.nabble.com/trim-alpha-numeric-string-so-it%27s-numeric-cast-then-order-tp33711898p3
On Apr 18, 2012, at 11:04 PM, starvingpilot wrote:
>
> I actually did have the parenthesis there... I didnt copy and paste the last
> one. It was there however and I am still having problems
>
Well, it is hard to help you unless you tell us exactly what problem you are
having. You might wan
disregard, so the query works on sqlite terminal, just not on my app. Thanks
for the help, ill work on it from here... cheers!
--
View this message in context:
http://old.nabble.com/trim-alpha-numeric-string-so-it%27s-numeric-cast-then-order-tp33711898p33711989.html
Sent from the SQLite mailing
I actually did have the parenthesis there... I didnt copy and paste the last
one. It was there however and I am still having problems
--
View this message in context:
http://old.nabble.com/trim-alpha-numeric-string-so-it%27s-numeric-cast-then-order-tp33711898p33711982.html
Sent from the SQLite
On Apr 18, 2012, at 11:01 PM, starvingpilot wrote:
>
> Also, I need to select from a specific state like "CA" Where is that part in
> the query?
SELECT state, power || ' kW' power
FROM (
SELECT state, Cast(Rtrim(power, 'kW') AS 'numeric') power
FROMstati
Also, I need to select from a specific state like "CA" Where is that part in
the query?
--
View this message in context:
http://old.nabble.com/trim-alpha-numeric-string-so-it%27s-numeric-cast-then-order-tp33711898p33711973.html
Sent from the SQLite mailing list archive at Nabble.com.
_
On Apr 18, 2012, at 10:47 PM, starvingpilot wrote:
>
> Thanks for the quick reply Puneet. However I had a syntax error on App as
> well as when I typed that query on my sqlite browser. Here's my syntax
> "SELECT state, power || ' kW' power FROM (SELECT state, Cast(Rtrim(power,
> 'kW') AS 'nume
Thanks for the quick reply Puneet. However I had a syntax error on App as
well as when I typed that query on my sqlite browser. Here's my syntax
"SELECT state, power || ' kW' power FROM (SELECT state, Cast(Rtrim(power,
'kW') AS 'numeric') power FROM stations ORDER BY power"
table: stations
fiel
On Apr 18, 2012, at 10:27 PM, starvingpilot wrote:
>
> Greetings! I am currently working on an iOS app and not too well versed in
> SQLite. Here's what I am trying to do.
>
> I have a table "stations" and the fields "state" populated by US States and
> "power" which is populated with strings
14 matches
Mail list logo