f



Is there an equivalent for "alter session set NLS_DATE_FORMAT = 'dd-mm-yyyy'" in Informix?

Hello everybody,

does anybody know, if there exists an alternative for

	"alter session set NLS_DATE_FORMAT = 'dd-mm-yyyy'"

in Informix?


We found this statement in an application which uses an Oracle-DB. Now
we have to modify this application so that a Informix-DB can be used.
Unfortunately this statement causes a syntax error, because Informix
doesn't know "alter session ...".

To modity the environment variable DBDATE is not the solution we need,
because this has no effect when the database is already open. This
application offers the feature to modify the date-format within the
running applikation.

Best thanks
Mathias
0
mathias
11/5/2003 3:30:49 PM
comp.databases.informix 16083 articles. 0 followers. Post Follow

1 Replies
236 Views

Similar Articles

[PageSpeed] 58

Mathias wrote:
> does anybody know, if there exists an alternative for
> 
> 	"alter session set NLS_DATE_FORMAT = 'dd-mm-yyyy'"
> 
> in Informix?

Directly - no.

> We found this statement in an application which uses an Oracle-DB. Now
> we have to modify this application so that a Informix-DB can be used.
> Unfortunately this statement causes a syntax error, because Informix
> doesn't know "alter session ...".
> 
> To modity the environment variable DBDATE is not the solution we need,
> because this has no effect when the database is already open. This
> application offers the feature to modify the date-format within the
> running applikation.

OK - in that case fetch the dates into a C 4-byte integer instead of a 
string and format the string on the client side - there are formatting 
functions to do what you need documented in the ESQL/C manual.

Or, if you are stuffing data into DATE columns, then you need to 
convert the string into a 4-byte integer before sending it to the server.

Also, consider using the TO_CHAR or TO_DATE functions - they are 
similar to Oracle's functions and will work much the same job.

-- 
Jonathan Leffler                   #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/

0
Jonathan
11/6/2003 6:06:01 AM
Reply:

Similar Artilces:

how to make ["a","b",["c","d"],"e"] into ['a', 'b', 'c', 'd', 'e'] ?
--001a11c34e8edbc7c404f6a94bbe Content-Type: text/plain; charset=ISO-8859-1 >>> x=["a","b",["c","d"],"e"] >>> y=x[2] >>> y ['c', 'd'] >>> x.insert(2,y[0]) >>> x ['a', 'b', 'c', ['c', 'd'], 'e'] >>> x.insert(3,y[1]) >>> x ['a', 'b', 'c', 'd', ['c', 'd'], 'e'] >>> del x[4] >>> x ['a', 'b', 'c', 'd', &#...

Why """, not '''?
Why is """ the preferred delimiter for multi-line strings? On Mar 5, 9:56 am, MartinRineh...@gmail.com wrote: > Why is """ the preferred delimiter for multi-line strings? Is it ? FWIW, I use single quotes whenever I can and double whenever I have to (i.e. rarely). George On Wed, 5 Mar 2008 06:56:24 -0800 (PST) MartinRinehart@gmail.com wrote: > Why is """ the preferred delimiter for multi-line strings? Where did you see that? The only place I saw it was the style guide and it was only talking about docstrings. Even there they used "...

"Select" & "Order By" OK- ''WHERE'' Does'nt Work !
Before i post actual code, as i need a speedyish reply. Can i first ask if anyone knows off the top of their head, if there is a likely obvious cause to the following problem. For the moment i've reduced my form request to a simple text string entry, instead of my desired optional parameters. As i have been stuck with a single unfathomable glitch for over a year. Basically, if i enter queries such as ; "select * from table" "select * from table order by artist", it works perfectly. However if i introduce the 'where' option, as in "select * from table where ...

'quote' to `quote'
Hi, what is the way to change 'shocking,' said Sally into `shocking', said Sally automatically as Tex read the author.txt file? Does this method also change "whatever happens," he said into ``whatever happens.'' he said. David R David R <angel_ov_north@tiscali.co.uk> wrote: > what is the way to change 'shocking,' said Sally > into `shocking', said Sally > automatically as Tex read the > author.txt file? It is possible (e.g. via an active '). But I suspect, this is a lot easier using a script language or similar. Also you ...

Mandis Quotes (aka retiring """ and ''')
Jef Raskin (namedropping) has pointed me at a neat scheme for quoting arbitrary textual matter called "Mandis quotes". Since google is ignorant of the phrase, I presume that Jef made it up. It is disgustingly simple, and very Pythonesque. Here's how it works: If you have a string that doesn't have any single quotes in it, you surround the string by a pair of doubled single quotes. ''Like this''. No backslash interpolation. If you want a character in there, you put it in there (yes, I know, stand down your armies). Clearly, then, any character except a si...

Can't "click through" Static Text even with 'HitTest' set to 'off'?
I've got a GUI with some static text labels that I created in an .m file using the uicontrol() function. I made sure upon creation to set 'HitTest' to 'off'. I can check the controls after the fact, and indeed they all have 'HitTest' set to 'off'. However, I have a ButtonDownFcn call for the entire figure (I'm trying to tell when the user clicks on a specific piece of static text, but the text controls are generated dynamicall). If the user clicks on the figure background, the function executes properly. However, when the static text controls ...

(mapcar 'quote '("1" "2" "3" "4"))
(mapcar 'quote '("1" "2" "3" "4")) returns ((quote "4") (quote "4") (quote "4") (quote "4")) Interesting and (for me) unexpected. Because (mapcar 'read '("1" "2" "3" "4")) returns (1 2 3 4) and (mapcar 'princ '("1" "2" "3" "4")) gives 1234("1" "2" "3" "4") Why isn't (mapcar 'quote '("1" "2" "3" "4")) returning ((quote "1") (quote "2") (quote "3") (quote "4")) Tom Haws www.hawsedc.com Probably has to do with the fact that 'arg and (quote arg) are equivalent, and LISP gets confused by the construct 'quote, which is about the same as (quote (quote arg)). But I don't pretend to know all of the mechanics of the error; the results are somewhat different in R14, BTW: Command: (mapcar 'quote '("1" "2" "3" "4")) ((<Subr: #22e3e40> "4") (<Subr: #22e3e40> "4") (<Subr: #22e3e40> "4") (<Subr: #22e3e40> "4")) ___ "Tom Haws" <hawstom@despammed.com> wrote in message news:77317472.0309160733.45ea9d8c@posting.google.com... > (mapcar 'quote '("1" "2" "3"...

=("|\')?([^ "\']*)("|\')?.*>([^<]*)</A>'
Hello. Well, I found this piece of code on php.net. Thats fine but where can i find explanation for all these ("|\')?([^ "\']*)("|\')?.*>([^<]*)' syntax so that I can construct my own rules for all kind of eregi preg and oter match functions ? Transform HTML links into plain-text "links" with the URL visible function AHREF2text($string) { return eregi_replace('<A .*HREF=("|\')?([^ "\']*)("|\')?.*>([^<]*)</A>', '[\\4] (link: \\2)', $string); } And another simple question, maybe ...

Re: Mandis Quotes (aka retiring """ and ''')
Russell Nelson wrote: > If you need to put a single quote in, then you put > an arbitrary string in-between the single quotes which does NOT > appear in the string. For example, "Bill's house" becomes > 'x'Bill's house'x'. So possible examples might be: 'xx'somebody's mother'xx' 'xy'somebody's father'xy' 'wink'somebody's uncle'wink' 'quote'somebody's body'quote' not terrible easy on the eyes, and why use the single quote at all? Why no= t use a similar pattern li...

Why does "set(object_handle,'PropertyName','NewPropertyValue')" break inside a while loop?
I'm designing a GUI interface to some code, and I want to update a text box with a result at the end of each iteration through a while loop. I'm trying to use the set(object_handle,'PropertyName','NewPropertyValue') command, but I get the following error: ??? Subscript indices must either be real positive integers or logicals. Error in ==> RD180Correction>pushbutton_run_Callback at 425 set(handles.txt_out_curiter,'String','test'); However, if I use the very same code, but it is outside a while loop, it works. So what about a while loop breaks ...

Equivalent of Oracle's to_date('03/04/2005','MM/DD/YYYY')
Assuming data is being stored in a DB2 TIMESTAMP what is the equivalent of Oracle's to_date function : to_date('03/04/2005','MM/DD/YYYY') It's OK if MM/DD/YYYY is the only supported format. Thanks. <gimme_this_gimme_that@yahoo.com> wrote in message news:1115661500.329963.49930@z14g2000cwz.googlegroups.com... > Assuming data is being stored in a DB2 TIMESTAMP > > what is the equivalent of Oracle's to_date function : > > to_date('03/04/2005','MM/DD/YYYY') > > It's OK if MM/DD/YYYY is the only sup...

expect script : "expect 'X', send 'Y'" until expect "Z".
Hi. I am having some difficulties with an expect script, and was hoping someone could help me out here. I am running a scripted telnet session to some 'black box' appliance, and would like to retrieve the output of a particular command. However, the output of the command is longer than a single screen full. Since it was designed for interactive use, you get the magic string "[=More (xx%)=]" after each screenfull of output, at which point the command expects you to hit the spacebar in order to get another screenfull of output. Of course, I could just "send <space&...

Re: Mandis Quotes (aka retiring """ and ''') #2
Russell Nelson notes: > = > Choose poor examples, and then criticize them as poor choices? > = true enough, but the suggested scheme introduces another variable into the = language syntax; I might always make good choices <wink> on what delimiter = I choose, but I might also end up working on code written by someone else w= ho makes less good choices. Or vice versa. = > Exactly. It really would be better to have one(1) string literal > which can quote anything without reverting to backslashing. Why one? > Simpler parsing, simpler learning of the language, fewe...

JAXM returning '&lt;' and '&gt;' rather than "<" and ">"
Hi guys I'm up against a very annoying problem. I'm tryint to use JAXM to call a simple PHP nuSoap web service. I am using SOAPMessage/SOAPPart/SOAPEnvelope etc, however when i receive the message from the server i get: &lt;symbol&gt;great&lt;/symbol&gt; rather than: <symbol>great</symbol> Does anyone have any idea why its converting '<' to '&lt;'??? Any help would be most appreciated, i've been frustrated by this for hours! (Note the xml just dumps out "<symbol>great</symbol>" - it does not encode it ...

[9fans] acme and openning of ", "", '''chk' scripts (by rsc)
------=_Part_63992_24920993.1223483737771 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, is that an intention that acme does not recognize " (or "", not so sure about '''chk' ) to be a name of a valid file? At least " and "" seems to me to be a valid file name, but clicking on it with button 3 in acme doesn't work --- file is not opened. Only explicit use of Get opens it. Thanks Ruda ------=_Part_63992_24920993.1223483737771 Content-Type: text/html; charset=ISO-8859-1 Content...

convert 'dd:mm:yyyy' to [yyyy mm dd]
Hi I have a date cell array with form of 'dd:mm:yyyy'. I want to use datenum later with input like [yyyy mm dd h m s] How to convert it to [yyyy mm dd]? thanks. Mike On Mar 20, 9:24=A0pm, Mike <sulfate...@gmail.com> wrote: > Hi > > I have a date cell array with form of 'dd:mm:yyyy'. > I want to use datenum later with input like [yyyy mm dd h m s] > How to convert it to [yyyy mm dd]? > thanks. > > Mike You don't have to. datenum will quite happily take 'dd:mm:yyyy' providing you tell it. On Mar 21, 2:54=A0am, Tid...

What is Ruby equivalent of Python's ' if __name__ == "__main__" '
In Python, I can use the test indicated in the subject line to determine if a file is being executed directly, as opposed to being loaded indirectly as the result of the execution of another file. I haven't been able to find the Ruby equivalent of this, and would be most grateful is someone could point me in the right direction. Thanks, Ken McDonald [Note: parts of this message were removed to make it a legal post.] On Wed, Oct 22, 2008 at 11:32 AM, Kenneth McDonald < kenneth.m.mcdonald@sbcglobal.net> wrote: > In Python, I can use the test indicated in the subject l...

what gives with "'import *' not allowed with 'from .'"?
I know the use of "from foo import *" is discouraged, but I'm writing a package that I hope others may want to integrate as a subpackage of their own projects, I know what I'm doing, and I want to use the "from .bar import *" syntax internally. It works fine with python-2.6, but with python-2.5 I get a SyntaxError: "'import *' not allowed with 'from .'" Judging from http://bugs.python.org/issue2400 , this issue was fixed back in May 2008, but it is still present with python-2.5.4, which was released in December. Why wont python-2.5 allow th...

Request " ''BOLD' Error in process BDUGKSH ''NORMAL' "
How could I put bold characters in request command, like this : Request " ''BOLD' Error in process BDUGKSH ''NORMAL' " Thanks in advance. In article <ddf392ea.0311131305.595344d3@posting.google.com>, contracer11@uol.com.br (Shiva MahaDeva) writes: > How could I put bold characters in request command, like this : > > Request " ''BOLD' Error in process BDUGKSH ''NORMAL' " > > Thanks in advance. It depends on what kind of terminal it's going to. In article <ddf392ea.0311131305.595344d3@posting.google.com>, contracer11@uol.com.br (Shiva MahaDeva) writes: >How could I put bold characters in request command, like this : > >Request " ''BOLD' Error in process BDUGKSH ''NORMAL' " Not at all. For security reasons, OPCOM removes nonprintable characters and replaces them by a dot. You want a user to switch your oper terminal in a permanent self test loop ? -- Peter "EPLAN" LANGSTOEGER Network and OpenVMS system specialist E-mail peter@langstoeger.at A-1030 VIENNA AUSTRIA I'm not a pessimist, I'm a realist koehler@eisner.nospam.encompasserve.org (Bob Koehler) writes in article <3vFFBoUQw5N$@eisner.encompasserve.org> dated 13 Nov 2003 16:04:22 -0600: >In article <ddf392ea.0311131305.595344d3@posting.google.com>, contracer11@uol.com.br (Shiva MahaDeva) writes: >> How could I put ...

html dir="rtl" does 'a b c' in same direction as "ltr" but '1 2 3' in different direction
http://www.frostjedi.com/terra/scripts/demo/rtl.html If you view the source, you'll see two divs - <div>a b c</div> and <div>1 2 3</div>. Both are displayed on the right hand side of the screen. <div>a b c</div> renders as 'a b c' but '1 2 3', instead, renders as '3 2 1' and I don't know why. Any ideas? On 2009-02-23, yawnmoth <terra1024@yahoo.com> wrote: > http://www.frostjedi.com/terra/scripts/demo/rtl.html > > If you view the source, you'll see two divs - <div>a b c</div> and &g...

lynx 'browser' can't do "<?xml version="1.0" encoding="utf-8"?>"
lynx is lighteningly fast to fetch a set of pages [via a script] via dump > fileID. But [my current version] doesn't render the 'style' of: "<?xml version="1.0" encoding="utf-8"?>" What is this new "xml" crap ? Will it likely take over the older *.html ? Thanks for any info, == Chris Glur. news@absamail.co.za wrote in news:1172596265.663611@vasbyt.isdsl.net: > lynx is lighteningly fast to fetch a set of pages [via a script] via > dump > fileID. > > But [my current version] doesn't ...

Checking value set via "set transaction" or "alter session"
This seemed like it would be a simple question to answer, but I can't find anything on either. Can anyone shed some light on how to determine the value I have used for "set transaction" (say to "read only") and for "alter session" (say to change the NLS_DATE_FORMAT)? Lots of info on setting, haven't been able to find anything about checking these once they've been set. Thank you, Jack On 8 mar, 07:16, Jack <jr...@stirlingonline.com> wrote: > This seemed like it would be a simple question to answer, but I can't > find anything on eit...

Unable to identify an operator '*=' for types 'character varying[]' and '"unknown"'
Okay.I'm following the documentation that came with the PostgreSQL source code (located in /usr/doc/postgresql-7.3.4-2/html/arrays.hmtl in my cygwin root). I created have a table with a varchar array in it, kind of like the following: CREATE TABLE tbl_db_usuario_detalles (NOMBRE varchar(50), COD_USE varchar(6)[]); I've added a single record that has two values. It is imported from a tab-separated text file that has one line, like the following: Username {xxxxxx,yyyyyy} The import seems to work fine (if I put quotes around the string values in the array it fails). ...

Q: "my" variables and "no strict 'refs'"
The bottom of p.594 in the Camel book (3rd edition) says this: no strict 'refs'; $name = "variable"; $$name = 7 ; # Sets $variable to 7 ....but I don't obtain that if I declare the variables with "my". Here's my code: no strict 'refs'; my ($variable, $name); $variable = 1; $name = "variable"; $$name = 7; # should set $variable to 7 print "\$variable is $variable\n"; .... and this prints for me: $variable = 1 I've found the code works fine if I don't declare the varia...

Web resources about - Is there an equivalent for "alter session set NLS_DATE_FORMAT = 'dd-mm-yyyy'" in Informix? - comp.databases.informix

Resources last updated: 3/2/2016 8:19:34 PM