Hello All

I've tried the following SQL statement which does work via SQL Server 6.5.
However, it does't seem to work when I run the same statment through DBI:

select p.pieceref, d.document_id, dd.full_date,
grant_description, heading,
convert(varchar(255), document_type_description) as document_description,
physical_format, 
number_of_folios_etc, language = CASE 
 when english_indicator = 1 then 'English'
when french_indicator = 1 then 'French'
when Latin_indicator = 1 then 'Latin'
 END, convert(varchar(255), document_note) as document_note,
names_indicator = CASE names_indicator when 1 then 'includes names of
individuals' END, 
goods_indicator = CASE goods_indicator when 1 then 'includes record of goods
assessed' END
 from list_heading as lh 
inner join piece_heading as ph on lh.heading_id = ph.heading_id
inner join piece as p on ph.piece_id = p.piece_id
left outer join document as d on p.piece_id = d.piece_id
left outer join document_grant as dg on d.document_id = dg.document_id
inner join grant_ as g on dg.grant_id = g.grant_id
inner join document_date as dd on d.document_id = dd.document_id 
order by p.pieceref

Any help would be appreciated.

thanks

Chris

Reply via email to