July 4, 2013 at 7:59 am
Hi there
Hope someone can help me here please..... I have the following view which displays "Unsupported datatype" in the ACGRP2 column. I can the same result with or without the CONVERT function, thanks.
SELECT DISTINCT coa.client, CONVERT(varchar(5), coa.account) AS accelem, relvalue_ACGRP2.rel_value AS ACGRP2
FROM agr.dbo.accounts AS coa INNER JOIN
(SELECT client, attribute_id, rel_attr_id, att_value, CONVERT(varchar(5), att_val_from) AS val_from, CONVERT(varchar(5), att_val_to) AS val_to,
rel_value
FROM agr.dbo.relvalue AS relvalue
WHERE (attribute_id = 'A0') AND (rel_attr_id = 'ZL')) AS relvalue_ACGRP2 ON coa.client = relvalue_ACGRP2.client
WHERE (coa.client = 'L1') AND (CONVERT(varchar(5), coa.account) BETWEEN relvalue_ACGRP2.val_from AND relvalue_ACGRP2.val_to)
July 4, 2013 at 9:35 am
What's returned when you run this:
SELECT DISTINCT rel_value
FROM agr.dbo.relvalue AS relvalue
WHERE (attribute_id = 'A0')
AND (rel_attr_id = 'ZL')
AND rel_value LIKE 'U%'
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 4, 2013 at 9:45 am
Thanks for your reply Chris.
Nothing gets returned using like U%
Thanks
Dave.
July 5, 2013 at 1:06 am
Davebhoy (7/4/2013)
Thanks for your reply Chris.Nothing gets returned using like U%
Thanks
Dave.
Hi Dave
Please refer to this Connect article which provides an explanation and a temporary fix. The issue appears to be with the view designer.
Cheers
ChrisM
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply