RE: ROUND, where has it gone?
Posted in 1998
Exactly which version 7 database are you working with? And which tool are you using to create the SPs? To the best of my knowledge, ROUND() et al are present in all 7.x databases, but I could be about to learn otherwise. Specifically, they are present in 7.23.UC4 on Solaris 2.5.1, which is what I have available to me for testing. SELECT ROUND(3.14159, 4) as round, TRUNC(3.14159, 4) AS trunc FROM 'informix'.SysTables WHERE TabID = 1; This gives 3.1416, 3.1415 as you would expect. No SPs here, so that will allow you to show whether the functions are available to you or not. Assuming that they are, then you have to worry about why you're getting syntax errors... I don't have a built-in function called INT() in 7.23.UC4 - demonstrated by using the obvious revision of the test above. If you are using ISQL to create the SPs, it will generate syntax error for you; use DB-Access instead. Yours, Jonathan Leffler (jleffler@visa.com) #include <bother.ms-exchange.h> ---------- From: stuke@iname.com[SMTP:stuke@iname.com] Sent: Friday, March 27, 1998 8:05 AM To: informix-list@iiug.org Subject: ROUND, where has it gone? I have developed some stored procedures for Informix 5 that use the built-in round() function. When I tried to use these sps on an Informix 7 database, the round() just gives me a syntax error. I even can't emulate round() using int() because int() isn't known anymore either. I'm almost sure that both functions were officially documented in the Informix 5 docs but they aren't mentioned in the 7 docs. Am I doing something wrong or were these functions just dropped in 7 and if so, why? And, even more important, what can I do to get the functionality of round in Informix 7? Kai Stuke <stuke@iname.com> Gru_, Kai <Kai.Stuke@iname.com> PGP-Key available on request