How to get the same result on different characterset?
Hello experts,
I use
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production PL/SQL Release 11.2.0.3.0 - Production "CORE 11.2.0.3.0 Production" TNS for 64-bit Windows: Version 11.2.0.3.0 - Production NLSRTL Version 11.2.0.3.0 - Production
Needing a result even on my example.
SELECT ASCII('ˆ') -- when characterset is -NLS_CHARACTERSET WE8MSWIN1252 FROM DUAL; --result 136
SELECT ASCII('ˆ') -- when characterset is -NLS_CHARACTERSET AL32UTF8 FROM DUAL; --result 52102 but need 136
I need same result.
Thanks for your time...
EDITED RESULT.
Ask2Learn
You test something that you call "encrypted" data, which are not at all encryption.
For example speaking of letter t.
The CHR (ASCII('t') + 20) operation is pretty useless. You try to find the character that has the code binary and longer than 20 that the letter 't'. This can work with single-byte as WE8MSWIN1252 character sets, but it does not work with variable width as AL32UTF8 character sets. The letter 't' a code 0 x 74 in WE8MSWIN1252 and AL32UTF8. If you add 20 (decimal), you get 0 x 88. Byte 0 x 88 is a valid code in the WE8MSWIN1252, but is not a valid code in AL32UTF8. Bytes in this range may bytes of continuation in AL32UTF8, i.e. a second, third or the fourth byte of a multi-byte sequence.
The "circumflex accent" character code 0 x 88 (in WE8MSWIN1252) has the code of two bytes 0xCB 0 x 86 in AL32UTF8.
So, why not take a look at DBMS_CRYPTO integrated
Hope this helps
Hamid
Tags: Database
Similar Questions
-
Printer Lexmark Pro 200. Does not print the correct colors. I restarted my computer and the printer is off but get the same result.
Hello
- What were the changes made before the problem occurred?
You try to run this fix and check.
http://Windows.Microsoft.com/en-us/Windows7/open-the-printer-Troubleshooter
If above does not work, try contacting Lexmark support for assistance.
http://www1.Lexmark.com/en_US/global-services/customer-support-services/index.shtml
-
I can't get Adobe Flash Player to date on my Mac. It keeps telling me to close Safari, even if it is closed. I have tried every thing on the Adobe site to solve the problem with the same results still. I went to the site of both Mac and said to go to Adobe for a solution. It worked fine as a new Mac in February, but it will not update now, so no Flash Player ay all. Thanks for any help.
By clicking the red dot on the safari window it minimizes, but leave the program running.
To exit Safari completely, open Safari by clicking on the dock icon, and then choose Safari > Quit Safari to the upper left of the screen.
-
How to get the same look as the flash for borders?
Hi I have selected the circle and the circle filled with certain colors. now, I want to have the border around the circle so I saelected STROKE in the Edit menu and applied with a pixel. How ever it gives a strong appearance in flash. in photoshop, the border looks like dissolved and transparent. is there a way to get the same look as the flash?
I would recommend using shape layers (starting with the Ellipse tool) instead of a selection.
Cs6 on shape layers can have stroke (located in the Options bar).
-
Get the same results without line of sight
Hi gurus,
My version of the database is 10.2.0.4.0.
I have a couple of tables as follows:
I would like to get a query to return for each group, the person with less person_number (if no one assigned to the group, then the query must return again with an empty person group). I know I can do this by using for example:CREATE TABLE xxgroups(group_number NUMBER, description VARCHAR2(30)); INSERT INTO xxgroups VALUES(1,'Group 1'); INSERT INTO xxgroups VALUES(2,'Group 2'); INSERT INTO xxgroups VALUES(3,'Group 3'); INSERT INTO xxgroups VALUES(4,'Group 4'); INSERT INTO xxgroups VALUES(5,'Group 5'); CREATE TABLE xxgroup_persons(group_number NUMBER, person_number NUMBER, first_name VARCHAR2(30), last_name VARCHAR2(30)); INSERT INTO xxgroup_persons VALUES(1, 1, 'John', 'Smith'); INSERT INTO xxgroup_persons VALUES(1, 2, 'James', 'Smith'); INSERT INTO xxgroup_persons VALUES(1, 3, 'Joe', 'William'); INSERT INTO xxgroup_persons VALUES(2, 4, 'Julien', 'Ford'); INSERT INTO xxgroup_persons VALUES(2, 5, 'James', 'Kelly'); INSERT INTO xxgroup_persons VALUES(3, 6, 'Francis', 'Smith'); INSERT INTO xxgroup_persons VALUES(5, 7, 'Jerry', 'Ford'); INSERT INTO xxgroup_persons VALUES(5, 8, 'Alfred', 'Willis'); INSERT INTO xxgroup_persons VALUES(5, 9, 'Jon', 'Preston'); COMMIT;
but it would be possible to achieve the same results without inline mode?SELECT group_number, person_number, first_name, last_name FROM (SELECT a.group_number, b.person_number, b.first_name, b.last_name , RANK() OVER (PARTITION BY a.group_number ORDER BY person_number) person_order FROM xxgroups a, xxgroup_persons b WHERE a.group_number = b.group_number (+) ) WHERE person_order = 1 ORDER BY group_number; GROUP_NUMBER PERSON_NUMBER FIRST_NAME LAST_NAME ------------ ------------- ------------------------------ ------------------------------ 1 1 John Smith 2 4 Julien Ford 3 6 Francis Smith 4 5 7 Jerry Ford
Thank you.You can try this function KEEP:
scott@orapdt> SELECT a.group_number, 2 min(b.person_number) as person_number, 3 min(b.first_name) keep (dense_rank first order by person_number) as first_name, 4 min(b.last_name) keep (dense_rank first order by person_number) as last_name 5 FROM xxgroups a, xxgroup_persons b 6 WHERE a.group_number = b.group_number (+) 7 group by a.group_number; GROUP_NUMBER PERSON_NUMBER FIRST_NAME LAST_NAME ------------ ------------- ------------------------------ ------------------------------ 1 1 John Smith 2 4 Julien Ford 3 6 Francis Smith 4 5 7 Jerry Ford 5 rows selected.
-
How can I get the same results from Google Images like in internet Explorer
If I search Google Images in IE8, I get a list of result pages with a fixed number of items per page. These thumbnail images download quickly, and under each image there is useful information about the content of the image and its source. Images on the next page doesn't download not unless if I select the next page in the list, so that the modem activity stops quickly.
When I use the same URL - www.google.com - in Firefox and go to Images, I get pages with an indefinitely large number of images of result. All images are stuck next to each other, and there is no other useful information from the text shown at all. If I try to scroll to the bottom of the screen, images more keep downloading. There seems to be no Google settings available in this view to limit the number of images per page.
Only problems with this is that I am currently limited to 56 KB connection. Images from this point of view download so slowly that they simply never complete in a reasonable time.
However, apart from the speed of connection, there is the question of the useful information from the missing text.
I can search for photos on startpage.com and get something like the old format of Google, but I can't receive the best list of results that I expect from Google. StartPage uses Google for their research on the web regularly, according to a note on the web search display. But if I go to Images, this note disappears.
I call it the traditional Google Images Search in Firefox?
Problem solved by saving a bookmark to Google and then to add by changing the & sout = 1 keyword in the URL.
When Google is accessible with this keyword, it will ship between web and image searches.
This example gets always the classic view of Google images.
-
I have an accmaster say table where each record has detailts on an acct as actno, curr_bal, branch, acct_type I want something as below a
branch_no - Sum (curr_bal) where acct_type like 1% ' as sb - sum (curr_bal) where acct_type like 2%'s fd of the Group table by branch in a single line as shown below
00001 550000 65000000
00002 75909000 2568229867
Please tell how to do the above operation.Hello
This is called a Pivot , and here's a way to do it:
SELECT branch_no , SUM (CASE WHEN acct_type LIKE '1%' THEN curr_bal END) AS total_1 , SUM (CASE WHEN acct_type LIKE '2%' THEN curr_bal END) AS total_2 FROM accmaster GROUP BY branch_no ;
This will work in any version of Oracle, from 8.1, but starting in Oracle 11.1, you can also use the SELECT... Function PIVOT.
I hope that answers your question.
If not, post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all tables and also post the results desired from these data.
Explain, using specific examples, how you get these results from these data.
Always tell what version of Oracle you are using.Furthermore, your table is called
accmaster (where, I guess, ACC means 'account') and it contains called columns
ACTNO ( Act means 'account') and
acct_type ( acct means 'account')
Do you really need 3 different ways to shorten "account"? How do you recall when you used a way and when you have used another or when you used an underscore after the abbreviation character, and when you do not have? Even if you never get confused by these things, someone trying to help you, and one that should keep your code in the future, will probably. Do not use consistent, such as namespace
acct_master
Acct_No and
acct_type
? -
How to get the desired result when subsequent month is not available
WITH T1 AS (SELECT 'A' COL1, 'B' COL2, 'C' COL3, '01-Jan-2015' DT, 10 QTY FROM DUAL UNION SELECT 'A' COL1, 'B' COL2, 'C' COL3, '01-feb-2015' DT, 20 QTY FROM DUAL UNION SELECT 'A' COL1, 'B' COL2, 'C' COL3, '01-mar-2015' DT, 30 QTY FROM DUAL UNION SELECT 'A' COL1, 'B' COL2, 'C' COL3, '01-may-2015' DT, 40 QTY FROM DUAL UNION SELECT 'A1' COL1, 'B1' COL2, 'C1' COL3, '01-mar-2015' DT, 40 QTY FROM DUAL UNION SELECT 'A1' COL1, 'B1' COL2, 'C1' COL3, '01-may-2015' DT, 40 QTY FROM DUAL) SELECT * FROM t1
Current output:
COL1 COL2 COL3 DT QTY. A B C January 1, 2015 10 A B C February 1, 2015 20 A B C 01-mar-2015 30 A B C 01-may-2015 40 A1 B1 C1 01-mar-2015 40 A1 B1 C1 01-may-2015 40 Expected results
COL1 COL2 COL3 DT QTY. DT REQ_VAL A B C 01/01/2015 10 01/01/2015 20 A B C 01/02/2015 20 01/02/2015 30 A B C 01/03/2015 30 01/03/2015 0 A B C 01/05/2015 40 01/05/2015 0 A1 B1 C1 01/03/2015 40 01/03/2015 0 A1 B1 C1 01/05/2015 40 01/05/2015 0 Logic:
If we COL1, COL2, COL3 combination for A, B, C, we have the quantity for 1 January, 1 February, 1 March, 1 may, and we don't have quantity for April 1 and June 1. I need following QUANTITY value as another column. If I use the lead, I'll get the value from May 1st to March 1st, but I want to value 0 because it is after March either.
What I've tried so far:
SELECT * FROM (WITH T1 AS (SELECT 'A' COL1, 'B' COL2, 'C' COL3, '01-Jan-2015' DT, 10 QTY FROM DUAL UNION SELECT 'A' COL1, 'B' COL2, 'C' COL3, '01-feb-2015' DT, 20 QTY FROM DUAL UNION SELECT 'A' COL1, 'B' COL2, 'C' COL3, '01-mar-2015' DT, 30 QTY FROM DUAL UNION SELECT 'A' COL1, 'B' COL2, 'C' COL3, '01-may-2015' DT, 40 QTY FROM DUAL) SELECT COL1, COL2, COL3, TO_DATE (T1.DT) DT, NVL (QTY, 0) QTY, MONTHS.DT ALL_DATES, LEAD (NVL (QTY, 0), 1, 0) OVER (ORDER BY MONTHS.DT) REQ_VAL FROM T1, ( SELECT ADD_MONTHS (TO_DATE ('01-jun-2015'), LEVEL - 6) DT FROM DUAL CONNECT BY LEVEL <= 12) MONTHS WHERE MONTHS.DT = T1.DT(+)) WHERE DT ISNOTNULL;
My query works for a set of COL1, COL2, COL3, am looking how we can achieve multiple COL1, COL2, COL3 (or) otherwise better query writing.
Thanks for your suggestions in advance.
Thank you
Now, to understand your condition: your additional column must indicate the amount of the next month, or zero if it is not a record for the month. How about this?
WITH T1
AS (SELECT 'A' COL1,)
'B' COL2,
COL3 'C ',.
To_date('01-Jan-2015','dd-mon-yyyy') DT,
QTY 10
OF THE DOUBLE
UNION
SELECT 'A' COL1,
'B' COL2,
COL3 'C ',.
To_date('01-Feb-2015','dd-mon-yyyy') DT,
QTY. 20
OF THE DOUBLE
UNION
SELECT 'A' COL1,
'B' COL2,
COL3 'C ',.
To_date('01-Mar-2015','dd-mon-yyyy') DT,
QTY 30
OF THE DOUBLE
UNION
SELECT 'A' COL1,
'B' COL2,
COL3 'C ',.
To_date('01-May-2015','dd-mon-yyyy') DT,
QUANTITY 40
OF THE DOUBLE
UNION
SELECT 'A1' COL1,
COL2 "B1."
COL3 "C1"
To_date('01-Mar-2015','dd-mon-yyyy') DT,
QUANTITY 40
OF THE DOUBLE
UNION
SELECT 'A1' COL1,
COL2 "B1."
COL3 "C1"
To_date('01-May-2015','dd-mon-yyyy') DT,
QUANTITY 40
THE DOUBLE)
X.Col1, x.col2, x.col3, x.dt, x.qty, NVL(y.qty,0) SELECT req_val
THE t1 x
LEFT OUTER JOIN t1 y
ON y.col1 = x.col1
AND y.col2 = x.col2
AND y.col3 = x.col3
AND y.dt = add_months(x.dt,1)
ORDER BY 1,2,3,4
My query works for a DFU, am looking how we can achieve multiple UTD
What is a DFU?
-
How to share the same function in different frames
I create a quiz of multiple choice with several questions.
I have every clickable selection using "answer1", "answer2"... as the instance name.
I created a standard button to show the different States and make selection (like what is below):
ANSWER1.buttonMode = true; / / to display the hand icon
ANSWER1.addEventListener (MouseEvent.CLICK, answer1Click);
ANSWER1.addEventListener (MouseEvent.ROLL_OVER, answer1Rollover);
ANSWER1.addEventListener (MouseEvent.ROLL_OUT, answer1Rollout);
function answer1Click(ev:MouseEvent):void
{
ANSWER1.gotoanswerndStop (2);
ANSWER2.gotoanswerndStop (1);
answer3.gotoanswerndStop (1);
answer4.gotoanswerndStop (1);
salt = 1;
}
function answer1Rollover(ev:MouseEvent):void
{
ANSWER1.gotoanswerndStop (2);
}
function answer1Rollout(ev:MouseEvent):void
{
If (salt! = 1).
{
ANSWER1.gotoanswerndStop (1);
}
}
Duplicate the setting for different questions, but I can't reuse the same functions for the first question. It would give error 'Duplicate' function definition... I don't want to rename the names of instances for each new question. How can I reuse the same function for questions?
Thank you
This layer only for functions do not use to add event listeners. Add headphones when the answer buttons appear:
-
How to get the desired result of the post
Hi all.
I use APEX 4.0.
Now, I have two pages: A, B.
Transfer the student_id from page A to page B.
There is an article questioned B: student_name page select the CT where student_id =: student_id;
At the same time, I want to get the name of the student with the title of the region, I handle it like this: student name: & Student_Name. (with the '.') ;
If the bases of the student_name on column DB, the title work. After I have change student_name based on the query, it does not work.
How can I solve it. Thank you.Hi Andy,.
It depends on If the value is defined in this field. If you set the source of the element, it is probably too late for value must be used in the title of the region.
In general, I find that it is better to create a calculation that is running "Before Header" to set values in the page that I need to use when the page is loaded.
Andy
-
How to get the same functionality for string as java in oracle 10g
Example:
In java, if I use
-> > >
String.format ("% 03d", 11) then he will give me the result 011
String.format ("% 03d", 1111) then he will give me the result 1111
I need also same result in Oracle for a stored procedure. I used to_char() and lpad() function but could not get the desirable.
I'm new on this. Please forgive for this silly question and help me.Or with the prefix "FM", which makes the FILLING for us:
to_char(col1, 'fm9999099')
-
How to change the same on 2 different phones to MAC iMovie project
I am in Germany and my husband is in Spain and we have 2 separate not coupled Mac Book Air laptop.
(1) I need iMovie project "edit" an unfinished which is currently on his laptop.
(2) how can we share and both have access to the clips unfinished , events, projects iMovie, etc. between 2 laptops?
We only know how to share projects FINISHED, but this isn't what I want to do.
Could possibly copy us the unfinished project files on DropBox or something like that?
Thank you
This is possible, but not easy. You need to work from a copy of the same library using exactly the same version of iMovie. You cannot work directly for a copy of the library 'in the cloud', but you can use the cloud to transfer the updates to the library. Libraries are often quite large, so download will be slow. If the library contains many other events and projects you don't want to work on it would be better to create a library containing only the events and you need to collaborate on projects.
Of course only one of you can be change at any time and you would have to notify each other when you have downloaded an update from the library and completed. Its also important to avoid the update of the library while iMovie is running.
Another important point is to ensure that the library contains all of the original media files and not of links to files in other libraries like iTunes or pictures that do not work on the other computer. To do this, you need to "consolidate media" for more information see: http://help.apple.com/imovie/mac/10.1/#/mov882dee351
Geoff.
-
How to get the overall result sequence into LabView?
Hello
Could someone can help with this little problem?
We have a batch (.bat) that launches a list given TestStand sequences, which works as expected.
However, we monitor the results of each sequence and display it to the operator.
Our idea is to get the result of the sequence in a VI, executed at the end of the sequence and add it to a queue, which will be extracted and displayed on a monitor of VI, executed separately.
The only problem we have left must be able to recover the overall result of the sequence. Any idea or suggestion?
Thank you
Raphael
Thanks for all your replies. We finally finished queues sequencefailed node sequence context property value.
I also discovered the TestStand database logging and began to use it in parallel.
Thanks again
-
How to get the same day of a month each year in the DB (update a flag)
Hello
I'm trying to make a update for a table of flag request in our database that contains the dates and the Pavilion columns. Currently the system have dates for the next ten years. The flags are updated with the values 0 or 1, if a particular date falls under the criteria required.
I need to update the column flag for the same day of the month of each year. for example, 2nd Sunday of October. The value must be updated in all the years in the table. Currently I use the following query to update of the current year.
UPDATE FILTERCALENDAR SET YEAR_WINDOW = 1 WHERE c_date = NEXT_DAY (TO_DATE('OCT-2013','MON-YYYY'), 'SUNDAY') + (2-1) * 7;
and for the next year as
UPDATE FILTERCALENDAR SET YEAR_WINDOW = 1 WHERE c_date = add_months (NEXT_DAY (TO_DATE('OCT-2013','MON-YYYY'), 'SUNDAY') + (2-1) * 7, + 12)-1;
This isn't a great way to do it because he does not take care of leap years, and it does not scan and update values across the table for all the years correctly.
Can someone help me fix this please.Welcome to the forum!
Whenever you provide post your Oracle version 4-digit (result of SELECT * FROM V$ VERSION)
>
and for the next year asUPDATE FILTERCALENDAR SET YEAR_WINDOW = 1 WHERE c_date = add_months (NEXT_DAY (TO_DATE('OCT-2013','MON-YYYY'), 'SUNDAY') + (2-1) * 7, + 12)-1;
>
Why do you use "2013" in the TO_DATE for the year next rather than use simply '2014 '?You said it works
>
UPDATE FILTERCALENDAR SET YEAR_WINDOW = 1 WHERE c_date = NEXT_DAY (TO_DATE('OCT-2013','MON-YYYY'), 'SUNDAY') + (2-1) * 7;
>
Just interview the years from your table (list of the separate years) and use the query above on them.SELECT DISTINCT TO_CHAR(c_date, 'yyyy') FROM FILTERCALENDAR
Or use this predicate
WHERE c_date = next_day(last_day(add_months (c_date, -1)), 'SUNDAY') + 7 AND TO_CHAR(c_date, 'mm') = '10'
1 TO_CHAR ensures that the line has a month to October.
2 ADD_MONTHS goes to Sept. 1.
3 LAST_DAY going until the last day of September.
4 NEXT_DAY goes to the first Sunday in October
5 + 7 is going to the second Sunday in October -
How do I get the same results in the Union vs join statement statement
Hello
I have 3 related tables and you must combine customers table1 and table3. My Control Panel is constantly evolving based schedule changes or order_completed qty. I have two problems that I can't solve.
Table 1: Manager has fields {managerId, Mangager_name, customerId & customer}
Table2: client includes the fields {customerId, orderId, product manager, managerId and}
Table 3: order has fields {orderId, customerId, customer, date, amount_order, qty, order_completed}
1. I need check what are customers or away from table Manager / order based on customerId and managerId
Here is the example of union that I would like to convert a join because I need to include aggregated order table fields and the customer at table eating based on the field of the client:
Select m.client
Manager m
where m.managerId = 22
Union select m.client in order o where o.customerId = 65
2. create a view or a temporary table (called State) to the report with an additional field that determines if the client has been found in the roll of the order and not in the table Manager.
Example of a view of the State or the temporary table select output
rownum. customer | status
1. Mary | The two Tables
2. Tomas | The two Tables
3. John | Customer table
4. April | Customer table
Thanks for the helpHello
SQL> create table manager (m_id number, m_name char(10), customer_id number, client char(10)); Table created. SQL> SQL> insert into manager values (10,'M_1',111,'AAA'); 1 row created. SQL> insert into manager values (20,'M_2',222,'BBB'); 1 row created. SQL> SQL> create table customer (C_id number, m_id number, order_id number); Table created. SQL> SQL> insert into customer values (111,10,5000); 1 row created. SQL> insert into customer values (222,20,5001); 1 row created. SQL> insert into customer values (333,NULL,5002); 1 row created. SQL> create table order_dt (Order_id number, c_id number, Client char(10)); Table created. SQL> insert into order_dt values (5000,111,'AAA'); 1 row created. SQL> insert into order_dt values (5002,333,'CCC'); 1 row created. SQL> select rownum, a.c2, CASE WHEN ((a.ct2+a.ct1) = 2) THEN 'Both Tables' 2 WHEN (a.ct2 = 1) THEN 'Client table' 3 WHEN (a.ct1 = 1) THEN 'Manager table' 4 ELSE 'NULL' 5 END AS status 6 from ( 7 select NVL(m.Client,o.Client) c2,count(m.Client) Ct1, count(O.Client) ct2 8 from manager m, 9 customer c, 10 order_dt O 11 where m.m_id(+) = c.m_id 12 and c.c_id = O.c_id(+) 13 group by m.Client,O.Client 14 ) A 15 ; ROWNUM C2 STATUS ---------- ---------- ------------- 1 AAA Both Tables 2 CCC Client table 3 BBB Manager table
-Pavan Kumar N
Maybe you are looking for
-
Boot camp windows 7 without internet probs
Hi, can someone help me please? I installed windows 7 64 bit, cd, everything seems ok part of I can't go on the internet. I downloaded bootcamp and tried to install the drivers but it says that they are not compatible for the mac. It's a macbook pro
-
It becomes quite annoying that Firefox should update and change the layout of the browser so frequently. I like that Firefox is the addition of new features, but not if big I have to keep relearning to use the same program. Because there is no option
-
Satellite L755 - 13K - game WoW LoL & questions
Hey,. I had some problems recently with the graphic on my laptop. The games I play are World of Warcraft and League of Legends. When I bought the laptop, the graphics settings recommended worked very well and smoothly. But now, not even a year later,
-
Satellite L300 17V won't read the CD in the drive
I have a new Satellite laptop with Vista installed and I'm having problems to make the machine to read some CD. It does not recognize the discs that I burned or issued by my employer, and yet these disks are accessible from my other laptop and my des
-
Hello Anyone know how to plot multiple points on a map? I think it's something to do with the blackberry.invoke.MapsArguments (locationDocument: Document) but I don't know how to use it. I tried: var document = ""; var args = new blackberry.invoke.Ma