Subject | Re: [IBO] statement Union in a TIBO_Query |
---|---|
Author | Sergio Zoccante |
Post date | 2004-08-30T13:48:07Z |
Hallo!
You can CAST(Field1 AS VARCHAR(8)) and CAST(Field2 AS VARCHAR(8)) to resolve your problem without modify the rest.
I use this method and it works fine.
Sergio
Vahan Yoghoudjian wrote:
it's not compliant with SQL99 if the field sizes are different.
There is no problem just making both VARCHAR(8) even if your application
limits one to 4 characters. Swings and roundabouts on CHAR(8), it would
save the two size bytes, but adds the rest of the white space as bytes
instead.
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Yahoo! Groups Sponsor
ADVERTISEMENT
------------------------------------------------------------------------------
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/IBObjects/
b.. To unsubscribe from this group, send an email to:
IBObjects-unsubscribe@yahoogroups.com
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
You can CAST(Field1 AS VARCHAR(8)) and CAST(Field2 AS VARCHAR(8)) to resolve your problem without modify the rest.
I use this method and it works fine.
Sergio
Vahan Yoghoudjian wrote:
> Yes I have codes in the client table longer than 4 characters, as for theMaybe none - there has been some work in changing this, but I think that
> NAME fields they have the same size but I tried with fields of different
> size and I had no problem, I guess having this problem on the CODE fields is
> because both fields are the primary keys in their tables. Ideally what I
> should do is to convert the CODE field in operators table to char(8) same as
> the CODE in Clients, but then I have to change my coding policy for
> operators in my application.
>
> What kind of errors do you expect for varchar to give later on?
it's not compliant with SQL99 if the field sizes are different.
There is no problem just making both VARCHAR(8) even if your application
limits one to 4 characters. Swings and roundabouts on CHAR(8), it would
save the two size bytes, but adds the rest of the white space as bytes
instead.
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Yahoo! Groups Sponsor
ADVERTISEMENT
------------------------------------------------------------------------------
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/IBObjects/
b.. To unsubscribe from this group, send an email to:
IBObjects-unsubscribe@yahoogroups.com
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]