开发者

How can I export some Blog posts from our Sql Server, to a file?

We have a simple website that contains (take your pick, for this example) blog posts / q & a questions / whatever. People upload text (single sentences to paragraphs .. including some white listed/approved html).

I need to export this data into .. a file / something .. so I can give the data to someone else.

eg. sample schema

Id INT
Title VARCHAR(100)
UniqueUrl VARCHAR(100)
Content VARCHAR(MAX)
ModifiedOn DATETIME
PublishedOn DATETIME
CreatedByUserId INTEGER

Is there any way I can export this data into a format that is simple to give to another person to import? I have no idea what they will import it into .. so i was guessing a csv or excel format might be sufficient. That said, one of the fields contains VARCHAR(MAX) which can have paragraphs of text.

Anyone have any suggestions?

##Update

I've tried

  • Tasks -> Export Data : this always give me an error during the final step. Error message give's -noth开发者_如何学运维ing- about what happened. Total fail :(
  • Run my sql script -> save results as -> .txt or .csv : file is created, but i just can't read the content .. especially since one of the fields is a VARCHAR(MAX) with the User Generated Content everywhere :(

Maybe export as XML?

What have you tried?

I'm not sure what other things I can try / what options there are, besides the two, above.


XML is going to the be the simplest solution here. The line breaks will rip apart most csv readers, and the quotation marks will finish off the rest.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜