3

I am exporting data from an existing sql server 2012 table by using the ssms option database right click -> Tasks -> generate scripts. This works fine except for date columns.

Example output:

INSERT INTO Employees VALUES (1, 'Frank', ,CAST(0x16190B00 AS Date));

I Don' find a way to export date columns to a format like 2.10.2012. I can think about adding a string column and cast the date column values as a string, but this is just a work around.

Can someone help me out here?

5
  • 1
    Try this tool - devart.com/dbforge/sql/studio/data-export-import.html Commented Jan 14, 2014 at 12:26
  • possible duplicate of SQL Server Script Generator CAST datetime values from hex Commented Jan 14, 2014 at 12:27
  • 2
    Says in this connect item that it is fixed in the next major release of SQL Server (SQL Server 2014) and that it will be ported to SQL Server 2012 SP2. Commented Jan 14, 2014 at 12:32
  • Thanks Mikael for posting the link, i think this is pretty much it. Feel free to post a comment and i accept it. I think it's no duplicate because the other question dienst refer to this bug. Commented Jan 14, 2014 at 14:20
  • Thanks @Devart for posting the link for dbForge Studio. I just used it to export my data easy & fast. Really incredible tool! Commented Jan 14, 2014 at 14:22

1 Answer 1

0

Like Mikael said, this is a bug which will be fixed in the next major release of SQL Server

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.