August 7, 2015 at 1:55 pm
I'm getting an operand type clash. Text is incompatible with int when attempting to archive table.
I tried finding a solution but I have not found one.
The table has several columns defined as Text.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
August 7, 2015 at 1:58 pm
Welsh Corgi (8/7/2015)
I'm getting an operand type clash. Text is incompatible with int when attempting to archive table.I tried finding a solution but I have not found one.
The table has several columns defined as Text.
Do you have something that reproduces this issue? Perhaps following the first link in your signature might help us.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
August 7, 2015 at 2:02 pm
I'd have to agree, we need a bit more information. Maybe something that helps repro your exact issue.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
August 7, 2015 at 2:04 pm
I will look into it further.
Thanks.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
August 7, 2015 at 2:06 pm
Without information of exactly what you're attempting, I'm guessing that you're selecting data from one table to insert into a second table (the archive table). Based upon the message "Text is incompatible with int", it sounds like the columns are not matched up properly and a column with a text data type is being inserted into an integer column.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
August 7, 2015 at 3:04 pm
For what it is worth, the text datatype has been deprecated since sql server 2005 in favor of varchar(max). If at all possible you should update your tables and stop using text. It is a serious pain to deal with since you have to constantly cast/convert it to another datatype just to use it in a join or where predicate.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
August 7, 2015 at 3:13 pm
Sean Lange (8/7/2015)
For what it is worth, the text datatype has been deprecated since sql server 2005 in favor of varchar(max). If at all possible you should update your tables and stop using text. It is a serious pain to deal with since you have to constantly cast/convert it to another datatype just to use it in a join or where predicate.
Too bad MS keeps pushing it with their databases (dynamix)
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
August 7, 2015 at 3:18 pm
SQLRNNR (8/7/2015)
Sean Lange (8/7/2015)
For what it is worth, the text datatype has been deprecated since sql server 2005 in favor of varchar(max). If at all possible you should update your tables and stop using text. It is a serious pain to deal with since you have to constantly cast/convert it to another datatype just to use it in a join or where predicate.Too bad MS keeps pushing it with their databases (dynamix)
No kidding!! I wish it would go away and make those holdouts fix their tables. It really should stop be deprecated and start being no longer available. Sort of like the old join syntax that finally went away (*= etc). Anybody still using that...too bad...our new software no longer supports our poor decisions we made 15 years ago. Time to walk straight into the 21st century with your sql. 😛
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply