RE: Back Slash \ issue

Поиск
Список
Период
Сортировка
Искать
От
Guntry Vinod
Тема
RE: Back Slash \ issue
Дата
в 16:40:03
Msg-id
c9c8e35d5552487bb4a1a799582cfa97@HYDEXCHMBX003.TechMahindra.com
Ответ на
Re: Back Slash \ issue (Adrian Klaver)
Список
Дерево обсуждения
Back Slash \ issue Guntry Vinod <GV00619735@TechMahindra.com>
Re: Back Slash \ issue Adrian Klaver <adrian.klaver@aklaver.com>
Looping Nikhil and Shiva who are from Mainframe, DB2.

Nikhil/Shiva I am trying explain the problem to the team but there few questions which needs your intervention.

Regards,
Vinod

-----Original Message-----
From: Adrian Klaver  
Sent: Friday, May 3, 2019 9:47 PM
To: Guntry Vinod ; Ravi Krishna ; Michael Nolan 
Cc: pgsql-general@postgresql.org; Venkatamurali Krishna Gottuparthi ; Biswa Ranjan Dash 
Subject: Re: Back Slash \ issue

On 5/3/19 9:05 AM, Guntry Vinod wrote:
> Hi Team,
> 
> Here we go. I will give the problem in more detail
> 
> Step 1:We get the dump from DB2 and this dump is flat file which can 
> be csv,txt Step2:There is table in PostGre where we are suppose  to 
> upload the dump Step3:We are using copy command to upload dump to the 
> table using (COPY <> from 'C:\Data_Dump\ABC.txt' DELIMITER 
> '|';  )

Should have been in my previous post. The answer to whether Step 1 is text or CSV is important as that determines the way you use the COPY command above. As has been pointed out upstream using COPY assuming text(as you are doing above) on a CSV file will create issues.

> Step 4:In the above step we are using delimiter because the data is 
> separated (:) in the flat which we have received from the flat file
> 
> Problem Statement:We are able to upload the data from the flat file which we got from the DB2 but few data the data consist of  " \".For example if the CustomerName is Vinod\G in the flat file ,we expect the same data in PostGre  table for CustomerName as Vinod\G but we see VinodG(slash is missed).
> 
> Possible Solution: We can replace "\" with "\\" but if the file is in 
> too large we cannot open it(we can replace if the file is medium or 
> small)
> 
> Expectation: We need a command or utility which can upload the data as 
> it is (for example if Vinod\G then we should see in PostGre as Vinod\G 
> but not VinodG)
> 
> Hope Iam detail this time :-)
> 
> Regards,
> Vinod
> 
> 
>   
> 



--
Adrian Klaver
adrian.klaver@aklaver.com
============================================================================================================================

Disclaimer:  This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html  externally http://tim.techmahindra.com/tim/disclaimer.html  internally within TechMahindra.

============================================================================================================================
В списке pgsql-general по дате отправления
От: Julie Nishimura
Дата:
Сообщение: Pgadmin III
От: Rob Sargent
Дата:
Сообщение: Re: Back Slash \ issue
FAQ