Change data type in View for Crystal (1 Viewer)

SteveClarkson

Registered User.
Local time
Today, 17:24
Joined
Feb 1, 2003
Messages
439
Hello all,

Am very new to Crystal - and have just learned that it won't sort or group on a Memo field (Text >256 chars).

SO - it has been suggested that I use a VIEW on the SQL server to pull the required data out, and at the same time, changing the data type in the view so that it is just text, not memo (the data stored in the field is only ever 10-15 characters long, so data clipping won't be an issue.).

I, however, cannot see how to change the data type for the life of me - it is very important the data type ISN'T changed in the main table, only in this view.

Any ideas?

Thank you in advance!
 

SQL_Hell

SQL Server DBA
Local time
Today, 17:24
Joined
Dec 4, 2003
Messages
1,360
Hi,

I am a bit confused by this, memo is not a SQL SERVER data type.

but however if you want to convert to text

use this

SELECT CONVERT(text, field1)

(where field1 is your column)
 

SteveClarkson

Registered User.
Local time
Today, 17:24
Joined
Feb 1, 2003
Messages
439
Hello,

Thank you very much for your reply - tried that earlier on today, and it worked a treat!

I did have to change it slightly, so it read:

Code:
SELECT CONVERT(varchar(50), field1)


But yes - your reply enabled me to do that - so, thank you immensly!
 

Users who are viewing this thread

Top Bottom