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 07:56:28
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
22/07/2007 15:54:51
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01242567
Message ID:
01242712
Views:
15
>>>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform