﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Varchar are Incompatible Hatası &#8211; SQL Server Eğitimleri</title>
	<atom:link href="https://sqlserveregitimleri.com/etiket/varchar-are-incompatible-hatasi/feed" rel="self" type="application/rss+xml" />
	<link>https://sqlserveregitimleri.com</link>
	<description>SQL Server ile ilgili her şey</description>
	<lastBuildDate>Thu, 13 Jul 2023 20:43:27 +0000</lastBuildDate>
	<language>tr</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.1</generator>
	<item>
		<title>SQL Server&#8217;da The Data Types Text and Varchar are Incompatible in the Equal to Operator Hatası</title>
		<link>https://sqlserveregitimleri.com/sql-serverda-the-data-types-text-and-varchar-are-incompatible-in-the-equal-to-operator-hatasi</link>
		
		<dc:creator><![CDATA[Yavuz Selim Kart]]></dc:creator>
		<pubDate>Fri, 18 Feb 2022 09:21:37 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Equal to Operator Hatası]]></category>
		<category><![CDATA[The Data Types Text and Varchar]]></category>
		<category><![CDATA[Varchar are Incompatible Hatası]]></category>
		<guid isPermaLink="false">https://sqlserveregitimleri.com/?p=13031</guid>

					<description><![CDATA[Herkese merhaba. Bu yazıda SQL Server’da The data types text and varchar are incompatible in the equal to operator hatası hakkında bilgi vereceğim. Bu hata...]]></description>
										<content:encoded><![CDATA[<p>Herkese merhaba. Bu yazıda SQL Server’da The data types text and varchar are incompatible in the equal to operator hatası hakkında bilgi vereceğim.</p>
<p>Bu hata girilen degerin, veri tiplerinin birbirinden farklı olmasından dolayı oluşur.</p>
<p>Aşağıdaki kod örneğini çalıştırın.</p>
<pre class="line-numbers"><code class="language-sql">DECLARE @DegiskenTablo TABLE
(
    Ad TEXT
);

INSERT INTO @DegiskenTablo
(
    Ad
)
VALUES
('Yavuz' -- VeriBilgisi - text
    )

DECLARE @Veri VARCHAR(50) ='Selim'

SELECT Ad
FROM @DegiskenTablo
WHERE Ad = @Veri;</code></pre>
<p>Sorguyu çalıştırdığınızda aşağıdaki hatayı göreceksiniz.</p>
<p><img fetchpriority="high" decoding="async" class="alignnone wp-image-13033 size-full" src="https://sqlserveregitimleri.com/wp-content/uploads/2022/02/sql-serverda-the-data-types-text-and-varchar-are-incompatible-in-the-equal-to-operator-hatasi-1.jpg" alt="SQL Server'da The Data Types Text and Varchar are Incompatible in the Equal to Operator Hatası" width="700" height="384" srcset="https://sqlserveregitimleri.com/wp-content/uploads/2022/02/sql-serverda-the-data-types-text-and-varchar-are-incompatible-in-the-equal-to-operator-hatasi-1.jpg 700w, https://sqlserveregitimleri.com/wp-content/uploads/2022/02/sql-serverda-the-data-types-text-and-varchar-are-incompatible-in-the-equal-to-operator-hatasi-1-315x173.jpg 315w, https://sqlserveregitimleri.com/wp-content/uploads/2022/02/sql-serverda-the-data-types-text-and-varchar-are-incompatible-in-the-equal-to-operator-hatasi-1-547x300.jpg 547w, https://sqlserveregitimleri.com/wp-content/uploads/2022/02/sql-serverda-the-data-types-text-and-varchar-are-incompatible-in-the-equal-to-operator-hatasi-1-246x135.jpg 246w" sizes="(max-width: 700px) 100vw, 700px" /></p>
<p>Hatayı gidermek için ilgili kısımda CAST ya da CONVERT işlemi yapmanız gerekmektedir.</p>
<pre class="line-numbers"><code class="language-sql">DECLARE @DegiskenTablo TABLE
(
    Ad TEXT
);

INSERT INTO @DegiskenTablo
(
    Ad
)
VALUES
('Yavuz' -- VeriBilgisi - text
    )

DECLARE @Veri VARCHAR(50) ='Yavuz'

SELECT Ad
FROM @DegiskenTablo
WHERE CAST(Ad AS NVARCHAR(50)) = @Veri;</code></pre>
<p>Sorguyu çalıştırdığınızda aşağıdaki sonucu göreceksiniz.</p>
<p><img decoding="async" class="alignnone wp-image-13034 size-full" src="https://sqlserveregitimleri.com/wp-content/uploads/2022/02/sql-serverda-the-data-types-text-and-varchar-are-incompatible-in-the-equal-to-operator-hatasi-2.jpg" alt="SQL Server'da The Data Types Text and Varchar are Incompatible in the Equal to Operator Hatası" width="700" height="430" srcset="https://sqlserveregitimleri.com/wp-content/uploads/2022/02/sql-serverda-the-data-types-text-and-varchar-are-incompatible-in-the-equal-to-operator-hatasi-2.jpg 700w, https://sqlserveregitimleri.com/wp-content/uploads/2022/02/sql-serverda-the-data-types-text-and-varchar-are-incompatible-in-the-equal-to-operator-hatasi-2-315x194.jpg 315w, https://sqlserveregitimleri.com/wp-content/uploads/2022/02/sql-serverda-the-data-types-text-and-varchar-are-incompatible-in-the-equal-to-operator-hatasi-2-488x300.jpg 488w, https://sqlserveregitimleri.com/wp-content/uploads/2022/02/sql-serverda-the-data-types-text-and-varchar-are-incompatible-in-the-equal-to-operator-hatasi-2-220x135.jpg 220w" sizes="(max-width: 700px) 100vw, 700px" /></p>
<p>Görüldüğü üzere sorgumuz başarıyla çalıştı.</p>
<p>Herkese çalışma hayatında ve yaşamında başarılar kolaylıklar.</p>
<div class='epvc-post-count'><span class='epvc-eye'></span>  <span class="epvc-count"> 427</span><span class='epvc-label'> Kez Okundu</span></div>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
