Skip to main content
Inspiring
August 23, 2007
Question

Can this be formatted?

  • August 23, 2007
  • 8 replies
  • 483 views
I have a column in my SQL Server DB that stores the full address of a
customer. This is stored as a formatted string eg. 'The Croft, 22 Liddle
Lane, LittleTown, Big City, BB5 2AA'.

The problem is that I now need this to display in the HTML as a
conventionally formatted address with carriage returns after every comma,
straight from the recordset ie:

The Croft,
22 Liddle Lane,
LittleTown,
etc.

Is this possible?


This topic has been closed for replies.

8 replies

Inspiring
August 24, 2007
Thanks.


"Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
news:fakdeu$eqc$1@forums.macromedia.com...
> variablename={recordsetvalue}
> variablenameNew=replace(variablename, ',', ',<br>')
>
> variablenameNew will contain the reformatted string.
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
> http://www.dreamweavermx-templates.com - Template Triage!
> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
> ==================
>
>
> "Ian Hughes" <ihughes@nospam.net> wrote in message
> news:fak5n0$5ka$1@forums.macromedia.com...
>> How would I do this with a recordset item? Can you give me a brief
>> example please?
>>
>> Thanks.
>>
>>
>> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
>> news:fak17l$d6$1@forums.macromedia.com...
>>> You could do the same in VBScript, using the replace() function.
>>>
>>> --
>>> Murray --- ICQ 71997575
>>> Adobe Community Expert
>>> (If you *MUST* email me, don't LAUGH when you do so!)
>>> ==================
>>> http://www.dreamweavermx-templates.com - Template Triage!
>>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>>> ==================
>>>
>>>
>>> "Ian Hughes" <ihughes@nospam.net> wrote in message
>>> news:fak0qn$t5j$1@forums.macromedia.com...
>>>> No, this is ASP.........
>>>>
>>>> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
>>>> news:fak00e$sa3$1@forums.macromedia.com...
>>>>> Oops - only if PHP, of course.
>>>>>
>>>>> --
>>>>> Murray --- ICQ 71997575
>>>>> Adobe Community Expert
>>>>> (If you *MUST* email me, don't LAUGH when you do so!)
>>>>> ==================
>>>>> http://www.dreamweavermx-templates.com - Template Triage!
>>>>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>>>>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>>>>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>>>>> ==================
>>>>>
>>>>>
>>>>> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
>>>>> news:fajvvp$s9n$1@forums.macromedia.com...
>>>>>> Sure. Just use strstr() to replace all commas with ",<br>".
>>>>>>
>>>>>> --
>>>>>> Murray --- ICQ 71997575
>>>>>> Adobe Community Expert
>>>>>> (If you *MUST* email me, don't LAUGH when you do so!)
>>>>>> ==================
>>>>>> http://www.dreamweavermx-templates.com - Template Triage!
>>>>>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>>>>>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>>>>>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>>>>>> ==================
>>>>>>
>>>>>>
>>>>>> "orange22" <webforumsuser@macromedia.com> wrote in message
>>>>>> news:fajur8$r0n$1@forums.macromedia.com...
>>>>>>> could you not use pattern matching or a regular expression in the
>>>>>>> serverside language you are using?
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


Inspiring
August 23, 2007
variablename={recordsetvalue}
variablenameNew=replace(variablename, ',', ',<br>')

variablenameNew will contain the reformatted string.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Ian Hughes" <ihughes@nospam.net> wrote in message
news:fak5n0$5ka$1@forums.macromedia.com...
> How would I do this with a recordset item? Can you give me a brief example
> please?
>
> Thanks.
>
>
> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
> news:fak17l$d6$1@forums.macromedia.com...
>> You could do the same in VBScript, using the replace() function.
>>
>> --
>> Murray --- ICQ 71997575
>> Adobe Community Expert
>> (If you *MUST* email me, don't LAUGH when you do so!)
>> ==================
>> http://www.dreamweavermx-templates.com - Template Triage!
>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>> ==================
>>
>>
>> "Ian Hughes" <ihughes@nospam.net> wrote in message
>> news:fak0qn$t5j$1@forums.macromedia.com...
>>> No, this is ASP.........
>>>
>>> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
>>> news:fak00e$sa3$1@forums.macromedia.com...
>>>> Oops - only if PHP, of course.
>>>>
>>>> --
>>>> Murray --- ICQ 71997575
>>>> Adobe Community Expert
>>>> (If you *MUST* email me, don't LAUGH when you do so!)
>>>> ==================
>>>> http://www.dreamweavermx-templates.com - Template Triage!
>>>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>>>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>>>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>>>> ==================
>>>>
>>>>
>>>> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
>>>> news:fajvvp$s9n$1@forums.macromedia.com...
>>>>> Sure. Just use strstr() to replace all commas with ",<br>".
>>>>>
>>>>> --
>>>>> Murray --- ICQ 71997575
>>>>> Adobe Community Expert
>>>>> (If you *MUST* email me, don't LAUGH when you do so!)
>>>>> ==================
>>>>> http://www.dreamweavermx-templates.com - Template Triage!
>>>>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>>>>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>>>>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>>>>> ==================
>>>>>
>>>>>
>>>>> "orange22" <webforumsuser@macromedia.com> wrote in message
>>>>> news:fajur8$r0n$1@forums.macromedia.com...
>>>>>> could you not use pattern matching or a regular expression in the
>>>>>> serverside language you are using?
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


Inspiring
August 23, 2007
How would I do this with a recordset item? Can you give me a brief example
please?

Thanks.


"Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
news:fak17l$d6$1@forums.macromedia.com...
> You could do the same in VBScript, using the replace() function.
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
> http://www.dreamweavermx-templates.com - Template Triage!
> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
> ==================
>
>
> "Ian Hughes" <ihughes@nospam.net> wrote in message
> news:fak0qn$t5j$1@forums.macromedia.com...
>> No, this is ASP.........
>>
>> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
>> news:fak00e$sa3$1@forums.macromedia.com...
>>> Oops - only if PHP, of course.
>>>
>>> --
>>> Murray --- ICQ 71997575
>>> Adobe Community Expert
>>> (If you *MUST* email me, don't LAUGH when you do so!)
>>> ==================
>>> http://www.dreamweavermx-templates.com - Template Triage!
>>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>>> ==================
>>>
>>>
>>> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
>>> news:fajvvp$s9n$1@forums.macromedia.com...
>>>> Sure. Just use strstr() to replace all commas with ",<br>".
>>>>
>>>> --
>>>> Murray --- ICQ 71997575
>>>> Adobe Community Expert
>>>> (If you *MUST* email me, don't LAUGH when you do so!)
>>>> ==================
>>>> http://www.dreamweavermx-templates.com - Template Triage!
>>>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>>>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>>>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>>>> ==================
>>>>
>>>>
>>>> "orange22" <webforumsuser@macromedia.com> wrote in message
>>>> news:fajur8$r0n$1@forums.macromedia.com...
>>>>> could you not use pattern matching or a regular expression in the
>>>>> serverside language you are using?
>>>>
>>>>
>>>
>>>
>>
>>
>
>


Inspiring
August 23, 2007
You could do the same in VBScript, using the replace() function.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Ian Hughes" <ihughes@nospam.net> wrote in message
news:fak0qn$t5j$1@forums.macromedia.com...
> No, this is ASP.........
>
> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
> news:fak00e$sa3$1@forums.macromedia.com...
>> Oops - only if PHP, of course.
>>
>> --
>> Murray --- ICQ 71997575
>> Adobe Community Expert
>> (If you *MUST* email me, don't LAUGH when you do so!)
>> ==================
>> http://www.dreamweavermx-templates.com - Template Triage!
>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>> ==================
>>
>>
>> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
>> news:fajvvp$s9n$1@forums.macromedia.com...
>>> Sure. Just use strstr() to replace all commas with ",<br>".
>>>
>>> --
>>> Murray --- ICQ 71997575
>>> Adobe Community Expert
>>> (If you *MUST* email me, don't LAUGH when you do so!)
>>> ==================
>>> http://www.dreamweavermx-templates.com - Template Triage!
>>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>>> ==================
>>>
>>>
>>> "orange22" <webforumsuser@macromedia.com> wrote in message
>>> news:fajur8$r0n$1@forums.macromedia.com...
>>>> could you not use pattern matching or a regular expression in the
>>>> serverside language you are using?
>>>
>>>
>>
>>
>
>


Inspiring
August 23, 2007
No, this is ASP.........

"Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
news:fak00e$sa3$1@forums.macromedia.com...
> Oops - only if PHP, of course.
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
> http://www.dreamweavermx-templates.com - Template Triage!
> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
> ==================
>
>
> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
> news:fajvvp$s9n$1@forums.macromedia.com...
>> Sure. Just use strstr() to replace all commas with ",<br>".
>>
>> --
>> Murray --- ICQ 71997575
>> Adobe Community Expert
>> (If you *MUST* email me, don't LAUGH when you do so!)
>> ==================
>> http://www.dreamweavermx-templates.com - Template Triage!
>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>> ==================
>>
>>
>> "orange22" <webforumsuser@macromedia.com> wrote in message
>> news:fajur8$r0n$1@forums.macromedia.com...
>>> could you not use pattern matching or a regular expression in the
>>> serverside language you are using?
>>
>>
>
>


Inspiring
August 23, 2007
Oops - only if PHP, of course.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
news:fajvvp$s9n$1@forums.macromedia.com...
> Sure. Just use strstr() to replace all commas with ",<br>".
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
> http://www.dreamweavermx-templates.com - Template Triage!
> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
> ==================
>
>
> "orange22" <webforumsuser@macromedia.com> wrote in message
> news:fajur8$r0n$1@forums.macromedia.com...
>> could you not use pattern matching or a regular expression in the
>> serverside language you are using?
>
>


Inspiring
August 23, 2007
Sure. Just use strstr() to replace all commas with ",<br>".

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"orange22" <webforumsuser@macromedia.com> wrote in message
news:fajur8$r0n$1@forums.macromedia.com...
> could you not use pattern matching or a regular expression in the
> serverside language you are using?


Participating Frequently
August 23, 2007
could you not use pattern matching or a regular expression in the serverside language you are using?