Contacts CSV Input, order of columns?
Hi,
another beginning with Verizon email question...
I tried importing a CSV file exported from Microsoft Live Mail into my Verizon Contacts list.
After the import, all of the names and phone numbers were there in my Verizon contact list, but no email addresses, and I can see the email addresses in the CSV..
I am thinking that the columns in my CSV file do not match what the CSV Importer is expecting.
Anyone know what the order of the first few columns is?
Thanks,
Bryan.
As far as the inputing into the Verizon contacts, it depends on the output format of the CSV file from your other emial account. You can manually add or delete the rows to make it input differently. If you have not already fixed this and still need help, please send me a private message.
Anthony_VZ
**If someones post has helped you, please acknowledge their assistance by clicking the red thumbs up button to give them Kudos. If you are the original poster and any response gave you your answer, please mark the post that had the answer as the solution**
Notice: Content posted by Verizon employees is meant to be informational and does not supersede or change the Verizon Forums User Guidelines or Terms or Service, or your Customer Agreement Terms and Conditions or plan
Similar Messages
-
Csv input adapter - read rows with different # of columns
I have a csv file which includes rows with different number of columns. I want to read all the rows( of different # of cols) into ONE stream only and then split into separate streams afterwards.
I saw that CSV File Input Adapter does not add missing columns with nulls by default. Is it possible somehow? How can I generate a workaround?
Thanks.Hello,
The CSV Input Adapter expects to find a fixed number of fields. If you attach the input adapter to a stream/window with 3 fields, it will always try to read three fields. You can have missing data and this will be read into a column as a NULL value but the delimiters must still be there. For example:
1,1,1
2,2,2
3,3,3
4,,4
5,5,5
CREATE INPUT WINDOW inWindow SCHEMA (c1 integer, c2 integer, c3 integer) PRIMARY KEY (c1);
ATTACH INPUT ADAPTER File_Hadoop_CSV_Input2 TYPE toolkit_file_csv_input TO inWindow PROPERTIES csvExpectStreamNameOpcode = FALSE ,
dir = 'c:/temp' ,
file = 'test.csv' ,
csvDelimiter = ',' ;
A workaround you might consider is reading an entire line from your file into a stream with a single string column. The trick is that you have to choose a character for the column delimiter that you are certain will never show up in your data. Than once you have read that line into a stream, you can use the string functions to parse out the columns as needed:
CREATE INPUT STREAM csv_instream SCHEMA (
log_line_message string
// Choose a character that is certain to never show up in the data in order to read the entire line
// from the CSV file into a single column
ATTACH INPUT ADAPTER File_Hadoop_CSV_Input1 TYPE toolkit_file_csv_input TO csv_instream PROPERTIES
csvExpectStreamNameOpcode = FALSE ,
dir = 'C:/temp' ,
file = 'error_log' ,
csvDelimiter = '@' ;
// Parse out the individual columns
CREATE OUTPUT STREAM csv_outstream SCHEMA (
log_datetime timestamp ,
debug_level string ,
host string ,
message string ) AS SELECT
to_timestamp(substr(CI.log_line_message, 1, 24), 'DY MON DD HH24:MI:SS YYYY') as log_datetime,
substr(CI.log_line_message, patindex(CI.log_line_message, '[', 2)+1, (patindex(CI.log_line_message, ']', 2) - patindex(CI.log_line_message, '[', 2))-1) AS debug_level,
replace(substr(CI.log_line_message, patindex(CI.log_line_message, '[', 3)+1, (patindex(CI.log_line_message, ']', 3) - patindex(CI.log_line_message, '[', 3))-1), 'client ', '') AS host,
substr(CI.log_line_message, patindex(CI.log_line_message, ']', 3)+1, 500) AS message
FROM csv_instream CI
WHERE CI.log_line_message IS NOT NULL;
Thanks,
Neal -
Order by column has index which results in full table scan
I have a query on table A which has index for column B.In the query i am using order by column B .In explain plan it shows that the full table scan is performed for table A without picking up the index for B .How can i ensure that index is picked up in the explain plan.Please help its urgent.
PanduPlease help its urgent.Contact Oracle Support in that case.
By making that remark you have just made Blushadow go out to lunch (again) now.... ;)
Depending on your query a full scan could be 100% appropriate here.
But since you didn't post your DB_version, optimizer settings, execution plan etc. there's not much more to say, really, besides:
"Full scans aren't always evil".
See:
[When your query takes too long...|http://forums.oracle.com/forums/thread.jspa?messageID=3299435]
[How to post a SQLstatement Tuning Request|http://forums.oracle.com/forums/thread.jspa?threadID=863295&tstart=0] -
I am unable to get order by column name in oracle report parameter form
i created query like following in query builder
SELECT CASE_NO, COURT_ID, CASE_TYPE,
INITCAP(PLAINTIFF) PLAINTIFF,INITCAP( DEFENDENT) DEFENDENT,
INITCAP(COUNSEL) COUNSEL, START_DATE, PREVIOUS_HEARING_DATE,
NEXT_HEARING_DATE,INITCAP( DESCRIPTION) DESCRIPTION,
INITCAP(RELIEF) RELIEF,INITCAP(EXTENT) EXTENT,
DECREE_DATE,INITCAP(STATUS) STATUS,INITCAP( LOCATION) LOCATION,
LEGAL_FILE_NO, MSNO
FROM L_CASE_MASTER_MAIN
WHERE to_char(NEXT_HEARING_DATE,'DD-MON-YYYY')=:P_NHD ORDER BY :P_COL
and i created parameter form for these two bind variables :P_NHD,:P_COL
in,:P_COL i wrote lov as Select trim(COLUMN_NAME) from user_tab_columns where table_name='L_CASE_MASTER_MAIN' to get all the columns.
in parameter form i am able to get all the columns but when i am generating report it is not giving results as per my ordered column.
kindly let me know the solution
Report Version :Oracle Reports 11g
Db Version:Oracle 11gHi,
Ordering the column first takes place from the Data Model Itself.
Please Check your column ordering in the report data model. If it is not ordered in a right way then Rearrange it.
Remove your order by in query...
If any issues... let me know
Regards,
Soofi -
Change the order of columns in a report
hi all.
i can't change the order of columns in a report not just by altering the select statement. where can i change it?
thanks.hi master
sir i use 6i report i see full report but i culd not found
report region and report attributes
sir please give me step or idea or tree where report region and report attrinutes"
thanking you
aamir -
How to read/write .CSV file into CLOB column in a table of Oracle 10g
I have a requirement which is nothing but a table has two column
create table emp_data (empid number, report clob)
Here REPORT column is CLOB data type which used to load the data from the .csv file.
The requirement here is
1) How to load data from .CSV file into CLOB column along with empid using DBMS_lob utility
2) How to read report columns which should return all the columns present in the .CSV file (dynamically because every csv file may have different number of columns) along with the primariy key empid).
eg: empid report_field1 report_field2
1 x y
Any help would be appreciated.If I understand you right, you want each row in your table to contain an emp_id and the complete text of a multi-record .csv file.
It's not clear how you relate emp_id to the appropriate file to be read. Is the emp_id stored in the csv file?
To read the file, you can use functions from [UTL_FILE|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_file.htm#BABGGEDF] (as long as the file is in a directory accessible to the Oracle server):
declare
lt_report_clob CLOB;
l_max_line_length integer := 1024; -- set as high as the longest line in your file
l_infile UTL_FILE.file_type;
l_buffer varchar2(1024);
l_emp_id report_table.emp_id%type := 123; -- not clear where emp_id comes from
l_filename varchar2(200) := 'my_file_name.csv'; -- get this from somewhere
begin
-- open the file; we assume an Oracle directory has already been created
l_infile := utl_file.fopen('CSV_DIRECTORY', l_filename, 'r', l_max_line_length);
-- initialise the empty clob
dbms_lob.createtemporary(lt_report_clob, TRUE, DBMS_LOB.session);
loop
begin
utl_file.get_line(l_infile, l_buffer);
dbms_lob.append(lt_report_clob, l_buffer);
exception
when no_data_found then
exit;
end;
end loop;
insert into report_table (emp_id, report)
values (l_emp_id, lt_report_clob);
-- free the temporary lob
dbms_lob.freetemporary(lt_report_clob);
-- close the file
UTL_FILE.fclose(l_infile);
end;This simple line-by-line approach is easy to understand, and gives you an opportunity (if you want) to take each line in the file and transform it (for example, you could transform it into a nested table, or into XML). However it can be rather slow if there are many records in the csv file - the lob_append operation is not particularly efficient. I was able to improve the efficiency by caching the lines in a VARCHAR2 up to a maximum cache size, and only then appending to the LOB - see [three posts on my blog|http://preferisco.blogspot.com/search/label/lob].
There is at least one other possibility:
- you could use [DBMS_LOB.loadclobfromfile|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#i998978]. I've not tried this before myself, but I think the procedure is described [here in the 9i docs|http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96591/adl12bfl.htm#879711]. This is likely to be faster than UTL_FILE (because it is all happening in the underlying DBMS_LOB package, possibly in a native way).
That's all for now. I haven't yet answered your question on how to report data back out of the CLOB. I would like to know how you associate employees with files; what happens if there is > 1 file per employee, etc.
HTH
Regards Nigel
Edited by: nthomas on Mar 2, 2009 11:22 AM - don't forget to fclose the file... -
Download int table into csv file with each column in separate column in csv
Hi All,
I want to download the data in internal table to CSV file. but each column in the table should come as separate column in csv format.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = GD_FILE
FILETYPE = 'ASC'
WRITE_FIELD_SEPARATOR = 'X'
tables
DATA_TAB = I_LINES_NEW
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17.
IF SY-SUBRC NE 0.
WRITE: 'Error ', SY-SUBRC, 'returned from GUI_DOWNLOAD SAP OUTBOUND'.
SKIP.
ENDIF.
with the above values passd , I am getting csv file but all the columns in one column separated by some square symbol.
How to separate them into different columns.
Thanks in advance
rgds,
MadhuriBelow example might help you understand on dowloading CSV file:
TYPE-POOLS: truxs.
DATA: i_t001 TYPE STANDARD TABLE OF t001,
i_data TYPE truxs_t_text_data.
SELECT * FROM t001 INTO TABLE i_t001 UP TO 20 ROWS.
CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'
EXPORTING
i_field_seperator = ','
* I_LINE_HEADER =
* I_FILENAME =
* I_APPL_KEEP = ' '
TABLES
i_tab_sap_data = i_t001
CHANGING
i_tab_converted_data = i_data
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
DATA: file TYPE string VALUE 'C:\testing.csv'.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = file
CHANGING
data_tab = i_data[]
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
not_supported_by_gui = 22
error_no_gui = 23
OTHERS = 24.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Regards
Eswar -
In Lion 10.7.5 when viewing files/folders in column view, if I select arrange by name it does not sort the names alphabetically. Is this a bug or is there a way to view files in alphabetical order in column view?
I've been using Column View for years and have it set to None:
It has always shown in alphabetical order automatically. -
How do I change the order of columns in the responses table?
How do i change the order of columns in the responses table in FormsCentral? The default setting puts them in reverse order!
Hi,
The issue with the default ordering of columns in the response table is something that we hope to address in the next update to FormsCentral. In the meantime, you can reorder the columns by selecting them then click/drag using the gray area above the column name. As shown below, an orange marker will show you where the columns will be placed when you release the mouse button.
Sorry for the inconvenience.
Regards,
Brian -
Dynamic ordering ambiguous column issue
I'm working on a stored procedure that will accept a column name from a web application. The stored procedure will use the @SortColumn to sort the results of the query. I'm receiving ambiguous column errors when the column values are passed in
to the query. The original query is written using dynamic sql but I created a simple query to reproduce the issue. Can someone review the sample below and let me know if there is a way to resolve the error.
In the example below, the Over(Order by Emp_ID) section is causing the error. The order by is expecting e.Emp_ID as the order by value. Is there anyway for me to rewrite the logic to allow the correct column alias to be using in the order by statement?
Ultimately, I would like to pass in a paramter for the order by column. Ex. Over(Order by ' + @SortColunm + '
SELECT RowNum
,Emp_ID
,First_Name
,Last_Name
From (Select Distinct ROW_NUMBER() OVER(Order by Emp_ID) as RowNum,
e.Emp_ID as Emp_ID
,e.First_Name as First_Name
,e.Last_Name as Last_Name
FROM Employee e
LEFT OUTER JOIN Team t ON e.team_id = t.team_Id AND e.Emp_id = t.Emp_Id
LEFT OUTER JOIN AccrualType at ON e.Accrual_Type = at.Type
LEFT OUTER JOIN ClosingProcess cp ON e.Emp_id = cp.Emp_ID
where Last_Name like 's%'
) As Employees
order by Emp_IDI've updated my query to use a cte and also included the Row_Number logic. I'm now receiving "Invalid column name 'RowNum". Can anyone explain what I'm doing wrong in the code below? I'm trying to create a stored procedure
that accepts a parameter to handle paging and sorting. The dynamic sql is needed for the SortExpression.
declare @SortExpression varchar(50) = 'Last_Name';
declare @DynSql varchar(max)='';
declare @Emp_ID NVARCHAR(50) = NULL
declare @First_Name VARCHAR(50) = NULL
declare @Last_Name VARCHAR(50) = 's'
declare @StartIndex INT
declare @MaximumRows INT
set @DynSql=
With Employees as
( Select Distinct
e.Emp_ID as Emp_ID
,First_Name
,Last_Name
FROM Employee e
LEFT OUTER JOIN Team t ON e.team_id = t.team_Id AND e.Emp_id = t.Emp_Id
LEFT OUTER JOIN AccrualType at ON e.Accrual_Type = at.Type
LEFT OUTER JOIN ClosingProcess cp ON e.Emp_id = cp.Emp_ID
SELECT ROW_NUMBER() Over (Order By ' + @SortExpression + ') As RowNum,
Emp_ID
,First_Name
,Last_Name
FROM Employees
WHERE RowNum BETWEEN ' + CAST(@StartIndex as varchar(10)) + ' AND ' + '(' + CAST(@StartIndex as varchar(10))+ CAST(@MaximumRows as varchar(10))+ ') - 1 '
If @Emp_ID is not null
Set @DynSql = @DynSql + ' And (Emp_ID = @Emp_ID)'
If @First_Name is not null
Set @DynSql = @DynSql + ' And (First_Name = @First_Name)'
If @Last_Name is not null
Set @DynSql = @DynSql + ' And (Last_Name = @Last_Name)'
exec (@DynSql) -
File/Hadoop CSV input : Discovery of file fails
Hello ,
I'm trying to make the project as described in -
"Hands-on Tutorial: Building a Simple SAP Sybase ESP Project" for SAP Sybase ESP version 5.1 SP04.
I create a project where I add an input adapter of type - File/Hadoop CSV input.
Then in edit properties I enter the directory and the file name . In advanced tab I also set Has Header = TRUE.
Then I click on Schema Discovery and this raises error - "Failed to parse discovery file : parse of file failed ".
I've imported the sample "towermon "project from SCN and this shows the same error !
I've done this before on SP02 and it used to work . Of course the File/Hadoop CSV input adapter did not exist in that release.
Can't quiet figure out what I'm doing wrong . Is this a bug in the software ?Any ideas how to fix this ?
Best regards,
SatyHello,
Two things to check:
1) I don't know which file you are using from the "towermon" project. One of the CSV files (input-streams.csv) prepends the stream name and opcode:
isSensorStream,i,2011-06-30T17:00:00.000,32.835,-114.188,Tower,Yuma T70,1,104,0
The other CSV files do not. So you will have to toggle the "csvExpectStreamNameOpcode" parameter to true/false (the default is true).
2) There is a bug in the adapter discovery mechanism where it will return the error Failed to parse discovery file : parse of file failed ":
749503 - Schema discovery does not work for toolkit adapters when unnecessary properties are listed on the adapter.
So for example, in text authoring mode, if you have this:
ATTACH INPUT ADAPTER File_Hadoop_CSV_Input1 TYPE toolkit_file_csv_input PROPERTIES
csvExpectStreamNameOpcode = TRUE ,
dir = 'c:/temp' ,
file = 'input-streams.csv' ,
dynamicMode = '' ,
removeAfterProcess = FALSE ,
csvDelimiter = '' ,
csvDateFormat = '' ,
csvTimestampFormat = '' ,
csvHasHeader = FALSE ,
pollingPeriod = 0 ,
scanDepth = 0 ;
You have to delete the unnecessary properties:
ATTACH INPUT ADAPTER File_Hadoop_CSV_Input1 TYPE toolkit_file_csv_input PROPERTIES
csvExpectStreamNameOpcode = TRUE ,
dir = 'c:/temp' ,
file = 'input-streams.csv' ;
Then switch back to visual authoring mode and try discovery again.
Hope this helps.
Thanks,
Neal -
Is there any performance difference in the order of columns referencing index?
I wish to find out if there is any performance difference or efficiency in specifying those columns referencing index(es) first in the WHERE clause of SQL statements. That is, whether the order of columns referencing the index is important???.
E.g. id is the column that is indexed
SELECT * FROM a where a.id='1' and a.name='John';
SELECT * FROM a where a.name='John' and a.id='1';
Is there any differences in terms of efficiency of the 2 statements??
Please advise. Thanks.There is no difference between the two statements under either the RBO or the CBO.
sql>create table a as select * from all_objects;
Table created.
sql>create index a_index on a(object_id);
Index created.
sql>analyze table a compute statistics;
Table analyzed.
sql>select count(*)
2 from a
3 where object_id = 1
4 and object_name = 'x';
COUNT(*)
0
1 row selected.
Execution Plan
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1 Card=1 Bytes=29)
1 0 SORT (AGGREGATE)
2 1 TABLE ACCESS (BY INDEX ROWID) OF 'A' (Cost=1 Card=1 Bytes=29)
3 2 INDEX (RANGE SCAN) OF 'A_INDEX' (NON-UNIQUE) (Cost=1 Card=1)
sql>select count(*)
2 from a
3 where object_name = 'x'
4 and object_id = 1;
COUNT(*)
0
1 row selected.
Execution Plan
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1 Card=1 Bytes=29)
1 0 SORT (AGGREGATE)
2 1 TABLE ACCESS (BY INDEX ROWID) OF 'A' (Cost=1 Card=1 Bytes=29)
3 2 INDEX (RANGE SCAN) OF 'A_INDEX' (NON-UNIQUE) (Cost=1 Card=1) -
Hi all, I have a pair of statements connected by a UNION, where I need to sort the final result according to columns not appearing in any column list:
SELECT REF(d) FROM DOCUMENT_TABLE d
WHERE d.header$.parentKey = ?
UNION
SELECT REF(d) FROM DOCUMENT_TABLE d, CROSS_TABLE k
WHERE k.doc = d.key$ AND k.folder = ?
ORDER BY d.header$.name
this fails saying that d.header$.name is an invalid identifier (ORA-904), like being out of scope.
Both union branches succeed when run alone (select + order by).
How can I sort by colums without having them to be returned ?
In all examples I found columns are also retrieved and referenced by either alias or by position.
Thanks.Hi,
In a UNION query, you can only ORDER BY columns in the SELECT clause.
You can do the UNION in a sub-query, then do the ORDER BY in the main query, where you can ORDER BY anything:
WITH union_results AS
SELECT REF (d) AS ref_d
, name
FROM DOCUMENT_TABLE d
WHERE d.header$.parentKey = ?
UNION
SELECT REF (d) AS ref_d
, name
FROM DOCUMENT_TABLE d
, CROSS_TABLE k
WHERE k.doc = d.key$
AND k.folder = ?
SELECT REF_D
FROM union_results
ORDER BY name
;Your front end may be able to hide specified columns, so you could do this without a sub-query.
For example, in SQL*Plus you can say:
COLUMN name NOPRINT
SELECT REF (d) AS ref_d
, name
FROM DOCUMENT_TABLE d
WHERE d.header$.parentKey = ?
UNION
SELECT REF (d) AS ref_d
, name
FROM DOCUMENT_TABLE d
, CROSS_TABLE k
WHERE k.doc = d.key$
AND k.folder = ?
ORDER BY name
;The result set actually contains two columns, but SQL*Plus will only display one. -
Finder - changing sort order in column view
Anyone know a way to change the sort order when using the COLUMN view in Finder? It's defaulting to alpha and I'd like to change it so when I'm viewing a particular folder the contents are displayed by Date Modified like I can when using the other views.
THANKS!Hi VFRJOEY,
there is no way to change the sort order in column-view. This was under discussion since the very first release of MacOS X but never made it into any one of the releases.
If this answered your question please consider granting some stars: Why reward points? -
Since upgrading my 3GS to IOS5, I have lost all my contacts, calendar inputs, and photos. How can I retrieve?
All media should be in iTunes on the computer, simply sync it back.
Maybe you are looking for
-
How do I re-install iTunes and/or clean the registry from past iTunes installation?
I have downloaded iTunes in the past and then removed it with the appropriate Windows Add/Remove Programs feature. Now, several months later, I cannot download iTunes much less install it. Although the website assumes I have it and directs me to a
-
MacBook and MAcBook Pro with ProTools
I have both a MAcBook and and a MAcBook Pro and ProTools runs fine on the Pro, however on the MAcBook ( 2 gig dual with 1 gig ram) the USB bus does not seem to have the power to drive the PRoTools MBOX 2 interface. ANy info on that? I'm surprised tha
-
Sending attachments with email from iPad
Can I send attachments, such as a pages file, when I send an email from my iPad? Thanks for your help
-
i accidentally deleted my iMovie off my mac, anyone know how to get it back because it came for free and is now 15 dollars to buy back??? pls help
-
There is no sync choice in Tools/Options!?
So how do I get a sync choice?