|
Metho Beginner
Joined: 10 Jul 2005 Posts: 28
|
Posted: Fri Aug 05, 2005 11:58 pm
Adding quotes around fields at time of entry or after |
Ok, I've got my database rolling, and everything is entering in like it should be. When I export comma delimited, everything is fine. Here's one item from that export:
Code: |
857,Stools,Public,wood 5,10,Normal Furnishings,0,0,0,a rickety wooden stool,A rickety wooden stool stands here, awaiting a weary traveller.,Lacking polish or lustre, this aged wooden stool is pieced together from four gold hued legs; upon which a top of darker grained wood has been hammered. Knotted in many places, the quality of wood used in this construction is seemingly of very poor quality. The seat is split in several places, ensuring whoever is sitting atop will find little to no comfort. |
Comma delimited, ended by new line, great. Now, here's my issue, I need the string values to be incased in "quotes". For example, instead of the data being: A rickety wooden stool stands here, awaiting a weary traveller. it would be: "A rickety wooden stool stands here, awaiting a weary traveller." Two reasons I need this:
1. If I export comma delimited, there's comma's in the actual texts, quotes will allow MySQL to ignore these.
2. If I export tab delimited, there are words like OR, LOCK, AND, ect. in the texts, that MySQL will try to interpret if there isn't quotes around it.
So, the big question is, is it possible to put quotes around the capture as it's coming into the database, or an easy way to update all records to have quotes after they're in the database, or am I screwed?
Thanks |
|
|
|
Metho Beginner
Joined: 10 Jul 2005 Posts: 28
|
Posted: Sun Aug 07, 2005 4:41 am |
Anyone have any ways of attacking this problem? I keeping running into walls. If you need more information, I'll be happy to provide it
|
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sun Aug 07, 2005 5:33 am |
A little testing done. This is just skeleton code to give you an example of how to do it just remember to use ~ before the ". It will make a file called dbfile.cvs in your zmud directory.
#ALIAS makecvs {
#FILE 1 dbfile.cvs
#ERASE 1
#PRIO {#LOOPVIEW All {#WRITE 1 ~"&Name~",~"&Rent~",~"&Foul~"}}
#CLOSE 1
} |
|
|
|
Metho Beginner
Joined: 10 Jul 2005 Posts: 28
|
Posted: Tue Aug 09, 2005 11:22 pm |
Wow, you just made that look easy. :o
Thanks a lot! |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|