General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
What do you mean by MAY suffer? Do think that substr() is not working because DESC is a reserved word? If not then I don't see how it could get confused... It seems the SELECT statement knows that these are field names, and not modifers that come later in the syntax.
Anyway, I understand your point, and I will try the left() function when I get to work on Wednesday.
>>I am trying to use SQL select to get the first 60 chars of a memo field that represents the description of some work to be done. I need it to result in a 60 char text field that I can display in a browse window.
>>
>>...
>>Select item, substr(desc,1,60), price from WorkTable into table Items
>>Browse
>>...
>>
>>What I get is a browse window that has the item number and price, but it says MEMO. I want the user to see the first 60 chars!!
>>
>>I have tried the mline() function, but it is only returning 1 character, even thought MEMOWIDTH is set to 60.
>
>
>Try left(descr,60) as FullDesc. Also it was mentioned here hundred of times, that desc is VFP reserved word (descending) and it's better not to use it in your tables. If it's not too late, change this field to descrip. Otherwise you may suffer...
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only