Queury to change carriage returns

KenshiroUK

Registered User.
Local time
Today, 15:54
Joined
Oct 15, 2012
Messages
160
Query to change carriage returns and breaks to <p> and </p>

Hi all I'm struggling to get this work but I currently I have a database with description. This contains carriage returns so it looks like

Product A

Description A

Description B

Description C

however ebay file exchange will not accept this file. So what I wish to do is add an <p> and </p> tag in a simple select query to it looks like this:

<p>Product A</p> <p>Description A</p> <p>Description B</p> <p>Description C</p>

Is this possible?
 
Just air coded..
Code:
SELECT "<p>" &  Replace(fieldName, vbCrLf, "</p> <p>") & "</p>" As NewEditedField 
FROM tableName;
 
Just air coded..
Code:
SELECT "<p>" &  Replace(fieldName, vbCrLf, "</p> <p>") & "</p>" As NewEditedField 
FROM tableName;

could you translate that into the form of query for example Expr1(example)
 
I just gave you the Query.. Copy it changing the field name and table name to the ones you got and paste it to your SQL view of the Query..

attachment.php
 
I have just tried that and its asking for vbCrLf in a dialogue box.

I just gave you the Query.. Copy it changing the field name and table name to the ones you got and paste it to your SQL view of the Query..

attachment.php
 
Okay try the following Query..
Code:
SELECT "<p>" &  Replace(Replace([COLOR=Blue][B]FieldName[/B][/COLOR],[COLOR=Red][B] Chr(10)[/B][/COLOR], ""), [COLOR=Red][B]Chr(13)[/B][/COLOR], "</p> <p>") & "</p>" As NewEditedField 
FROM [COLOR=Blue][B]tableName[/B][/COLOR];
 

Users who are viewing this thread

Back
Top Bottom