nls_read_delimited() - invalid quotes
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 353
- Joined: Wed Apr 06, 2005 8:45 am
nls_read_delimited() - invalid quotes
Hi,
How do I take out " in incomming data , as I am writing a flat file and then loading into a DB .
It gives me a error:
nls_read_delimited() - invalid quotes
How do I take out " in incomming data , as I am writing a flat file and then loading into a DB .
It gives me a error:
nls_read_delimited() - invalid quotes
-
- Participant
- Posts: 232
- Joined: Sat May 07, 2005 2:49 pm
- Location: USA
Hi Vinay,
Your question is not clear. I am suggesting three solutions based on different interpretations of your problem.
1) If you meant that your source file is having quotes and you want to read it
- In format tab in the sequential file, make sure you put the quote character field to " and appropriate value for the delimeter field. Then you will be able to read the file properly.
2) If you meant that while writing your output to a sequential file, you have " appearing in your data
- Similar to the above solution, you need to make sure in the format tab of your output sequential file that you put the quote character as 000 or 009 depending on your requirement.
3) If you mean that you have " characters in some of the data in the columns.
- You can use functions like ereplace,replace,convert etc to replace the " character with space
Thanks,
Naveen
Your question is not clear. I am suggesting three solutions based on different interpretations of your problem.
1) If you meant that your source file is having quotes and you want to read it
- In format tab in the sequential file, make sure you put the quote character field to " and appropriate value for the delimeter field. Then you will be able to read the file properly.
2) If you meant that while writing your output to a sequential file, you have " appearing in your data
- Similar to the above solution, you need to make sure in the format tab of your output sequential file that you put the quote character as 000 or 009 depending on your requirement.
3) If you mean that you have " characters in some of the data in the columns.
- You can use functions like ereplace,replace,convert etc to replace the " character with space
Thanks,
Naveen
-
- Premium Member
- Posts: 353
- Joined: Wed Apr 06, 2005 8:45 am
-
- Participant
- Posts: 232
- Joined: Sat May 07, 2005 2:49 pm
- Location: USA
Hi Vinay,
You can use the Exchange function that accepts hex characters as the string to replace, string to be replaced
where 22 is the Hex equivalent of " and 20 is the Hex equivalent of space
Make sure you replace INPUTLINK.COLA with the appropriate values.
Try it and let me know whether it works for ya.
Thanks,
Naveen
You can use the Exchange function that accepts hex characters as the string to replace, string to be replaced
Code: Select all
Exchange(INPUTLINK.COLA,"22","20")
Make sure you replace INPUTLINK.COLA with the appropriate values.
Try it and let me know whether it works for ya.
Thanks,
Naveen
-
- Premium Member
- Posts: 353
- Joined: Wed Apr 06, 2005 8:45 am
-
- Participant
- Posts: 232
- Joined: Sat May 07, 2005 2:49 pm
- Location: USA
-
- Premium Member
- Posts: 353
- Joined: Wed Apr 06, 2005 8:45 am
-
- Premium Member
- Posts: 353
- Joined: Wed Apr 06, 2005 8:45 am
-
- Participant
- Posts: 232
- Joined: Sat May 07, 2005 2:49 pm
- Location: USA
Hi Vinay,
1) If your question meant "Will it work if I want to replace ' quote with space?"
- No it will not work as the hex code for ' is different from " . Therefore you need to change your Exchange function to
Hex code for ' is 27
If that was not your question, please clarify it and I will be able to answer it.
Thanks,
Naveen
Your question is ambiguous.vinaymanchinila wrote:Hey ,
I am also using quote ' instead of " for the both the flat files , will it be a problem .
1) If your question meant "Will it work if I want to replace ' quote with space?"
- No it will not work as the hex code for ' is different from " . Therefore you need to change your Exchange function to
Code: Select all
Exchange("ABABC", "27", "20")
If that was not your question, please clarify it and I will be able to answer it.
Thanks,
Naveen
-
- Premium Member
- Posts: 353
- Joined: Wed Apr 06, 2005 8:45 am
-
- Participant
- Posts: 232
- Joined: Sat May 07, 2005 2:49 pm
- Location: USA
-
- Premium Member
- Posts: 353
- Joined: Wed Apr 06, 2005 8:45 am
-
- Participant
- Posts: 232
- Joined: Sat May 07, 2005 2:49 pm
- Location: USA