Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 CHECK FOR SPACES

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-09-27 : 07:51:31
DONNA writes "I HAVE A FILE THAT I NEED TO BREAK INTO FIRST NAME & LAST WITH FIX LENGTH FIELDS,

THE FILE CAME IN LAST NAME FIRST AND FIRST NAME LAST (ONE LONG FIELD 45 CHARATERS)

I NEED THE FILE TO BE FIRST NAME FIRST (25 CHARACTERS) AND LAST NAME LAST (20 CHARACTERS)

i COULD SEND YOU THE NEW FORMAT AND THE OLD FORMAT."

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2005-09-27 : 08:47:25
select substring(columnname,1,25), substring(columnname,26,20) from yourtablename
Go to Top of Page
   

- Advertisement -