Skip to main content
Solved

use cast (fieldname as nvarchar(max )) in sqlexecutor


Forum|alt.badge.img+1

As I am using a union query I need to convert text fields to nvarchr (Max)

The statement works well in Studio manager but in FME the attributes are <missing> despite using AttributeExposer.

Without union clause the text fields display as expected using AttributeExposer so i feel certain it is the cast as Nvarchar(max) that is causing the problem.

 

How do I resolve this ?

Best answer by david_r

Unless you've already done so, you will have to specify the name the resulting column, e.g.

select cast(fieldname as nvarchar2(max)) as fieldname
from...

Otherwise the output column will actually be called "CAST(FIELDNAME AS NVARCHAR2(MAX))"

This is standard Oracle behavior, by the way.

View original
Did this help you find an answer to your question?

2 replies

david_r
Celebrity
  • Best Answer
  • August 8, 2019

Unless you've already done so, you will have to specify the name the resulting column, e.g.

select cast(fieldname as nvarchar2(max)) as fieldname
from...

Otherwise the output column will actually be called "CAST(FIELDNAME AS NVARCHAR2(MAX))"

This is standard Oracle behavior, by the way.


Forum|alt.badge.img+1

Sorry for the delayed response , but yes thank you that was the answer it needed to know the fieldname


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings