Subject | Re: [firebird-support] only for numerics... |
---|---|
Author | Martijn Tonies |
Post date | 2006-03-11T15:05:29Z |
Hello Rony,
to ask from a server?
Gimme all rows where AFIELD is small than 20, except
when it's a value that cannot be converted, then do, eh,
well, whatever.
What is in the column? And what do you want to have as
the result?
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> I wondered whether there's any chance of filtering in a where clause allthe
> numbers... even though I'm not sure they're numbers!!!Could be me, but why? Isn't this a rather silly question
>
> Having
>
> CREATE TABLE Test(AFIELD VARCHAR(32));
>
> INSERT INTO Test(AFIELD) VALUES ('abc');
> INSERT INTO Test(AFIELD) VALUES ('15');
> INSERT INTO Test(AFIELD) VALUES ('30');
>
> I'd like to extract only the second record, saying something
> SELECT * FROM Test
> WHERE CAST(AFIELD AS INTEGER) < 20;
>
> The above example, obviously, doesn't work... otherwise would I be posting
> this? ;))
to ask from a server?
Gimme all rows where AFIELD is small than 20, except
when it's a value that cannot be converted, then do, eh,
well, whatever.
What is in the column? And what do you want to have as
the result?
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com