Dave

Please *always* post to [EMAIL PROTECTED]

>
> Not sure about this one, but it appears that my version
> ($DBD::ODBC::VERSION = '0.40';) doesn't deal with nulls properly.

Please upgrade to .45_18, if possible.

Also, post code, if possible.  With select * you usually can't assume the
column ordering.  Try using fetchrow_hashref and use Data::Dumper to view
the contents.

Finally, post a trace file (set the level = 9) along with the code
($dbh->trace(9,'filename.log').

Regards,

Jeff

>
> I've been selected some data, and when one of the fields is a null, it's
> being populated with the value from that field in the previous returned
> row.
>
> Some data:
>
> select * from strand_content where sc_group_code =
> 'MUSIC_CONTENT'
> and str_uniq_id = '94F6C407-D567-11D6-A75A-00508BFCB09E' and
> sc_index =
> 5 and ( (SC_ITEM_CODE = 'DURATION') OR (SC_ITEM_CODE = 'PERFORMER'))
>
> Gives:
> (field order: str_uniq_id, sc_group_code, sc_item_code, sc_index,
> sc_value, sc_last_mod, sc_last_mod_user)
> (str_uniq_id isn't showing as i need to convert(varchar(255),
> str_uniq_id) if i want it to show. not relevant here.
>
>
> $VAR1 = [
>           [
>             '',
>             'MUSIC_CONTENT',
>             'DURATION',
>             '5',
>             '',
>             'Oct 17 2002 05:02PM',
>             'RAP Administrator'
>           ],
>           [
>             '',
>             'MUSIC_CONTENT',
>             'PERFORMER',
>             '5',
>             'RICHARD G. MITCHELL',
>             'Oct 17 2002 05:02PM',
>             'RAP Administrator'
>           ]
>         ];
>
> Note the value of the fifth field.  null for DURATION (when checked in
> Query analyser), although IME with DBI this normally is given as undef
> rather than ''.  And RICHARD G. MITCHELL for PERFORMER.
>
> If i swap the order around:
>
> select * from strand_content where sc_group_code =
> 'MUSIC_CONTENT'
> and str_uniq_id = '94F6C407-D567-11D6-A75A-00508BFCB09E' and
> sc_index =
> 5 and ( (SC_ITEM_CODE = 'DURATION') OR (SC_ITEM_CODE = 'PERFORMER'))
> order by sc_item_code desc
>
> then i get this:
>
>
> $VAR1 = [
>           [
>             '',
>             'MUSIC_CONTENT',
>             'PERFORMER',
>             '5',
>             'RICHARD G. MITCHELL',
>             'Oct 17 2002 05:02PM',
>             'RAP Administrator'
>           ],
>           [
>             '',
>             'MUSIC_CONTENT',
>             'DURATION',
>             '5',
>             'RICHARD G. MITCHELL',
>             'Oct 17 2002 05:02PM',
>             'RAP Administrator'
>           ]
>         ];
>
> Both fields are now RICHARD G. MITCHELL.
>
> This seems a bit odd (and broken) to me.  I'd be happy to help in
> further debugging if i can (or happy to have it explained what i'm
> misunderstanding :)
>
> Cheers,
>
>
> --
> dave thorn | [EMAIL PROTECTED]
>


Reply via email to