Re: Concatenation help needed.

From: David Schleifer [MSFT] (dschleif_at_online.microsoft.com)
Date: 05/12/04


Date: Wed, 12 May 2004 15:42:22 -0700

You can try something like this:

select substring(CustomerID, 1, 2)+':'+substring(CustomerId, 3,
2)+':'+substring(CustomerId, 5, 1) as myfield from orders

Against the northwind sample database this would return

VI:NE:T
TO:MS:P
<etc>

- Dave

"Ralph Sharett" <rsharett@frch.com> wrote in message
news:%23Y7cKxGOEHA.892@TK2MSFTNGP09.phx.gbl...
> I am trying to pull data from an old database table to the new database.
In
> the old database the field in question is formatted to have text like
> this....10DS23.
>
> I need to same info but in the new database the field needs a colon: every
> two characters so the same field would in the new database would
> read....10:DS:23.
>
>
> Any ideas or help would be appreciated.
>
> Thanks,
>
> Ralph
>
>



Relevant Pages

  • RE: Automated Import Newbee needs help
    ... use Office Access 2007 to replicate a database that was created in an earlier ... Dave Hargis, Microsoft Access MVP ... "terry" wrote: ...
    (microsoft.public.access.externaldata)
  • RE: PLEASE HELP!!!! License information for this component not fou
    ... "Dave" wrote: ... "Klatuu" wrote: ... can't refresh the links it has to another database file. ... equivalent version Access Run Time license. ...
    (microsoft.public.access.gettingstarted)
  • Re: Can a Confimration Field Value be used is asp coding?
    ... "Dave" wrote in message ... >> flexibility and thereby eliminate most of the FP database component ... >> ClassID is a unique number which I am using to drive other pages ... >> The problem is the confirmation page. ...
    (microsoft.public.frontpage.client)
  • Re: Subject: Re: OT: Dont create tables owned by informix -
    ... >> own and administer the database. ... >> There are going to be times when this is impossible - and Dave may be ... In a small shop, the same small group of people end up with all roles, so ... Using sudo is a sensible and reasonable mechanism - and it is largely safe. ...
    (comp.databases.informix)
  • Re: Datasets - Best approach to use?
    ... so please excuse me if I stumble around here.. ... having a lot of the same kinds of trouble wrapping my head around the ... state and throw the write queries back to the database for processing. ... Dave and I both are looking forward to the responses! ...
    (microsoft.public.vb.database)