Hello I need to export my table fixed filed size by making numbers 15
characters right alignment and strings 20 characters left alignment.Hi Jim
There may be an easier way but with say:
CREATE TABLE mytemp ( id int NOT NULL, name varchar(10) NULL)
CREATE VIEW MyExport
SELECT RIGHT(SPACE(15) + CAST(id AS varchar(15)),15) AS Id,
LEFT(name+SPACE(20),20) as Name
FROM mytemp
The you could use BCP to export from the view.
John
"JIM.H." wrote:
> Hello I need to export my table fixed filed size by making numbers 15
> characters right alignment and strings 20 characters left alignment.
No comments:
Post a Comment