Using the Generate Script

  • Hello Everyone

    I am working to generate the scripts in SSMS. I would like to be able to see the actual date and time that is stored in the table, not the binary equivalent.

    The Insert Into script that is generated gives me this: CAST(0x0000A12D0182C74D AS DateTime)

    Is there an option that I am missing that will allow me to see the date and time in the INSERT INTO Statement, as a simple date and time value?

    Thanks in advance

    Andrew SQLDBA

  • http://www.ssmstoolspack.com/Licensing

    take a look above...still free for 2008.

    don't think that SSMS will do what you want...but be very pleased to be proved wrong .

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • I have not been able to every find that SSMS will do that. I was hoping that someone had found a way.

    I have the SSMS Tools. So how would I use that to generate the INSERT Statements for a single table?

    Thanks

    Andrew SQLDBA

  • AndrewSQLDBA (5/14/2013)


    I have not been able to every find that SSMS will do that. I was hoping that someone had found a way.

    I have the SSMS Tools. So how would I use that to generate the INSERT Statements for a single table?

    Thanks

    Andrew SQLDBA

    right click table in SSMS......"SSMS tools" > "generate insert statements"

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • AndrewSQLDBA (5/14/2013)


    I have not been able to every find that SSMS will do that. I was hoping that someone had found a way.

    I have the SSMS Tools. So how would I use that to generate the INSERT Statements for a single table?

    Thanks

    Andrew SQLDBA

    SSMS tools adds a right click menu item to objects in the Object Viewer:

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thank you for your advice, I found it.

    I feel silly asking now. LOL

    Do you know of a way to NOT script all the blank spaces from a char data type? And is there a way to NOT have [N'] to begin all the character string columns?

    Andrew SQLDBA

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply