cancel
Showing results for 
Search instead for 
Did you mean: 

Not getting any data when using a where clause

Former Member
0 Kudos
1,804

I created one table and populated it with the data. All fields are varchar datatype. When I do a "select * from the table(XYZ)" it is showing all the records but when I put a filter condition in the where clause - e.g. "SELECT * FROM XYZ WHERE FIELD='abcde' - then its not showing any data. The 'abcde' is varchar data type as I said in the begining.

Can anybody help me in this regards. Thanks in advance. If any more information is required then please let me know.

MCMartin
Participant
0 Kudos

Please provide the sybase SQLA version number, the table definition and if possible an execution plan

MarkCulp
Participant
0 Kudos

Some additional information is going to be needed in order for us to help you:

  • version and and build number of the software you are using

  • how did you create your database - give us the exact dbinit command line options

  • an example table declaration and data that you have used would be helpful - i.e. a way to repro the issue.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member

You may have a case-sensitive database or non-printable characters in the column. Try "WHERE LOWER(field)='abcde'" or "WHERE field LIKE '%abcde%'.

justin_willey
Participant
0 Kudos

trailing spaces can cause confusion - TRIM() can help.