Quick question here...
If I want to extract part of a varchar field, I use the following syntax:
field_name[4,7]
In this case, the 7 characters beginning at the fourth position of file_name will be returned.
How can I accomplish the same thing with a VarBinary data type? (i.e. return 7 bytes of the field beginning at the fourth byte.)
Taking apart a VarBinary field
Moderators: chulett, rschirm, roy
I already tried it, but this was the error I received during compilation...
The message seems to imply that this functionality is restricted to character-based datatypes.[/quote]
The actual syntax for the derivation is LnkInboundData.field1[4,7]Error in output column derivation expression for column field1 in link LnkInboundData. Invalid conversion requested from a raw to a string.
The message seems to imply that this functionality is restricted to character-based datatypes.[/quote]
It looks like VarBinary has the underlying datatype of "raw" which PX won't let you do anything with (except to determine the length). If the length is short enough, can you just declare this as VarChar in the job and/or do a cast to this datatype in your SQL?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>