I am using IBM-Informix for my school project as part of "Informix on-campus" ativity conduted by IBM.
however it is giving me error as "(USE31) - Too few points for geometry type in ST_LineFromText."开发者_如何转开发, in the second linefromtext function.
The problem in the second call to ST_LineFromText() is that you are attempting to pass parameters into it, which isn't possible. You have:
ST_LineFromText('linestring (0 0,v1.pre 0,v1.pre v1.post,0 v1.post,0 0 )',5)
The string contains 'v1.pre' which is not a valid number, etc. If you need to parameterize your query, you either need to generate the string with those values in place, or you need to use a different method. One crude but possible solution is:
ST_LineFromText('linestring (0 0,' || v1.pre || ' 0,' || v1.pre || ' ' ||
v1.post || ',0 ' || v1.post || ',0 0 )', 5)
This may not do the job - but illustrates the problem.
精彩评论