Reputation: 499
I have a database in Microsoft SQL Server and I am using Microsoft SQL Server Management Studio.
I have an option to insert the query result to the file, although the results of the query are not separated by any special signs.
It looks like this
select * from table_name
Output:
18 182 3386 NULL
18 790 12191 NULL
In File:
18 182 3386 NULL
18 790 12191 NULL
Is there any possibility to modify query so after every record it will put a special char, like this:
In File:
18; 182; 3386; NULL;
18; 790; 12191; NULL;
It will be easier then for me to copy this database to other programs.
Upvotes: 15
Views: 26813
Reputation: 121
CTRL+T Then Execute , = Text Result
CTRL+D Then Execute , = Grid Result
Upvotes: 11
Reputation: 34774
In SSMS:
Tools
> Options
> Query Results
> Results To Text
Top option there is Output Format
, can set a delimiter there.
Upvotes: 18