Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
String to long to fit - limit on aggregate functions ?
Message
From
23/07/2007 11:16:53
 
 
To
23/07/2007 07:56:28
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01242567
Message ID:
01242802
Views:
14
Yes, those are the kind of examples I showed him. He thinks maybe he sent me an earlier version of the code and is going to get back to me with something that he is sure works for him. <bg>

I did learn something from this, though. I had forgotten that with VFP 9 we can add a blank memo field to a select using CAST(space(10) as Memo) rather than doing a Cartesian product with a dummy cursor containing a memo field so at least some good came from all my frustration.

>>>>Thanks for going to the trouble of doing this. At Cetin's suggestion I removed the lines referencing memo fields and then it worked. So you are saying the problem isn't with the SELECT syntax so there must be something happening in the data in those memo fields - can't figure out how that would translate to a "String too long to fit" error ...
>>>
>>>And I even didn't notice that I have MAX(Memo) in the query! No matter that I create a cursor :-(. Hmmm, not good for me.
>>
>>Well, today my colleague claims the select works for him. I like the CAST(null as memo) thing to get a blank memo field in the result set. But with data being pulling into the cursor that you constructed by hand I get the error. Odd. I am going to have to see him run it to believe it <g>
>
>Well you can show him it wouldn't work with a shorter sample like:
>
>select cast(max(alltrim(notes)) as memo) from _samples+'data\employee'
>
>Or:
>
>CREATE CURSOR myTest (dummy m)
>INSERT INTO myTest VALUES ("this is short indeed")
>
>select cast(max(alltrim(dummy)) as memo) from myTest
>
>INSERT INTO myTest VALUES (REPLICATE('a',256))
>select cast(max(alltrim(dummy)) as memo) from myTest
>
Cetin


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Previous
Reply
Map
View

Click here to load this message in the networking platform