Subject | RE: [firebird-support] sql question |
---|---|
Author | Henrik Sitter |
Post date | 2004-01-21T15:31:01Z |
Hi, Milan.
I tried the following at it seems to do the trick:
if (exists(select 1 TABLENAME, COLUMNNAME, cast(COLUMNVALUE as Integer)
from USED_TABLE
where ((TABLENAME = 'ARTNR_SW_TABELL') and (COLUMNNAME =
'SW_ARTNR') and (COLUMNVALUE = :IN_SW_ARTNR)) )) then
begin
.
.
end
I'm not 100% sure about the syntax I must admit...
Thx,
Henrik
-----Original Message-----
From: Milan Babuskov [mailto:albis@...]
Sent: 21. januar 2004 15:04
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] sql question
Henrik Sitter wrote:
How does DDL from USER_TABLE look like?
--
Milan Babuskov
http://fbexport.sourceforge.net
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
I tried the following at it seems to do the trick:
if (exists(select 1 TABLENAME, COLUMNNAME, cast(COLUMNVALUE as Integer)
from USED_TABLE
where ((TABLENAME = 'ARTNR_SW_TABELL') and (COLUMNNAME =
'SW_ARTNR') and (COLUMNVALUE = :IN_SW_ARTNR)) )) then
begin
.
.
end
I'm not 100% sure about the syntax I must admit...
Thx,
Henrik
-----Original Message-----
From: Milan Babuskov [mailto:albis@...]
Sent: 21. januar 2004 15:04
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] sql question
Henrik Sitter wrote:
> I have a stored procedure with some input parameters, and one is anThis
> integer that I would like to convert/cast from integer to varchar.
> casted value is used in a where clause:and
>
> if (exists(select 1 from USED_TABLE where ((TABLENAME = 'tableOne')
> (COLUMNNAME = 'colOne') and (COLUMNVALUE = :IN_INT)) )) then beginHave you tried: CAST(:IN_INT as varchar(33)) ?
>
> It is the input parameter IN_INT that needs to be casted to varchar.
>
> Anyone?
How does DDL from USER_TABLE look like?
--
Milan Babuskov
http://fbexport.sourceforge.net
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/