I am writing a query in SQL Server that its output a table.
I want the query result delimiter to be #|#
, how can I do that?
So if I output it to txt/csv file, it should look like this:
I am writing a query in SQL Server that its output a table.
I want the query result delimiter to be #|#
, how can I do that?
So if I output it to txt/csv file, it should look like this:
If you want your query to be run in an app then you could use a simple query such as
declare @demo table ([name] nvarchar(30), [lastname] nvarchar(50));
insert into @demo([name],[lastname]) values
('Catherine','Aragorn'),
('Anne','Boleyn'),
('Jane','Seymour'),
('Anne','Cleeves');
select concat([name],'#|#',[lastname])
from @demo;
Or You can export results to a csv using csv.py using #|#
as the delimiter - see CSV File Reading and Writing