1. Christian Breu
  2. Valentina Server
  3. 月, 7月 08 2019, 06:04 PM
  4.  メールで購読
I am not sure anymore. I thought to import records from a text file I can do anything like...
SELECT table.column AS textfilecolumn to map the columns of my textfile to the columns of my table.
But seems I missunderstood anything.

How is it officially – possible or not?
コメント
There are no comments made yet.
Christian Breu 承諾済みの回答
sorry, I mean a great feature request...
コメント
There are no comments made yet.
Christian Breu 承諾済みの回答
Thank you for your answer Ivan.
Would it not be a great o have a column mapping by headers of the import file and get position-independent??!!
コメント
There are no comments made yet.
Ivan Smahin 承諾済みの回答
If you are about of import-file columns mapping to the table's columns you should do something like this one -
make the cursor (over target table) with the column order matched to the import-file's one.

Example:
CREATE TABLE t1 ( f1 LONG, f2 STRING );

-- Import file:
"Some_text_data" 1
"Another_string_data" 2
...

-- Cursor:
SELECT f2, f1 FROM t1;

-- Do the import:
cursor.Import(....

If import-file has the header (column names), it makes no changes to your sql-query!
Actually, that header is not used for mapping. In other words, you can ask user "What the table's field is corresponded to the import-file's column number 1?".
But having such header you may ask it in more natural way - "What the table's field is corresponded to the import-file's column column1?". But you know, that "column1" is the first column in the import-file.
コメント
There are no comments made yet.
  • ページ :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories