how do i create a formatted file using a stored procedure?
for eg. if i have the following....
date : 5th April : should occupy 6 spaces (numeric) (05/04/2003)
Place: London : should occupy 20 spaces (text).
Country: United Kingdom should occupy 20 spaces (text)
EOL Terminator: £ (1 character only)
the sample final output should be like:
050403London United Kingdom £
050403Washington DC USA £
050403Delhi India £
In your SELECT statement CONVERT the text fields to fix length CHAR. So if City needs to be 40 characters it is CONVERT(CHAR(40), City). You can run the stored procedure from ISQL using -h-1 so no header get printed