Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I remove carriage returns from a table
Message
 
À
26/04/2006 10:53:17
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01116681
Message ID:
01116729
Vues:
16
>I imported an Excel spreadsheet into SQL and found out that some of the columns have carriage returns in them. I can see them in EM when I browse the table however I cannot see them in QA.
>
>I was trying to come up with a way to remove them but I cannot get the select to work with would return the rows with a CR in.
>
>select * from landscapeplan where taxid like '%char(13)%'
>
>update landscapeplan set taxid = replace(taxid,char(13),'')
>
>Thanks In advance
>
>Quinn

Don't forget about CHAR(10) (line feed)
update landscapeplan set taxid = replace(REPLACE(taxid, char(10),''),char(13),'')
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform