Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

Is there a way to export a table with the time(7) datatype using gsqlcmd?

Writer Sebastian Wright

I am using the gsqlcmd command-line tool to read and export SQL files. I am able to do so, but not if one the tables I'm exporting has a time(7) datatype column. It doesn't recognize this type. How do I get it to recognize it?

I use this command:gsqlcmd my_database_name "select * from table_name"

When I execute this command for a table that doesn't have this type, it displays the columns and data in the command line.

When I include this datatype, it gives me this error:

Execution error: Unknown SQL type - SS_TIME_EX.

3

1 Answer

Support suggested that I was probably using the wrong provider in my connection string- I needed to use the .NET SqlClient Data Provider. It reads the time datatype now.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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