On 29/04/2013 15:05, Mauricio de Abreu Antunes wrote:
I know my question is very weird, but Have you ever tried the same SQL string in the firebird console?
Not weird at all.

I use IBExpert for this and when I do it in a session all works fine.

Just to expand, all this is used by views for I18N enabled tables which look like this:

CREATE OR ALTER VIEW WINESTYLE_LV(
    ID,
    CENTRALKEY,
    NAME,
    CODE,
    FK_WINEFAMX_ID,
    FK_WINESTYLET_ID,
    FK_DRINKTYPE_ID,
    FK_WINEGLASS_ID,
    FK_LANGUAGE_ID,
    FK_WINESTYLE_L_ID)
AS
SELECT
        o.id,
o.centralkey,
COALESCE(t.name, o.name) COLLATE UNICODE_CI_AI,
o.code,
o.fk_winefamx_id,
o.fk_winestylet_id,
o.fk_drinktype_id,
o.fk_wineglass_id,
COALESCE(t.FK_LANGUAGE_ID, 1),
t.ID

        from winestyle o
            LEFT OUTER JOIN winestyle_l t on t.fk_winestyle_id=o.id
AND t.fk_language_id=rdb$get_context('USER_SESSION', 'LANGUAGE_ID')
;

If I then do in the console this:

select rdb$set_context('USER_SESSION', 'LANGUAGE_ID', 3)  from rdb$database;

3 stands for French and then I look at the above view the name column contains all the French texts unless it is not translated then it shows the default, which is English.

Werner

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to