Subject | Re: [firebird-support] Expressions |
---|---|
Author | Tiago Mikhael Pastorello Freire |
Post date | 2005-07-19T17:54:58Z |
On Tuesday 19 July 2005 16:55, Martijn Tonies wrote:
Assume AField is INTEGER and AnOtherField is CHAR:
SELECT (AField + CAST(AnOtherField AS INTEGER) AS FieldsTotal FROM FieldsTable
> Hi,And if you are trying to mix char and number values use CAST like this:
>
> > The query below dosn't work.
>
> "doesn't work" ... ??
>
> > "SELECT (AField + AnOtherField) AS FieldsTotal FROM FieldsTable"
> >
> > Is there a way to run queries includes expressions in ib/fb(Like Stored
> > procedures etc.).
>
> Assuming AField and AnOtherField are character fields, use the
> string concatenation symbol: ||
Assume AField is INTEGER and AnOtherField is CHAR:
SELECT (AField + CAST(AnOtherField AS INTEGER) AS FieldsTotal FROM FieldsTable
>
> With regards,
>
> Martijn Tonies
> Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
> Server
> Upscene Productions
> http://www.upscene.com
> Database development questions? Check the forum!
> http://www.databasedevelopmentforum.com
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
>
>
>
> SPONSORED LINKS
> Technical support Computer security Computer technical support
> Computer training Free computer technical support
>
>
> YAHOO! GROUPS LINKS
>
>
> Visit your group "firebird-support" on the web.
>
> To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.