cx-oracle-users Mailing List for cx_Oracle (Page 24)
Brought to you by:
atuining
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(9) |
Sep
(8) |
Oct
(12) |
Nov
(4) |
Dec
(8) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(15) |
Feb
(12) |
Mar
(11) |
Apr
(5) |
May
(7) |
Jun
(8) |
Jul
(12) |
Aug
(2) |
Sep
(14) |
Oct
(17) |
Nov
(20) |
Dec
(3) |
2005 |
Jan
(16) |
Feb
(9) |
Mar
(22) |
Apr
(21) |
May
(73) |
Jun
(16) |
Jul
(15) |
Aug
(10) |
Sep
(32) |
Oct
(35) |
Nov
(22) |
Dec
(13) |
2006 |
Jan
(42) |
Feb
(36) |
Mar
(13) |
Apr
(18) |
May
(8) |
Jun
(17) |
Jul
(24) |
Aug
(30) |
Sep
(35) |
Oct
(33) |
Nov
(33) |
Dec
(11) |
2007 |
Jan
(35) |
Feb
(31) |
Mar
(35) |
Apr
(64) |
May
(38) |
Jun
(12) |
Jul
(18) |
Aug
(34) |
Sep
(75) |
Oct
(29) |
Nov
(51) |
Dec
(11) |
2008 |
Jan
(27) |
Feb
(46) |
Mar
(48) |
Apr
(36) |
May
(59) |
Jun
(42) |
Jul
(25) |
Aug
(34) |
Sep
(57) |
Oct
(97) |
Nov
(59) |
Dec
(57) |
2009 |
Jan
(48) |
Feb
(48) |
Mar
(45) |
Apr
(24) |
May
(46) |
Jun
(52) |
Jul
(52) |
Aug
(37) |
Sep
(27) |
Oct
(40) |
Nov
(37) |
Dec
(13) |
2010 |
Jan
(16) |
Feb
(9) |
Mar
(24) |
Apr
(6) |
May
(27) |
Jun
(28) |
Jul
(60) |
Aug
(16) |
Sep
(33) |
Oct
(20) |
Nov
(39) |
Dec
(30) |
2011 |
Jan
(23) |
Feb
(43) |
Mar
(16) |
Apr
(29) |
May
(23) |
Jun
(16) |
Jul
(10) |
Aug
(8) |
Sep
(18) |
Oct
(42) |
Nov
(26) |
Dec
(20) |
2012 |
Jan
(17) |
Feb
(27) |
Mar
|
Apr
(20) |
May
(18) |
Jun
(7) |
Jul
(24) |
Aug
(21) |
Sep
(23) |
Oct
(18) |
Nov
(12) |
Dec
(5) |
2013 |
Jan
(14) |
Feb
(10) |
Mar
(20) |
Apr
(65) |
May
(3) |
Jun
(8) |
Jul
(6) |
Aug
(3) |
Sep
|
Oct
(3) |
Nov
(28) |
Dec
(3) |
2014 |
Jan
(3) |
Feb
(9) |
Mar
(4) |
Apr
(7) |
May
(20) |
Jun
(2) |
Jul
(20) |
Aug
(7) |
Sep
(11) |
Oct
(8) |
Nov
(6) |
Dec
(12) |
2015 |
Jan
(16) |
Feb
(10) |
Mar
(14) |
Apr
(8) |
May
|
Jun
(8) |
Jul
(15) |
Aug
(7) |
Sep
(1) |
Oct
(33) |
Nov
(8) |
Dec
(5) |
2016 |
Jan
(18) |
Feb
(12) |
Mar
(6) |
Apr
(14) |
May
(5) |
Jun
(3) |
Jul
|
Aug
(21) |
Sep
|
Oct
(15) |
Nov
(8) |
Dec
|
2017 |
Jan
|
Feb
(14) |
Mar
(21) |
Apr
(9) |
May
(6) |
Jun
(11) |
Jul
(23) |
Aug
(6) |
Sep
(5) |
Oct
(7) |
Nov
(1) |
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
(16) |
Apr
(2) |
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2019 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2020 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
(4) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(3) |
2021 |
Jan
|
Feb
(5) |
Mar
|
Apr
(7) |
May
(6) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Doug H. <djh...@te...> - 2013-04-22 23:10:10
|
Never allow Oracle to implicitly convert a string to a date! Always use an explicit date conversion function, such as TO_DATE or TO_TIMESTAMP, with a valid date format string as the second parameter to the function call. See, e.g., http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions183.htm cursor.execute("select to_char(sysdate, 'yyyy-mm-dd') from dual") cursor.execute("select to_char(to_date(:1, 'yyyy-mm-dd'), 'yyyy-mm-dd') from dual", ['2013-04-22',]) cursor.execute("select to_char(:1,' yyyy-mm-dd') from dual", [datetime.datetime.now(),]) When using cx_Oracle, you may pass data values of type datetime.datetime as parameters to the cursor execute functions. These are used in the SQL statement as values of type DATE. In that case, you perform the conversion from string to date within your Python code. cursor.execute("select dump(:1, 1016) from dual", [datetime.datetime.now(),]) Setting the NLS_DATE_FORMAT and similar parameters are a very good technique for controlling the implicit conversion of date type values to strings. When the resultant strings are used for any purpose other than display, explicit conversion is, however, much more reliable on the long term. These parameters are also convenient when using implicit conversions with interactive input, but those implicit conversions should never make their way into non-interactive code. - Doug On 2013-04-22 11:42, Joel Slowik wrote: > > What does your code look like? Do you know what your NLS setting is > for your session? You might need to set it yourself before passing the > dates around. > > -joel > > *From:*Andrey Nikolaev [mailto:nik...@gm...] > *Sent:* Sunday, April 21, 2013 6:51 PM > *To:* cx-oracle-users > *Subject:* Re: [cx-oracle-users] DatabaseError: ORA-01843: not a valid > month > > Hello, > > I just started using cx_Oracle and came across an issue related to > Oracle Date datatype. I am getting an error ORA-01843 every time I > need to do anything with dates. > > > > A similar problem is described on the stackoverflow: > http://stackoverflow.com/questions/15396241/cx-oracle-ora-01843-not-a-valid-month-with-unicode-parameter > > Has anybody come across this issue? I believe something is wrong with > how I use cx_Oracle but I can't find out what. I tried the same case > as in the stackoverflow post and got the same error. > > > -- > Thanks, > Andrey Nikolaev > mailto:Nik...@gm... <mailto:Nik...@gm...> > > ------------------------------------------------------------------------ > Confidentiality Note: This electronic message transmission is intended > only for the person or entity to which it is addressed and may contain > information that is privileged, confidential or otherwise protected > from disclosure. If you have received this transmission, but are not > the intended recipient, you are hereby notified that any disclosure, > copying, distribution or use of the contents of this information is > strictly prohibited. If you have received this e-mail in error, please > contact Continuum Performance Systems at {203.245.5000} and delete and > destroy the original message and all copies. > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users -- Doug Henderson, Calgary, Alberta, Canada |
From: Andrey N. <nik...@gm...> - 2013-04-22 22:41:12
|
My environment : cx_Oracle 5.1.2, Oracle 11.2.0.1.0, Python 2.6.6 I use the following code: >>> >>> curr.execute("ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS' NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS.FF'") >>> curr.execute("select * from NLS_SESSION_PARAMETERS") <__builtin__.OracleCursor on <cx_Oracle.Connection to wtrackeru@orcl>> >>> curr.fetchall() [('NLS_LANGUAGE', 'AMERICAN'), ('NLS_TERRITORY', 'AMERICA'), ('NLS_CURRENCY', '$'), ('NLS_ISO_CURRENCY', 'AMERICA'), ('NLS_NUMERIC_CHARACTERS', '.,'), ('NLS_CALENDAR', 'GREGORIAN'), ('NLS_DATE_FORMAT', 'YYYY-MM-DD HH24:MI:SS'), ('NLS_DATE_LANGUAGE', 'AMERICAN'), ('NLS_SORT', 'BINARY'), ('NLS_TIME_FORMAT', 'HH.MI.SSXFF AM'), ('NLS_TIMESTAMP_FORMAT', 'YYYY-MM-DD HH24:MI:SS.FF'), ('NLS_TIME_TZ_FORMAT', 'HH.MI.SSXFF AM TZR'), ('NLS_TIMESTAMP_TZ_FORMAT', 'DD-MON-RR HH.MI.SSXFF AM TZR'), ('NLS_DUAL_CURRENCY', '$'), ('NLS_COMP', 'BINARY'), ('NLS_LENGTH_SEMANTICS', 'BYTE'), ('NLS_NCHAR_CONV_EXCP', 'FALSE')] >>> curr.execute("select to_date(:0), to_timestamp(:1) from dual", [u'2013-03-12', u'2013-03-12 08:22:31.332144']) Traceback (most recent call last): File "<stdin>", line 1, in <module> cx_Oracle.DatabaseError: ORA-01843: not a valid month >>> -- Best regards, Andrey Nikolaev mailto:Nik...@gm... |
From: Joel S. <js...@cp...> - 2013-04-22 17:42:49
|
What does your code look like? Do you know what your NLS setting is for your session? You might need to set it yourself before passing the dates around. -joel From: Andrey Nikolaev [mailto:nik...@gm...] Sent: Sunday, April 21, 2013 6:51 PM To: cx-oracle-users Subject: Re: [cx-oracle-users] DatabaseError: ORA-01843: not a valid month Hello, I just started using cx_Oracle and came across an issue related to Oracle Date datatype. I am getting an error ORA-01843 every time I need to do anything with dates. A similar problem is described on the stackoverflow: http://stackoverflow.com/questions/15396241/cx-oracle-ora-01843-not-a-valid-month-with-unicode-parameter Has anybody come across this issue? I believe something is wrong with how I use cx_Oracle but I can't find out what. I tried the same case as in the stackoverflow post and got the same error. -- Thanks, Andrey Nikolaev mailto:Nik...@gm...<mailto:Nik...@gm...> ________________________________ Confidentiality Note: This electronic message transmission is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this transmission, but are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this information is strictly prohibited. If you have received this e-mail in error, please contact Continuum Performance Systems at {203.245.5000} and delete and destroy the original message and all copies. |
From: Andrey N. <nik...@gm...> - 2013-04-21 22:51:57
|
Hello, I just started using cx_Oracle and came across an issue related to Oracle Date datatype. I am getting an error ORA-01843 every time I need to do anything with dates. A similar problem is described on the stackoverflow: http://stackoverflow.com/questions/15396241/cx-oracle-ora-01843-not-a-valid-month-with-unicode-parameter Has anybody come across this issue? I believe something is wrong with how I use cx_Oracle but I can't find out what. I tried the same case as in the stackoverflow post and got the same error. -- Thanks, Andrey Nikolaev mailto:Nik...@gm... |
From: Grzegorz D. <gol...@wp...> - 2013-04-21 22:04:23
|
> It greatly depends on the execution plan. > If Oracle decides that the first rows can be returned quickly, it will > do so; > Now if the fetch array size is 100, the next rows will be retrieved/ > computed during the fetch operations. I still think that's not the case. The array size is large enough to grab all 1597 rows at once. Secondly, I also ran the same SQL code from SQL Developer and didn't witness this kind of lag. Neither did it happen in the legacy script nor in a bare-bone Python script I've made for testing (just displaying fetched rows to console). But thanks anyway. If anyone has other ideas, please let know. - Grzegorz |
From: Amaury F. d'A. <ama...@gm...> - 2013-04-19 17:56:49
|
2013/4/19 Grzegorz Dąbkowski <gol...@wp...> > > Could it be the case that the initial time might be in setting up and > > executing the query? Are there joins, order bys, etc? > > Wouldn't that affect cursor.execute() rather than the iteration? It greatly depends on the execution plan. If Oracle decides that the first rows can be returned quickly, it will do so; Now if the fetch array size is 100, the next rows will be retrieved/computed during the fetch operations. -- Amaury Forgeot d'Arc |
From: Grzegorz D. <gol...@wp...> - 2013-04-19 16:47:31
|
> Could it be the case that the initial time might be in setting up and > executing the query? Are there joins, order bys, etc? Wouldn't that affect cursor.execute() rather than the iteration? I was thinking memory allocation for fetched data or so... Anyway, I think it's unlikely this has to bo with the RDBMS executing the query so long. Sometimes Python finished in 50 seconds in the first iteration. I also had attempts when in consecutive executions against the same data in a loop (like in the example from the original post) I got the excessive timing several times. Finally, when running the script against a series of database schemas with same data scheme, different content, something the tool has been designed for, I usually got the 10 minutes plus performance only for the first one, no matter what order the schemas were processed. Finally, I also have a legacy tool which performs the same SQL in a more simplistic Python setup and that one always finished with the data I'm using for testing in about 1 minute 10 seconds. That's why I started looking towards cx_Oracle internals, though that might not be the good direction too. Here's the code of the generator function that steers the cursor: def cycle(self, schema, matchprofile, fixedcond): cursor = self.cursor cursor.set_schema(schema) cursor.execute('TRUNCATE TABLE schema.table') metaatts = self.get_metaattributes(schema) for condset in matchprofile: condsql = self.dostuffwith(matchprofile, fixedcond) qry = self.qrybase.replace('<<condset>>', condset).replace('<<condsql>>', condsql) cursor.execute(qry) # queries performing logic aganst database cursor.execute(self.finalqry) # select query extracting results for row in cursor: yield Row(row, metaatts.copy()) if self.counts: self.counter.addto(cursor.rowcount) When run against multiple database schemas, as normally envisaged, the output of several such generators is chained to form a single data stream which is then written to a file. cycles = (self.cycle(schema, matchprofile, fixedcond) for schema in schemas) rows = itertools.chain.from_iterable(cycles) - Grzegorz Dabkowski |
From: Paul M. <p.f...@gm...> - 2013-04-19 08:04:31
|
On 18 April 2013 23:48, Glyph <gl...@tw...> wrote: > Thanks for responding, but, unfortunately, no. I put a comment there, but > in short; I know that it's unusual, but there are cases where inline PL/SQL > can do things that regular SQL can't. > > *Is* there any way to emit data back to the application from an inline > block like this? > Can you give an example of your actual code? In general, the answer to your question is "no", because PL/SQL blocks are not select statements and therefore do not return rows via the cursor. But there are ways, depending on the details of what you want to do. Your requirement to not modify the schema (specifically not creating stored procedures) makes it hard, though... Paul |
From: Christopher J. <chr...@or...> - 2013-04-18 23:03:15
|
On 04/18/2013 03:48 PM, Glyph wrote: > > On Apr 18, 2013, at 3:12 PM, Mark Harrison <mh...@pi... <mailto:mh...@pi...>> wrote: > >> On 4/18/13 2:51 PM, Glyph wrote: >>> Hello fellow cx_Oracle'ers: >>> >>> I asked what I thought was a very simple question on Stack Overflow about a year and a half ago, but it still doesn't have an answer. >>> >>> In short: how do I get any results out of inline PL/SQL? >>> >>> <http://stackoverflow.com/questions/7843551/how-do-i-retrieve-data-from-oracle-as-a-query-result-using-an-anonymous-pl-sql-b> >>> >>> If anyone would like to answer the question, either here or there, I'd still appreciate it. >> >> I've typed in an answer... let me know if it is useful! > > Thanks for responding, but, unfortunately, no. I put a comment there, but in short; I know that it's unusual, but there are cases where inline PL/SQL can do things that regular SQL can't. > > /Is/ there any way to emit data back to the application from an inline block like this? > Does PL/SQL's PIPE ROW functionality fit your use case? See http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/tuning.htm#BABDGCDH Chris -- chr...@or... http://twitter.com/ghrd Newly updated, free PHP & Oracle book: http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html |
From: Glyph <gl...@tw...> - 2013-04-18 22:48:41
|
On Apr 18, 2013, at 3:12 PM, Mark Harrison <mh...@pi...> wrote: > On 4/18/13 2:51 PM, Glyph wrote: >> Hello fellow cx_Oracle'ers: >> >> I asked what I thought was a very simple question on Stack Overflow about a year and a half ago, but it still doesn't have an answer. >> >> In short: how do I get any results out of inline PL/SQL? >> >> <http://stackoverflow.com/questions/7843551/how-do-i-retrieve-data-from-oracle-as-a-query-result-using-an-anonymous-pl-sql-b> >> >> If anyone would like to answer the question, either here or there, I'd still appreciate it. > > I've typed in an answer... let me know if it is useful! Thanks for responding, but, unfortunately, no. I put a comment there, but in short; I know that it's unusual, but there are cases where inline PL/SQL can do things that regular SQL can't. Is there any way to emit data back to the application from an inline block like this? -glyph |
From: Mark H. <mh...@pi...> - 2013-04-18 22:12:15
|
On 4/18/13 2:51 PM, Glyph wrote: > Hello fellow cx_Oracle'ers: > > I asked what I thought was a very simple question on Stack Overflow about a year and a half ago, but it still doesn't have an answer. > > In short: how do I get any results out of inline PL/SQL? > > <http://stackoverflow.com/questions/7843551/how-do-i-retrieve-data-from-oracle-as-a-query-result-using-an-anonymous-pl-sql-b> > > If anyone would like to answer the question, either here or there, I'd still appreciate it. I've typed in an answer... let me know if it is useful! |
From: Glyph <gl...@tw...> - 2013-04-18 21:51:38
|
Hello fellow cx_Oracle'ers: I asked what I thought was a very simple question on Stack Overflow about a year and a half ago, but it still doesn't have an answer. In short: how do I get any results out of inline PL/SQL? <http://stackoverflow.com/questions/7843551/how-do-i-retrieve-data-from-oracle-as-a-query-result-using-an-anonymous-pl-sql-b> If anyone would like to answer the question, either here or there, I'd still appreciate it. -glyph |
From: Mark H. <mh...@pi...> - 2013-04-18 20:35:06
|
On 4/18/13 12:14 PM, Grzegorz Dąbkowski wrote: > Hello, > > you're likely the last place I can find some help. I wrapped a Cursor inside > a generator function which first performs some operations against the DB > using the cursor, then performs a select query, creates a custom Row object > from every fetched row and yields it. The cursor is a subclassed > cx_Oracle.Cursor with an increased arraysize and an outputtypehandler that > converts strings to Unicode (as shown in demos coming with cx_Oracle). > Removing any of these doeasn't help anyway. > > I can't understand why in some executions of my script (actually in most > cases, though not all) the execution stalls for several minutes performing > the line 'for row in cursor:'. Only memory usage increases during this time. >>From time to time the issue doesn't occur, the line is processed in few > hundreds of a second and my entire test completes in about 55 seconds. In > most cases though the total execution time is around 11-12 minutes with all > the additional time spent in that single line. I also noticed that often > when the entire test is done in a loop (retaining the same Connection and > Cursor objects), the issue manifests itself only in the first iteration. > > :: 1597 records in 11:33 > :: 1597 records in 0:56 > :: 1597 records in 0:55 > :: 1597 records in 0:55 > :: 1597 records in 0:55 > :: 1597 records in 0:55 > > I will welcome any hint as to what actually happens when the cursor is used > as an iterator here and what can I check to get more understanding of my > problem. > > Many thanks in advance. > > - Grzegorz Dabkowski Could it be the case that the initial time might be in setting up and executing the query? Are there joins, order bys, etc? That's fairly typical in many applications. |
From: Grzegorz D. <gol...@wp...> - 2013-04-18 19:13:47
|
Hello, you're likely the last place I can find some help. I wrapped a Cursor inside a generator function which first performs some operations against the DB using the cursor, then performs a select query, creates a custom Row object from every fetched row and yields it. The cursor is a subclassed cx_Oracle.Cursor with an increased arraysize and an outputtypehandler that converts strings to Unicode (as shown in demos coming with cx_Oracle). Removing any of these doeasn't help anyway. I can't understand why in some executions of my script (actually in most cases, though not all) the execution stalls for several minutes performing the line 'for row in cursor:'. Only memory usage increases during this time. >From time to time the issue doesn't occur, the line is processed in few hundreds of a second and my entire test completes in about 55 seconds. In most cases though the total execution time is around 11-12 minutes with all the additional time spent in that single line. I also noticed that often when the entire test is done in a loop (retaining the same Connection and Cursor objects), the issue manifests itself only in the first iteration. :: 1597 records in 11:33 :: 1597 records in 0:56 :: 1597 records in 0:55 :: 1597 records in 0:55 :: 1597 records in 0:55 :: 1597 records in 0:55 I will welcome any hint as to what actually happens when the cursor is used as an iterator here and what can I check to get more understanding of my problem. Many thanks in advance. - Grzegorz Dabkowski |
From: Jani T. <re...@gm...> - 2013-04-11 07:19:52
|
10.4.2013 19:16, Anurag Chourasia kirjoitti: > Hi Jani and Mark....I have some positive updates :-) > > Following Mark Harrison's suggestion, I tried typecasting unicode to str > and the results were positive. > > This one worked for example > > T_cursor.execute("SELECT DISTINCT(TAG_STATUS) FROM TAG_HIST WHERE > TAG_NBR = :TAG_NBR", {'TAG_NBR': str(TAG_NBR)}) > > > Following Jani's suggestion, i added this just before my cx_Oracle > import and removed the str() typecast conversion > > import os > os.environ.update([('NLS_LANG', > '.UTF8'),('ORA_NCHAR_LITERAL_REPLACE', 'TRUE'),]) > > > > T_cursor.execute("SELECT DISTINCT(TAG_STATUS) FROM TAG_HIST WHERE > TAG_NBR = :TAG_NBR", {'TAG_NBR': TAG_NBR}) > > > And it worked just fine > > Then i changed it to > > import os > os.environ.update([('NLS_LANG', '.UTF8'),]) > > > And it worked fine as well. > > I will do more tests during the day. > > Jani : Is the variable ORA_NCHAR_LITERAL_REPLACE absolutely necessary? ORA_NCHAR_LITERAL_REPLACE means that if using N'<stringhere>' string is put to column as is, there is no mangling to database charset. It's OFF by default and even you try to insert unicode it will be first translated to database charset and inserted after that. Which leads to broken data. > Also, I could not find out the current value of NLS_LANG. . . When i > query from sqlplus it is not set...And when i use os.environ to get the > value, i get key error. > > SQL> HOST ECHO %NLS_LANG% > %NLS_LANG% On Windows you have two possible options, normally the NLS_LANG is set in the registry, but it can also be set in the environment, however this is not often done. The value in the environment takes precedence over the value in the registry and is used for ALL Oracle_Homes on the server. Also note that any USER environment variable takes precedence over any SYSTEM environment variable (this is Windows behavior, and has nothing to do with Oracle) if set. if: SQL> HOST ECHO $NLS_LANG return nothing it means that registry is used. Then do the following: SQL>@.[%NLS_LANG%]. If you get something like: Unable to open file.[ENGLISH_UNITED KINGDOM.WE8ISO8859P1]. The "file name" between the braces is the value of the registry parameter. SELECT * FROM NLS_SESSION_PARAMETERS; gives all the rest session vars regarding to NLS. > > Regards, > Anurag > > On Wed, Apr 10, 2013 at 4:01 AM, Jani Tiainen <re...@gm... > <mailto:re...@gm...>> wrote: > > Ok, I do following when working with cx_Oracle: > > import os > os.environ.update([ > # Oracle takes client-side character set encoding from the > environment. > ('NLS_LANG', '.UTF8'), > # This prevents unicode from getting mangled by getting encoded > into the > # potentially non-unicode database character set. > ('ORA_NCHAR_LITERAL_REPLACE', 'TRUE'), > ]) > > import cx_Oracle > > Above guarantees that you really are in UTF8 mode. Second environment > variable one is not necessity. And AFAIK there is no other way to set > them (except before running app itself) due the fact that NLS_LANG is > read by OCI libs from the environment. > > > After doing that I'll do the following: > > db = cx_Oracle.Connection(runenv.USERNAME, runenv.PASSWORD, > runenv.TNSENTRY) > c = db.cursor() > c.execute("ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD > HH24:MI:SS' " > "NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS.FF' " > "NLS_TERRITORY = 'AMERICA'") > > Idea is to make sure that dateformats and decimal points are consistent. > For example my locale likes to use comma as a decimal separator. > > Which means that python 10.2f must be '10,2' when inserting to db. > Painful that is. > > > 9.4.2013 12:57, Anurag Chourasia kirjoitti: > > Hi Jani. The column type is varchar2 > > > > Regards, > > Anurag > > > > On 9 Apr 2013 01:14, "Jani Tiainen" <re...@gm... > <mailto:re...@gm...> > > <mailto:re...@gm... <mailto:re...@gm...>>> wrote: > > > > What is the type of the column in the table? > > > > There are few quirks I know of. > > > > 9.4.2013 1:35, Anurag Chourasia kirjoitti: > > > Thanks. Will try that too and report back the findings. > > > > > > Regards, > > > Anurag > > > > > > On Mon, Apr 8, 2013 at 6:00 PM, Mark Harrison > <mh...@pi... <mailto:mh...@pi...> > > <mailto:mh...@pi... <mailto:mh...@pi...>> > > > <mailto:mh...@pi... <mailto:mh...@pi...> > <mailto:mh...@pi... <mailto:mh...@pi...>>>> wrote: > > > > > > On 4/8/13 2:56 PM, Anurag Chourasia wrote: > > > > Hi Tamas, > > > > > > > > Thanks for the response. Here is the result... > > > > > > > > TAG_NBR: u'2928982' <type 'unicode'> > > > > > > > > Please let me know if this gives any more ideas. I will > > also try > > > a explicit type conversion using str() to see if that > makes a > > > difference. > > > > > > If that doesn't work can you try using a non-unicode > string > > such as > > > > > > {'TAG_NBR': 'ABC'} > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > Minimize network downtime and maximize team effectiveness. > > > Reduce network management and security costs.Learn how > to hire > > > the most talented Cisco Certified professionals. Visit the > > > Employer Resources Portal > > > > http://www.cisco.com/web/learning/employer_resources/index.html > > > _______________________________________________ > > > cx-oracle-users mailing list > > > cx-...@li... > <mailto:cx-...@li...> > > <mailto:cx-...@li... > <mailto:cx-...@li...>> > > > <mailto:cx-...@li... > <mailto:cx-...@li...> > > <mailto:cx-...@li... > <mailto:cx-...@li...>>> > > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > Minimize network downtime and maximize team effectiveness. > > > Reduce network management and security costs.Learn how to hire > > > the most talented Cisco Certified professionals. Visit the > > > Employer Resources Portal > > > > http://www.cisco.com/web/learning/employer_resources/index.html > > > > > > > > > > > > _______________________________________________ > > > cx-oracle-users mailing list > > > cx-...@li... > <mailto:cx-...@li...> > > <mailto:cx-...@li... > <mailto:cx-...@li...>> > > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > > > > > -- > > Jani Tiainen > > > > - Well planned is half done and a half done has been sufficient > > before... > > > > > ------------------------------------------------------------------------------ > > Precog is a next-generation analytics platform capable of > advanced > > analytics on semi-structured data. The platform includes APIs for > > building > > apps and a phenomenal toolset for data science. Developers > can use > > our toolset for easy data analysis & visualization. Get a > free account! > > http://www2.precog.com/precogplatform/slashdotnewsletter > > _______________________________________________ > > cx-oracle-users mailing list > > cx-...@li... > <mailto:cx-...@li...> > > <mailto:cx-...@li... > <mailto:cx-...@li...>> > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > > > > > ------------------------------------------------------------------------------ > > Precog is a next-generation analytics platform capable of advanced > > analytics on semi-structured data. The platform includes APIs for > building > > apps and a phenomenal toolset for data science. Developers can use > > our toolset for easy data analysis & visualization. Get a free > account! > > http://www2.precog.com/precogplatform/slashdotnewsletter > > > > > > > > _______________________________________________ > > cx-oracle-users mailing list > > cx-...@li... > <mailto:cx-...@li...> > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > -- > Jani Tiainen > > - Well planned is half done and a half done has been sufficient > before... > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for > building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > <mailto:cx-...@li...> > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > -- Jani Tiainen - Well planned is half done and a half done has been sufficient before... |
From: Mark H. <mh...@pi...> - 2013-04-10 18:35:04
|
On 4/10/13 9:16 AM, Anurag Chourasia wrote: > Hi Jani and Mark....I have some positive updates :-) Excellent, sounds like you've got things under control! Here's some other advice: - get a sharp stick - occasionally, poke yourself with the sharp stick - think "yes, there are things more painful than unicode" :-) |
From: Anurag C. <anu...@gm...> - 2013-04-10 18:29:03
|
Thanks Henning it shows up SQL> @.[%NLS_LANG%] SP2-0310: unable to open file ".[AMERICAN_AMERICA.WE8MSWIN1252]" Regards, Anurag On Wed, Apr 10, 2013 at 2:22 PM, Henning von Bargen < hen...@ar...> wrote: > Anurag Chourasia wrote: > > Also, I could not find out the current value of NLS_LANG. . . When i query > from sqlplus it is not set...And when i use os.environ to get the value, i > get key error. > > Well, to find out the current value of NLS_LANG in SQL*Plus, the only > reliable > solution is the following dirty trick > (seehttp:// > laurentschneider.com/wordpress/2011/05/what-is-the-current-setting-of-nls_lang-in-sqlplus.html > ) > > @.[$NLS_LANG] > > HTH > Henning > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Henning v. B. <hen...@ar...> - 2013-04-10 18:22:21
|
Anurag Chourasia wrote: Also, I could not find out the current value of NLS_LANG. . . When i query from sqlplus it is not set...And when i use os.environ to get the value, i get key error. Well, to find out the current value of NLS_LANG in SQL*Plus, the only reliable solution is the following dirty trick (seehttp://laurentschneider.com/wordpress/2011/05/what-is-the-current-setting-of-nls_lang-in-sqlplus.html) @.[$NLS_LANG] HTH Henning |
From: Anurag C. <anu...@gm...> - 2013-04-10 16:17:05
|
Hi Jani and Mark....I have some positive updates :-) Following Mark Harrison's suggestion, I tried typecasting unicode to str and the results were positive. This one worked for example T_cursor.execute("SELECT DISTINCT(TAG_STATUS) FROM TAG_HIST WHERE TAG_NBR = > :TAG_NBR", {'TAG_NBR': str(TAG_NBR)}) Following Jani's suggestion, i added this just before my cx_Oracle import and removed the str() typecast conversion import os > os.environ.update([('NLS_LANG', '.UTF8'),('ORA_NCHAR_LITERAL_REPLACE', > 'TRUE'),]) T_cursor.execute("SELECT DISTINCT(TAG_STATUS) FROM TAG_HIST WHERE TAG_NBR = > :TAG_NBR", {'TAG_NBR': TAG_NBR}) And it worked just fine Then i changed it to import os > os.environ.update([('NLS_LANG', '.UTF8'),]) And it worked fine as well. I will do more tests during the day. Jani : Is the variable ORA_NCHAR_LITERAL_REPLACE absolutely necessary? Also, I could not find out the current value of NLS_LANG. . . When i query from sqlplus it is not set...And when i use os.environ to get the value, i get key error. SQL> HOST ECHO %NLS_LANG% > %NLS_LANG% Regards, Anurag On Wed, Apr 10, 2013 at 4:01 AM, Jani Tiainen <re...@gm...> wrote: > Ok, I do following when working with cx_Oracle: > > import os > os.environ.update([ > # Oracle takes client-side character set encoding from the > environment. > ('NLS_LANG', '.UTF8'), > # This prevents unicode from getting mangled by getting encoded > into the > # potentially non-unicode database character set. > ('ORA_NCHAR_LITERAL_REPLACE', 'TRUE'), > ]) > > import cx_Oracle > > Above guarantees that you really are in UTF8 mode. Second environment > variable one is not necessity. And AFAIK there is no other way to set > them (except before running app itself) due the fact that NLS_LANG is > read by OCI libs from the environment. > > > After doing that I'll do the following: > > db = cx_Oracle.Connection(runenv.USERNAME, runenv.PASSWORD, > runenv.TNSENTRY) > c = db.cursor() > c.execute("ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD > HH24:MI:SS' " > "NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS.FF' " > "NLS_TERRITORY = 'AMERICA'") > > Idea is to make sure that dateformats and decimal points are consistent. > For example my locale likes to use comma as a decimal separator. > > Which means that python 10.2f must be '10,2' when inserting to db. > Painful that is. > > > 9.4.2013 12:57, Anurag Chourasia kirjoitti: > > Hi Jani. The column type is varchar2 > > > > Regards, > > Anurag > > > > On 9 Apr 2013 01:14, "Jani Tiainen" <re...@gm... > > <mailto:re...@gm...>> wrote: > > > > What is the type of the column in the table? > > > > There are few quirks I know of. > > > > 9.4.2013 1:35, Anurag Chourasia kirjoitti: > > > Thanks. Will try that too and report back the findings. > > > > > > Regards, > > > Anurag > > > > > > On Mon, Apr 8, 2013 at 6:00 PM, Mark Harrison <mh...@pi... > > <mailto:mh...@pi...> > > > <mailto:mh...@pi... <mailto:mh...@pi...>>> wrote: > > > > > > On 4/8/13 2:56 PM, Anurag Chourasia wrote: > > > > Hi Tamas, > > > > > > > > Thanks for the response. Here is the result... > > > > > > > > TAG_NBR: u'2928982' <type 'unicode'> > > > > > > > > Please let me know if this gives any more ideas. I will > > also try > > > a explicit type conversion using str() to see if that makes a > > > difference. > > > > > > If that doesn't work can you try using a non-unicode string > > such as > > > > > > {'TAG_NBR': 'ABC'} > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > Minimize network downtime and maximize team effectiveness. > > > Reduce network management and security costs.Learn how to hire > > > the most talented Cisco Certified professionals. Visit the > > > Employer Resources Portal > > > http://www.cisco.com/web/learning/employer_resources/index.html > > > _______________________________________________ > > > cx-oracle-users mailing list > > > cx-...@li... > > <mailto:cx-...@li...> > > > <mailto:cx-...@li... > > <mailto:cx-...@li...>> > > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > Minimize network downtime and maximize team effectiveness. > > > Reduce network management and security costs.Learn how to hire > > > the most talented Cisco Certified professionals. Visit the > > > Employer Resources Portal > > > http://www.cisco.com/web/learning/employer_resources/index.html > > > > > > > > > > > > _______________________________________________ > > > cx-oracle-users mailing list > > > cx-...@li... > > <mailto:cx-...@li...> > > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > > > > > -- > > Jani Tiainen > > > > - Well planned is half done and a half done has been sufficient > > before... > > > > > ------------------------------------------------------------------------------ > > Precog is a next-generation analytics platform capable of advanced > > analytics on semi-structured data. The platform includes APIs for > > building > > apps and a phenomenal toolset for data science. Developers can use > > our toolset for easy data analysis & visualization. Get a free > account! > > http://www2.precog.com/precogplatform/slashdotnewsletter > > _______________________________________________ > > cx-oracle-users mailing list > > cx-...@li... > > <mailto:cx-...@li...> > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > > > > > ------------------------------------------------------------------------------ > > Precog is a next-generation analytics platform capable of advanced > > analytics on semi-structured data. The platform includes APIs for > building > > apps and a phenomenal toolset for data science. Developers can use > > our toolset for easy data analysis & visualization. Get a free account! > > http://www2.precog.com/precogplatform/slashdotnewsletter > > > > > > > > _______________________________________________ > > cx-oracle-users mailing list > > cx-...@li... > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > -- > Jani Tiainen > > - Well planned is half done and a half done has been sufficient before... > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Jani T. <re...@gm...> - 2013-04-10 08:01:35
|
Ok, I do following when working with cx_Oracle: import os os.environ.update([ # Oracle takes client-side character set encoding from the environment. ('NLS_LANG', '.UTF8'), # This prevents unicode from getting mangled by getting encoded into the # potentially non-unicode database character set. ('ORA_NCHAR_LITERAL_REPLACE', 'TRUE'), ]) import cx_Oracle Above guarantees that you really are in UTF8 mode. Second environment variable one is not necessity. And AFAIK there is no other way to set them (except before running app itself) due the fact that NLS_LANG is read by OCI libs from the environment. After doing that I'll do the following: db = cx_Oracle.Connection(runenv.USERNAME, runenv.PASSWORD, runenv.TNSENTRY) c = db.cursor() c.execute("ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS' " "NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS.FF' " "NLS_TERRITORY = 'AMERICA'") Idea is to make sure that dateformats and decimal points are consistent. For example my locale likes to use comma as a decimal separator. Which means that python 10.2f must be '10,2' when inserting to db. Painful that is. 9.4.2013 12:57, Anurag Chourasia kirjoitti: > Hi Jani. The column type is varchar2 > > Regards, > Anurag > > On 9 Apr 2013 01:14, "Jani Tiainen" <re...@gm... > <mailto:re...@gm...>> wrote: > > What is the type of the column in the table? > > There are few quirks I know of. > > 9.4.2013 1:35, Anurag Chourasia kirjoitti: > > Thanks. Will try that too and report back the findings. > > > > Regards, > > Anurag > > > > On Mon, Apr 8, 2013 at 6:00 PM, Mark Harrison <mh...@pi... > <mailto:mh...@pi...> > > <mailto:mh...@pi... <mailto:mh...@pi...>>> wrote: > > > > On 4/8/13 2:56 PM, Anurag Chourasia wrote: > > > Hi Tamas, > > > > > > Thanks for the response. Here is the result... > > > > > > TAG_NBR: u'2928982' <type 'unicode'> > > > > > > Please let me know if this gives any more ideas. I will > also try > > a explicit type conversion using str() to see if that makes a > > difference. > > > > If that doesn't work can you try using a non-unicode string > such as > > > > {'TAG_NBR': 'ABC'} > > > > > > > > > ------------------------------------------------------------------------------ > > Minimize network downtime and maximize team effectiveness. > > Reduce network management and security costs.Learn how to hire > > the most talented Cisco Certified professionals. Visit the > > Employer Resources Portal > > http://www.cisco.com/web/learning/employer_resources/index.html > > _______________________________________________ > > cx-oracle-users mailing list > > cx-...@li... > <mailto:cx-...@li...> > > <mailto:cx-...@li... > <mailto:cx-...@li...>> > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > > > > > > > ------------------------------------------------------------------------------ > > Minimize network downtime and maximize team effectiveness. > > Reduce network management and security costs.Learn how to hire > > the most talented Cisco Certified professionals. Visit the > > Employer Resources Portal > > http://www.cisco.com/web/learning/employer_resources/index.html > > > > > > > > _______________________________________________ > > cx-oracle-users mailing list > > cx-...@li... > <mailto:cx-...@li...> > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > -- > Jani Tiainen > > - Well planned is half done and a half done has been sufficient > before... > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for > building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > <mailto:cx-...@li...> > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > > > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > -- Jani Tiainen - Well planned is half done and a half done has been sufficient before... |
From: Anurag C. <anu...@gm...> - 2013-04-09 09:57:37
|
Hi Jani. The column type is varchar2 Regards, Anurag On 9 Apr 2013 01:14, "Jani Tiainen" <re...@gm...> wrote: > What is the type of the column in the table? > > There are few quirks I know of. > > 9.4.2013 1:35, Anurag Chourasia kirjoitti: > > Thanks. Will try that too and report back the findings. > > > > Regards, > > Anurag > > > > On Mon, Apr 8, 2013 at 6:00 PM, Mark Harrison <mh...@pi... > > <mailto:mh...@pi...>> wrote: > > > > On 4/8/13 2:56 PM, Anurag Chourasia wrote: > > > Hi Tamas, > > > > > > Thanks for the response. Here is the result... > > > > > > TAG_NBR: u'2928982' <type 'unicode'> > > > > > > Please let me know if this gives any more ideas. I will also try > > a explicit type conversion using str() to see if that makes a > > difference. > > > > If that doesn't work can you try using a non-unicode string such as > > > > {'TAG_NBR': 'ABC'} > > > > > > > > > ------------------------------------------------------------------------------ > > Minimize network downtime and maximize team effectiveness. > > Reduce network management and security costs.Learn how to hire > > the most talented Cisco Certified professionals. Visit the > > Employer Resources Portal > > http://www.cisco.com/web/learning/employer_resources/index.html > > _______________________________________________ > > cx-oracle-users mailing list > > cx-...@li... > > <mailto:cx-...@li...> > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > > > > > > > ------------------------------------------------------------------------------ > > Minimize network downtime and maximize team effectiveness. > > Reduce network management and security costs.Learn how to hire > > the most talented Cisco Certified professionals. Visit the > > Employer Resources Portal > > http://www.cisco.com/web/learning/employer_resources/index.html > > > > > > > > _______________________________________________ > > cx-oracle-users mailing list > > cx-...@li... > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > -- > Jani Tiainen > > - Well planned is half done and a half done has been sufficient before... > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Peter <bl...@gm...> - 2013-04-09 09:25:22
|
> Relevant versions: > Python 2.7.3 > cx_Oracle 5.1.2 > Oracle Instant Client for Linux x86-64 11.2.0.3.0 Same issue here. Cannot connect with unicode username, password or dsn. >> argument X must be str, not unicode Any hints? |
From: Jani T. <re...@gm...> - 2013-04-09 05:13:43
|
What is the type of the column in the table? There are few quirks I know of. 9.4.2013 1:35, Anurag Chourasia kirjoitti: > Thanks. Will try that too and report back the findings. > > Regards, > Anurag > > On Mon, Apr 8, 2013 at 6:00 PM, Mark Harrison <mh...@pi... > <mailto:mh...@pi...>> wrote: > > On 4/8/13 2:56 PM, Anurag Chourasia wrote: > > Hi Tamas, > > > > Thanks for the response. Here is the result... > > > > TAG_NBR: u'2928982' <type 'unicode'> > > > > Please let me know if this gives any more ideas. I will also try > a explicit type conversion using str() to see if that makes a > difference. > > If that doesn't work can you try using a non-unicode string such as > > {'TAG_NBR': 'ABC'} > > > > ------------------------------------------------------------------------------ > Minimize network downtime and maximize team effectiveness. > Reduce network management and security costs.Learn how to hire > the most talented Cisco Certified professionals. Visit the > Employer Resources Portal > http://www.cisco.com/web/learning/employer_resources/index.html > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > <mailto:cx-...@li...> > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > ------------------------------------------------------------------------------ > Minimize network downtime and maximize team effectiveness. > Reduce network management and security costs.Learn how to hire > the most talented Cisco Certified professionals. Visit the > Employer Resources Portal > http://www.cisco.com/web/learning/employer_resources/index.html > > > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > -- Jani Tiainen - Well planned is half done and a half done has been sufficient before... |
From: Anurag C. <anu...@gm...> - 2013-04-08 22:36:14
|
Thanks. Will try that too and report back the findings. Regards, Anurag On Mon, Apr 8, 2013 at 6:00 PM, Mark Harrison <mh...@pi...> wrote: > On 4/8/13 2:56 PM, Anurag Chourasia wrote: > > Hi Tamas, > > > > Thanks for the response. Here is the result... > > > > TAG_NBR: u'2928982' <type 'unicode'> > > > > Please let me know if this gives any more ideas. I will also try a > explicit type conversion using str() to see if that makes a difference. > > If that doesn't work can you try using a non-unicode string such as > > {'TAG_NBR': 'ABC'} > > > > > ------------------------------------------------------------------------------ > Minimize network downtime and maximize team effectiveness. > Reduce network management and security costs.Learn how to hire > the most talented Cisco Certified professionals. Visit the > Employer Resources Portal > http://www.cisco.com/web/learning/employer_resources/index.html > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Mark H. <mh...@pi...> - 2013-04-08 22:02:03
|
On 4/8/13 2:56 PM, Anurag Chourasia wrote: > Hi Tamas, > > Thanks for the response. Here is the result... > > TAG_NBR: u'2928982' <type 'unicode'> > > Please let me know if this gives any more ideas. I will also try a explicit type conversion using str() to see if that makes a difference. If that doesn't work can you try using a non-unicode string such as {'TAG_NBR': 'ABC'} |