separate strings from a long list
Hello
I'm trying to get distinct values in a list of strings separated by commas.
for example,.
Select distinct ename from emp
where instr ("BLAKE, CLARK, JONES, SCOTT, BLAKE CLARK, JONES, SCOTT, BLAKE CLARK, JONES, SCOTT, BLAKE")
CLARK, JONES, SCOTT, BLAKE, CLARK, JONES, SCOTT, BLAKE, CLARK, JONES, SCOTT, BLAKE, CLARK, JONES, SCOTT, BLAKE ', ename) > 0;
It gives the result. When there are huge name lists (which is more than 4000 bytes) it gives the error as "string literal too long."
How to get distinct values in a long list.
Any help would be great. I tried with regexp_substr and also the function TABLE (comma_to_table. everything works for the list with 4000bytes and below.)
Nothing is taking the long list of the values of more than 4000 bytes. Help, please.
Thank you
KJ
An iteration to create your lists is not the most effective approach, I personally use listagg and chunk 4 k of lists, but I'm so busy, as a quick solution for you, try the following...
create or replace function 'GET_EMPNAMES' (SERIALNUM in number) return as clob
V_NM CLOB: = ' ';
cursor C is
Select distinct ENAME
from EMP
where SNO = SERIALNUM;
Start
for CAASS in C
loop
V_NM: = to_clob (AHACS. ENAME | ',') || V_NM;
end loop;
Return V_NM;
end;
create or replace 'GET_FILTERED_NMFN' (FILTERED_NAMES in clob) return clob is
LIST_OF_NAMES CLOB: = ' ';
ALLNAMES cursor is
Select distinct E.ENAME
EMP e
where INSTR (FILTERED_NAMES, E.ENAME) > 0;
Start
I'm in ALLNAMES
loop
LIST_OF_NAMES: = to_clob(I.ENAME ||) ',' )|| LIST_OF_NAMES;
end loop;
Return LIST_OF_NAMES;
end;
Tags: Database
Similar Questions
-
sync music from my phone files with wmp, I got a long list of files that cannot be the result of a sync error message, how can I resolve this issue? Thank you
I tried to by checking the format of files and those who are on mp3original title: problem syncing from wmp
You need Samsung Kies to transfer into the memory of the Galaxy. Its free on the site of Samsung.
See you soon,.
Jerry -
Unexpected error "the result of the concatenation of string is too long."
Hello
I use the Oracle 11.2.0 database.
When querying my database with a common table expression that concatenates strings VARCHAR2, I get an error ORA-01489 even if I suspect that I am concatenating more 4000 characters.
To be more precise, I have a table entity which basically stores the XML elements, including their parent element and their position of brother among his brothers and sisters. The CREATE statement for this table is listed below.
CREATE TABLE (entity
ID NUMBER (10,0) NOT NULL PRIMARY KEY,
Name VARCHAR2 (100) NOT NULL,
Parent NUMBER (10,0) REFERENCES Entity (ID),
Sibling_Pos NUMBER (2.0) DEFAULT 0
)
;
Now, I would like for all items to be concatenated with their ancestors elements to a structure as follows:
"(/ root_element(sibling_pos)/.../ancestor_element(sibling_pos)/parent_element(sibling_pos)/current_element(sibling_pos).
(where root_element, ancestor_element, parent_element and current_element are fair values in the name column of the table of the entity)
To do this, I use a common table expression that concatenates the values of name and sibling_pos as shown below:
WITH entity_cte (lvl, id, path) as)
SELECT 1 AS lvl, id, ' / '. name | ' (0' | sibling_pos |) ')' IN the path
OF the entity
WHERE parent IS NULL
UNION () ALL THE
SELECT lvl + 1 lvl, e.id, entity_cte.path | '/' || e.Name | ' (': cast (e.sibling_pos AS VARCHAR2 (2)) |) ')' IN the path
Of entity_cte, e entity
WHERE entity_cte.id = e.parent
)
)
SELECT lvl, id, path
Of e entity_cte
;
After the insertion of certain values, I get the error ORA-01489, the result of concatenating string is too long. The maximum is called as 4,000 characters for VARCHAR2 in the oracle documentation and various Web sites. Of course, it is clear to me just by using the common table like that expression, I could run in such an error. However, because of the structure of XML documents, I doubted that channels resulting would be since a long time more than 4000 characters.
So I reorganized my query to count the characters to concatenate instead of actually concatenate. The query is listed below, that the changes are marked in "BOLD":
WITH entity_cte (lvl, id, path) as)
SELECT 1 lvl, id, length ('/ ' | name |) ' (0' | sibling_pos |) ') IN the path
OF the entity
WHERE parent IS NULL
UNION () ALL THE
SELECT lvl 1 lvl, e.id, AS entity_cte.path + length ('/ ' | e.name |) ' (': cast (e.sibling_pos AS VARCHAR2 (2)) |) ') IN the path
Of entity_cte, e entity
WHERE entity_cte.id = e.parent
)
)
SELECT lvl, id, path
Of e entity_cte
Way to ORDER BY DESC
;
The result of the query gives me a maximum length of 319 characters.
To be sure, I also checked the maximum level (indicated by the column named lvl in the common table expression), which means that the maximum number of items in my way (the concatenated string). The result is 18. As I use VARCHAR2 (100) for the name column and add 5 charcaters in each level, the maximum number of characters expected to 18 levels would be 1890.
So, now I wonder is the ORA-01489 may have triggered another reason? Or is there something else I'm missing?
Any help would be appreciated. Other suggestions to track down the error are more than welcome. Thanks in advance.I found by trial and error that launch the query anchor seems to work, but I don't know why, then you can try this.
with entity_cte (lvl, id, path) as ( select 1 lvl, id, cast('/' || name || '(0' || sibling_pos || ')' as varchar2(4000)) path from entity where parent is null union all select lvl + 1 lvl, e.id, entity_cte.path || '/' || e.name || '(' || cast(e.sibling_pos as varchar2(2)) || ')' path from entity_cte, entity e where entity_cte.id = e.parent ) select lvl, id, path from entity_cte e ;
Not tested since no table definitions or examples of data provided.
-
I sent this way new emails (not responses): click on address book. Place comes the space to insert a name. I do, find the name (among some close to it), select it and then click on "write". The result is an email address, which I proceed to write and send. But since there is one day, when I click on the address book, what appears is a long list of names and email addresses. It fills most of the screen of the iMac. And there is no space to insert a name.
Without doubt, I did something stupid to get there. What have I done? And how I turn the tide?
Thank you.
ArthurThis isn't answering your question on what is wrong.
I think that the address book is a pretty lame place to start.
Click on write or reply or forward and window of writing messages appears. pre-populated with the text of the previous message if it is a reply or forward.
If you select the To: box and start typing, it will feature names in the address book corresponding to what you typed.
If you really prefer to choose from a list, you can open a Contacts Sidebar which lists one of your address books. There are buttons to add Contacts selected to your message. You can drag and drop and use right click too. On a PC, F9 opens this sidebar, or you can use alt + v to get the view menu and choose the Contacts Sidebar in the submenu. I don't know how much it works on Mac.
It is so easy to add multiple addresses. You can set them as Cc or BCC.
Your method allows you to send a new message, but does not support the answer or transfer. It penetrates into all recipients regarding: and you have to change one by one, if that is not appropriate.
You see why I think that the address book is a bad place to start from?
If this alternative approach does not work then I suggest that corrupted address book. You have a recent backup to restore from?
-
Select the string table drop-down list box.
Hi all
I want to select the combo box list based on a string in the entry, I don't know how to do this. I have a drop-down list box and the value comes from a database, what I want to do is I want to change the value of the selected box based on the existing value in the database drop-down list. for example, A, B, C D I strings in the drop-down list box, and then in my database, I have a field with the string C, I want to change the C to A. I can't enter the value of C in a string format, but I don't know how to be the first position of the drop-down list box in so the order of channels combo box will be C, A, B, d., the value of C
Thank you
Then just write a new array of strings, with the elements of the new agenda, to the "[] strings" - property.
Either you must code something that allows you to create an array of strings with the elements in the order that you want them to be. If there is a reorganization only, you could do something like:
-Get the array of strings [] from the drop-down list using a property node box.
-Find the position of the element you want to place first and use "delete from table", which returns the new array and the element removed.
-Build a new table 1 d of the deleted item and table remaining. Move to the second combobox Strings [] property of a node property.
-
I'm having a problem with Windows Mail. I have Vista. When I want to create an email and find people to send to, then click on the "to:" I do not receive my contacts with folders list, I have just the button get a long list of all the contacts in my contact list and no folder where to choose from... and MANY of them are repeated 2 or 3 times. It takes me forever to browse all of the names to find the little that I could transmit or write. I tried to delete properties, but they simply duplicate himself instead of delete. Since the contacts button, it's how I organized them... but there is no contact on the "create mail" window button click to access my files organized. Can anyone help?
original title: problem with Windows MailHello
I suggest that you check the troubleshooting provided by S of Halima steps and check if they help to resolve the issue.
-
Aspire 5741z-5433 stops down whenever I play music from my music list
the cat
My acer aspire 5741z-5433 stops down whenever I play music from my music list. Question is not serious this player I use. All I can do to remedy this problem. I listen to music all the time and just, it started doing this. Plays a song maybe two before his stop. any help would be greatly appreciated. Thank you.
It would be the result if you wouldn't touch the keyboard or mouse while playing music and you had the PC in PowerSaver feeding plan. The PC stop after the interval specified in your diet plan.
Is this the case?
The simplest solution is to use the management of the diet instead.
I sometimes use PowerSaver while playing music so that it goes to sleep after the music is over. So that it can stay on for as long as the music is playing, I had to change the power plan PowerSaver using the powercfg.exe utility.
-
When I try to perform the following PROCEDURE, he throws me an error:
Error from line: 2 in command.
BEGIN
FACT_UPDATE;
END;
Error report-
ORA-01489: result of concatenating string is too long
ORA-06512: at "AFLOBIDW. FACT_UPDATE', line 22
ORA-06512: at line 2
01489 00000 - "result of concatenating string is too long."
* Cause: Result of concatenation of string exceeds the maximum size.
* Action: Make sure that the result is less than the maximum size.
---------------------------------------------------------------------------
I can't change the logic of the code since I'm trying to do Informatica at the back done and compare performance between Informatica and Oracle DB. Is there another solution for errors? I add only the SQL query that is part of the PROCEDURE for easy viewing. Please help me. Thank you!
SELECT "UPDATE XXAFL_MON_FACTS_F SET TASK_WID ='"
|| NVL (TO_CHAR (TASK_WID), 'NULL')
|', EXECUTION_PLAN_WID ='
|| NVL (TO_CHAR (EXECUTION_PLAN_WID), 'NULL')
|| ', DETAILS_WID ='
|| NVL (TO_CHAR (DETAILS_WID), 'NULL')
|', SOURCE_WID ='
|| NVL (TO_CHAR (SOURCE_WID), 'NULL')
|', TARGET_WID = '
|| NVL (TO_CHAR (TARGET_WID), 'NULL')
|| ', RUN_STATUS_WID ='
|| NVL (TO_CHAR (RUN_STATUS_WID), 'NULL')
|', SEQ_NUM ='
|| NVL (TO_CHAR (SEQ_NUM), 'NULL')
|', NAME = "'
|| NVL (TO_CHAR (NAME), 'NULL')
|| ' ', NO_POSITION = "'
|| NVL (TO_CHAR (INSTANCE_NUM), 'NULL')
||'' ', INSTANCE_NAME = "'
|| NVL (TO_CHAR (INSTANCE_NAME), 'NULL')
|| ' ', TYPE_CD = "'
|| NVL (TO_CHAR (TYPE_CD), 'NULL')
||'' ', STATUS_CD = "'
|| NVL (TO_CHAR (STATUS_CD), 'NULL')
||'' ', START_TS ='
|| DECODE (START_TS, ",' to_date(''e))
|| To_char (START_TS, "mm/dd/yyyy hh)
||'' ((', "dd/mm/yyyy hh")')
|| ', END_TS ='
|| DECODE (END_TS, ",' to_date(''e))
|| To_char (END_TS, "mm/dd/yyyy hh)
||'' ((', "dd/mm/yyyy hh")')
|', DURATION = '
|| NVL (TO_CHAR (DURATION), 'NULL')
|', STATUS_DESC = "'
|| NVL (TO_CHAR (STATUS_DESC), 'NULL')
|| ' ', DBCONN_NAME = "'
|| NVL (TO_CHAR (DBCONN_NAME), 'NULL')
||'' ', SUCESS_ROWS ='
|| NVL (TO_CHAR (SUCESS_ROWS), 'NULL')
|| ', FAILED_ROWS ='
|| NVL (TO_CHAR (FAILED_ROWS), 'NULL')
|', ERROR_CODE = '
|| NVL (TO_CHAR (ERROR_CODE), 'NULL')
|', NUM_RETRIES ='
|| NVL (TO_CHAR (NUM_RETRIES), 'NULL')
|| ', READ_THRUPUT ='
|| NVL (TO_CHAR (READ_THRUPUT), 'NULL')
|', LAST_UPD = '
|| DECODE (LAST_UPD, ",' to_date(''e))
|| To_char (LAST_UPD, "mm/dd/yyyy hh)
||'' ((', "dd/mm/yyyy hh")')
|', RUN_STEP_WID = "'
|| NVL (TO_CHAR (RUN_STEP_WID), 'NULL')
|| ' ', W_INSERT_DT = '
|| DECODE (W_INSERT_DT, ",' to_date(''e))
|| To_char (W_INSERT_DT, "mm/dd/yyyy hh)
||'' ((', "dd/mm/yyyy hh")')
|', W_UPDATE_DT = '
|| DECODE (W_UPDATE_DT, ",' to_date(''e))
|| To_char (W_UPDATE_DT, "mm/dd/yyyy hh)
||'' ((', "dd/mm/yyyy hh")')
|| ', START_DATE_WID ='
|| NVL (TO_CHAR (START_DATE_WID), 'NULL')
|', END_DATE_WID = '
|| NVL (TO_CHAR (END_DATE_WID), 'NULL')
|', START_TIME ='
|| NVL (TO_CHAR (START_TIME), 'NULL')
|', END_TIME ='
|| NVL (TO_CHAR (END_TIME), 'NULL')
||' WHERE INTEGRATION_ID = "'
|| INTEGRATION_ID
||''';' AS Column
OF XXAFL_MON_FACTS_F;
Hello
ORA-01489 is one of these error messages that really means what he says. The error message you posted pretty much sums up the situation.
What version of Oracle are you using? (You must still include this whenever you have a question. See the FAQ forum: Re: 2. How can I ask a question on the forums? )
From 12.1 of the Oracle, there is an option to allow VARCHAR2s in SQL to be as big as 32767octets. (The default is 4000).
Otherwise, if you can't change the code, either do not run. or ensure that the concerned channels are quite short so the error does not occur.
-
I have This Oracle 12c Procedure
CREATE OR REPLACE PROCEDURE LOGINCHECK(stmt IN CLOB)
AS
C INTEGER;
N INTEGER;
RC SYS_REFCURSOR;
BEGIN
C := SYS.DBMS_SQL.OPEN_CURSOR;
SYS.DBMS_SQL.PARSE(C,stmt,DBMS_SQL.native);
N := SYS.DBMS_SQL.EXECUTE(C);
SYS.DBMS_SQL.GET_NEXT_RESULT(C,RC);
SYS.DBMS_SQL.RETURN_RESULT(RC);
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
when OTHERS then
RAISE;
END LOGINCHECK;for example, to create an oracle with a xml or clob type IN FastInventory procedure and pass xml from this link https://drive.google.com/file/d/0BwAVQqYmX0-zQ1d1VnNmZndfcVE/view?usp=sharing
The of the stmt parameter is approximately 50000 characters.
DBMS_SQL. ANALYSIS gives error PLS-00172: string literal too long.
I'm passing stmt My .net code as parameter . OracleDbType.Clob then why this error occurring.
I use Oracle 12 c database. Visual Studio 2012, .net Framework 4;
OK now I have a response team of oracle.net where it says on tweeter
@OracleDOTNET team .NET oracle
Seems to be a bug specific to PL/SQL, because the error occurs on the DBMS_SQL. ANALYZE the call
Thank you all who have helped and at least tried to solve this problem.
-
Literal string is too long and too small string buffer
Hello
Can someone please explain what the difference is between these two errors.
The maximum size of the character in SQL is 4000 and PL/SQL its 32 k. So if a string literal exceeds this limit "string literal too long" error message is triggered by oracle.
Here is an example
SQL> select 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxx 27 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 28 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 29 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 30 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 31 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' str 32 from dual; select 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx * ERROR at line 1: ORA-01704: string literal too long
Now, when you try to set a string variable with a value greater than the defined size, you get "too small character string buffer.
Here is an example
SQL> declare 2 var varchar2(1); 3 begin 4 var := 'aa'; 5 end; 6 / declare * ERROR at line 1: ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at line 4
Oracle error message there two of each, one for SQL and one for PL/SQL.
ORA-19011: character string buffer too small
Cause : the result of the chain asked is too big to go back
Action : get the result like a lob instead
ORA-01704: string literal too long
Cause : the string literal is longer than 4000 characters.
Action : use a string literal of more than 4,000 characters. Longer values can only be entered using bind variables.
PLS-01905: character string buffer too small
Cause : an error occurred while moving a string from a source to a destination. This error occurs if, for example, an attempt is made to move an a string of 10 characters into a buffer of 1 character. The cause of this error may not always be obvious. For example, the following will cause this error: a varchar2 (1); b the number; b: = 10; a: = b; An error occurs because an implicit conversion causes the number 10 to become the string '10', which does not fit in memory buffer of characters of 1 assigned to the variable.
Action : first, look for the character string assignment statements where the size of the buffer is incompatible. If there is none found, then consider the case of an implicit conversion shown in the example above.
PLS-00172: string literal too long
Cause : the string literal is longer than 32767octets.
Action : use a string literal of at most 32767octets.
-
Removal of long list of drop-down list items quickly (ss4)
I have LiveCycle Designer ES4. I often have a long list of list items in my items from the drop-down list. I want to know if there is a quick way to remove all the items in the list (field tab). I have one at the time a click and remove one at a time. Is there a faster way?
You can use my macro to create dummy texts.
Just to empty the text field in the Flex dialog box and click OK, to remove all the values in a drop-down list.
LiveCycle blog: Lorem Ipsum Generator Makro / / Lorem Ipsum Generator Macro
-
LISTAGG function: "result of concatenating string is too long."
Hello
I use Oracle SQL developer 3.0.04 version. I tried using the LISTAGG function to group the data.
However, I get the error message,CREATE TABLE FINAL_LOG AS SELECT SESSION_DT, C_IP, CS_USER_AGENT, listagg(WEB_LINK, ' ') WITHIN GROUP(ORDER BY C_IP, CS_USER_AGENT) "WEB_LINKS" FROM webviews GROUP BY C_IP, CS_USER_AGENT, SESSION_DT ORDER BY SESSION_DT
SQL error: ORA-01489: result of concatenating string is too long
Is it possible to go around it, or are there other alternatives?Tim Hall has a page on the various techniques of aggregation of chain that guides you through an example of creating and using a user-defined aggregate.
On AskTom referenced by Tim page, there is an implementation of an aggregation function of string that returns a CLOB that you can use.
If you want to understand what makes the user-defined aggregate function, it may look a bit complex, especially if you have never looked at object types in PL/SQL. You don't need to understand all the details of the implementation if you use just the code, however, you can simply create the function and use it as you would with any other aggregate function.
Justin
-
CLob update fails with PLS-00172: string literal too long
I have a clob column that needs updating with a message about message_id
Description of the table
SQL > desc cl_message1
Name Null? Type
----------------------------------------- -------- ----------------------------
MSG_ID(2) NOT NULL NUMBER (10)
DATA NOT NULL CLOB
UPDATE statement:
CLOB variable data1;
Start
: data1: ='TESTHDR ^ add ^ 200812310374 ^ 15:53:22.0 2012-08-19 ^.
TESTHDR ^ add ^ 200812310374 ^ 5652 ^ C0000029 ^ 15:46:49.0 2012-08-19 ^.
TESTDWN ^ ADD ^ 200812310374 ^ 5652 ^ G ^ 03 ^ 00000999990000722444 ^.
.....
... ----------------------------------------------------------------------------------------- 2376 lines of text-------------------------
TESTDWN ^ ADD ^ 200812310374 ^ 5674 ^ G ^ 10 ^ 00000999990000743289 ^.
TESTEND ^ 5674 ^';
UPDATE cl_message1
SET DATA =: data1
WHERE
msg_id(2) = '989';
END;
/
When I run this statement it fails with
SQL > @test_clob_insert.sql
: data1: ='WAVEHDR ^ add ^ 200812310374 ^ 15:53:22.0 2012-08-19 ^.
*
ERROR on line 2:
ORA-06550: line 2, column 10:
PLS-00172: string literal too long
According to my understanding of a bind variable can store a maximum of clob. Not sure why it is throwing this error. Help, please
Concerning
This column is stored in_row.
SQL > r
1 * select table_name, column_name, owner, in_row from dba_lobs where table_name = 'CL_MESSAGE1 '.
OWNER, TABLE_NAME COLUMN_NAME IN2
------------------------------ ------------------------------ ---------------------------------------- ---
VEERA CL_MESSAGE1 DATA YES
Published by: 953621 on August 19, 2012 22:34
Published by: 953621 on August 19, 2012 23:44953621 wrote:
According to my understanding of a bind variable can store a maximum of clob. Not sure why it is throwing this error. Help, pleaseYes, if the binding variable is declared as a clob, so it can store the maximum size of the CLOB, but this isn't your problem.
Your problem is that you set the clob data using a string literal that is a single quoted string. There is a limit to the size of the string literals, so you will have to accumulate the clob in adding a whole lot string literals instead. -
I have an iMac, but no other Apple product, and given the long list of problems on the pages of the community regarding the update for Sierra, is there an advantage to update me?
You won't see anything, but the problems reported here most of the time. This is a support forum. People without problems, much more numerous than those having problems, but they are not seeking this community to report this fact.
I have updated both my 2014 11 "MBA and my iMac 2011. No real problem. Performance on the iMac has been well below normal after the upgrade, but pretty much a reboot fixed that.
-
The best flexibility might always have the ability to add individual addresses from a group list to any email, so the list can then be cut. Or only the address list in the list group selected as a list of checkboxes (all checked by default) if the user can deselect those who should not be included in the list of email recipients. THX
Maybe you are looking for
-
Former Satellite 3000-514 - problems opening/energy
Hey there! Thank you for the opportunity to get a first support! :) I have an old laptop here, S3000-514, equipped with a pentium III, he looks a bit like the Satellite 1200.I tried to disasseble it with this guide for the 1200 to clean in the first
-
Z40-70 windows 7 (32 bit) Intel VGA driver support downloads page does not work
Hi people, just got a 59436180 Z40 - 70 w / nvidia geforce and installed with windows 7 (32 bit). installing the nvidia vga drivers told me I need to install intel vga driver before installing the nvidia, one card... the problem is that I can't insta
-
Sorensen XEL power is compatible with labview
What Sorensen XEL power compatible with labview? I'm in the automotive field of vehicle dashboard. I want to test and simulate different transient conditions that may generate noise in the pipe I needed of a programmable power supply. Currently I hav
-
DESKJET ALL-IN-ONE 2540: HP DESKJET ALL-IN-ONE 2540
Just installed HP DESKJET 2540 ALL-IN-ONE. Wireless printing for iPad works great, but PC Dell, print quality a part of the printed text only demi-imprime throughout all documents. I tried to clean the cartridges, printer, align the cartridges and
-
Uninstalling an application of the virtual machine
I followed the instructions here: http://docs.BlackBerry.com/en/developers/deliverables/21877/Remove_app_cmd_line_1375416_11.jsp who says to run: blackberry-airpackager -uninstallApp bar_file_name -device IP_address However, when I ran the following,