MOD in informix SQL
Posted in 2004
Topics: SQL Development & Query Writing, Security, Permissions & Auditing
This is a multi-part message in MIME format. ------=_NextPart_000_00DD_01C42252.54239FE0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi ALL I am not able to execute the following SQL query in Informix: select mod ((today-password_set_date), 7) from customer where id='ESCDEMO' It says "9700: Routine (mod) ambiguous - more than one routine resolves to given sign" error. But the following SQL queries works fine. 01. select today-password_set_date from customer where id='ESCDEMO' gives 26 as output 02. select mod(26,7) from customer where id='ESCDEMO' gives 5 as output. Any advices / suggestions are welcome! Regards, Vijay Kumar.R Software Engg. HP-ISO Bangalore, Ph : 2205 2640 ------=_NextPart_000_00DD_01C42252.54239FE0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Dus-ascii"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 6.0.4630.0"> <TITLE>MOD in informix SQL</TITLE> </HEAD> <BODY> <!-- Converted from text/rtf format --> <BR> <P><FONT FACE=3D"Arial">Hi ALL</FONT><FONT FACE=3D"Times New Roman"> = </FONT> <BR><FONT FACE=3D"Arial">I am not able to execute the following SQL = query in Informix:</FONT><FONT FACE=3D"Times New Roman"> </FONT> <BR><FONT FACE=3D"Arial">select mod ((today-password_set_date), 7)<BR> from customer where id=3D'ESCDEMO'</FONT> <BR><FONT FACE=3D"Arial">It says "9700: Routine (mod) ambiguous - = more than one routine resolves to given sign" error.</FONT><FONT = FACE=3D"Times New Roman"> </FONT> <BR><FONT FACE=3D"Arial">But the following SQL queries works = fine.</FONT><FONT FACE=3D"Times New Roman"> </FONT> <BR><FONT FACE=3D"Arial">01.</FONT>=20 <BR><FONT FACE=3D"Arial">select today-password_set_date<BR> from customer where id=3D'ESCDEMO'</FONT> <BR><FONT FACE=3D"Arial">gives 26 as output</FONT><FONT FACE=3D"Times = New Roman"> </FONT> <BR><FONT FACE=3D"Arial">02.</FONT><FONT FACE=3D"Times New Roman"> = </FONT> <BR><FONT FACE=3D"Arial">select mod(26,7)<BR> from customer where id=3D'ESCDEMO'</FONT> <BR><FONT FACE=3D"Arial">gives 5 as output.</FONT><FONT FACE=3D"Times = New Roman"> </FONT> <BR><FONT FACE=3D"Arial">Any advices / suggestions are welcome!</FONT> </P> <BR> <P><FONT COLOR=3D"#808000" SIZE=3D2 FACE=3D"Comic Sans = MS">Regards,</FONT> <BR><FONT COLOR=3D"#808000" SIZE=3D2 FACE=3D"Comic Sans MS">Vijay = Kumar.R</FONT> <BR><FONT COLOR=3D"#808000" SIZE=3D2 FACE=3D"Comic Sans MS">Software = Engg.</FONT> <BR><FONT COLOR=3D"#808000" SIZE=3D2 FACE=3D"Comic Sans MS">HP-ISO = Bangalore,</FONT> <BR><FONT COLOR=3D"#808000" SIZE=3D2 FACE=3D"Comic Sans MS">Ph : 2205 = 2640</FONT> </P> </BODY> </HTML> ------=_NextPart_000_00DD_01C42252.54239FE0-- sending to informix-list
"Vijay" <rudrappa@india.hp.com> schrieb im Newsbeitrag news:c5jev4$b0s$1@terabinaries.xmission.com... > > Hi ALL > I am not able to execute the following SQL query in Informix: > select mod ((today-password_set_date), 7) > from customer where id='ESCDEMO' > It says "9700: Routine (mod) ambiguous - more than one routine resolves > to given sign" error. You are using a 9.x server, right? Try something like select mod (( CAST(today-password_set_date AS INTEGER) ), 7) Cheers, Dirk -- -- Dirk Gunsthoevel IT Systemanalyse phone: +49 (0)251 28446-0 -- Hammer Str. 13 fax: +49 (0)251 28446-55 -- D-48153 Muenster http://www.GunCon.de/ -- "The cost of living hasn't affected its popularity."