Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Unsupported datatype...Help! Expand / Collapse
Author
Message
Posted Thursday, July 4, 2013 7:59 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, July 31, 2014 9:58 AM
Points: 18, Visits: 44
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)
Post #1470444
Posted Thursday, July 4, 2013 9:35 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 9:54 AM
Points: 6,813, Visits: 14,028
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%'



“Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

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
Exploring Recursive CTEs by Example Dwain Camps
Post #1470470
Posted Thursday, July 4, 2013 9:44 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, July 31, 2014 9:58 AM
Points: 18, Visits: 44
Thanks for your reply Chris.

Nothing gets returned using like U%

Thanks

Dave.
Post #1470472
Posted Friday, July 5, 2013 1:06 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 9:54 AM
Points: 6,813, Visits: 14,028
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


“Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

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
Exploring Recursive CTEs by Example Dwain Camps
Post #1470592
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse