General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Hi Peter,
long time ago I also came across that alter table didn't work always.
For me, mostly 3 solutions work as a workaround :
a) create the cursor as needed in the first place. For example creating the "create cursor" statement by code that can dynamically adjust the needed structure.
b) select ... from mycursor into cursor mycursor
with the fieldlist doing the transform, eg select left(somefield,10) as somefield instead of alter table... somefield C(10). Yes, you can use the same alias name for the query result.
c) afields() -> modifying the array -> create cursor from array -> append data from previous cursor. This time the resulting cursor must be named differnt.
I see you solutions are universal, but copy the records 3 times, instead of once. Of course it depends on how much data is within that cursor. Maybe it was just a fast shot at the problem.
Bye, Olaf.
Previous
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