How can I check the length of my text fields in SQL Server vs. PostGRE?
Posted on 2006-10-23
I am migrating an older PostGRESQL database into a SQL Server database using a DTS package. I'm using a PostGRE driver on my PC that will allow me to connect via ODBC to my PostGRE database. I've successfully copied my tables over but my coworker brought up a point that he could not get text fields to copy over correctly.
I want to test my migration to see if the text fields did in fact come accross correctly. I want to query one of my tables and find out the length of characters within one of the text columns. I can't seem to find a function that will do this.
I've tried using the len() function but it doesn't work in SQL Server.
Select len(c_problemText) as txtlen
I get an error saying "Argument data type text is invalid for argument 1 of len function."
What I really need is some way to verify that the text fields I brought accross to SQL Server are not being truncated. If anyone knows a way I could verify this I could really use some suggestions.