SyBase SQL Query Syntax

Hello Experts,

I am working with SyBase SQL Anywhere v10. I am executing this SQL statement:

select Notes from customer where custid = 100

It returns "(MEMO)"

There is long note that is stored in there. How can I view it via SQL? I believe the datatype for the column is Long Varchar.

Thanks!
triphenAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
triphenConnect With a Mentor Author Commented:
Apparently this is not possible :/
0
 
pablito70Commented:
Could you, please, try this statement (not tested)

SELECT CONVERT(Notes, SQL_CHAR) AS MyNotes FROM customer WHERE custid = 100

HTH
0
 
triphenAuthor Commented:
SELECT CONVERT(posnote, SQL_CHAR) AS MyNotes FROM member WHERE memcode = 2005



General SQL error.

[Sybase][ODBC Driver][SQL Anywhere]Syntax error near 'posnote' on line 1.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
Pratima PharandeCommented:
ELECT CAST(posnote, VARCHAR(500)) AS MyNotes FROM member WHERE memcode = 2005
0
 
Pratima PharandeCommented:
ELECT CAST(posnote as  VARCHAR(500)) AS MyNotes FROM member WHERE memcode = 2005
0
 
Pratima PharandeCommented:
SELECT CAST(posnote as  VARCHAR(500)) AS MyNotes FROM member WHERE memcode = 2005
0
 
triphenAuthor Commented:
SELECT CAST(posnote as  VARCHAR(500)) AS MyNotes FROM member WHERE memcode = 2005

Returns  "(MEMO)" as the SQL result.
0
 
Pratima PharandeCommented:
SELECT CONVERT (VARCHAR(500), posnote ) AS MyNotes FROM member WHERE memcode = 2005

OR

SELECT CONVERT (SQL_VARCHAR, posnote ) AS MyNotes FROM member WHERE memcode = 2005
0
 
triphenAuthor Commented:
Blank Result

and

---------------------------
Adodc1
---------------------------
[Sybase][ODBC Driver][SQL Anywhere]Syntax error near 'SQL_VARCHAR' on line 1
---------------------------
OK  
---------------------------
0
 
GanapathiFacets DeveloperCommented:
You are correct. It isn't possible.

Instead, you can alter the table to have the Notes column as "TEXT" type and Select. You will get it.

Enable SELECT INTO option by sp_dboption before running ALTER command.
0
 
triphenAuthor Commented:
Apparently this is not possible :/
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.