<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlserver.ro/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Intrebari</title><link>http://sqlserver.ro/forums/14/ShowForum.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Re: need some help with foreign keys</title><link>http://sqlserver.ro/forums/thread/4227.aspx</link><pubDate>Thu, 28 Feb 2008 15:38:12 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:4227</guid><dc:creator>adi_alina</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/4227.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=4227</wfw:commentRss><description>Ms pt sugestii katalyn, mai ales pt cea cu combo.&lt;br&gt;</description></item><item><title>Re: need some help with foreign keys</title><link>http://sqlserver.ro/forums/thread/3965.aspx</link><pubDate>Fri, 08 Feb 2008 08:33:58 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:3965</guid><dc:creator>katalyn</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/3965.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=3965</wfw:commentRss><description>&lt;P&gt;Problema este rezolvată dar părerea mea este că cel mai bine&amp;nbsp;ar fi&amp;nbsp;să nu creezi o legătură între cele două tabele în felul acesta. Eu propun adăugarea unei coloane ID_UM în tabela de unităţi de măsură care să fie primary key şi modificarea coloanei din tabela de produse să "bată" spre această coloană. Am să creez scriptul mai jos.&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;CREATE&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;TABLE&lt;/FONT&gt;&lt;FONT size=2&gt; Produse&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;idP &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;PRIMARY&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;KEY&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;,&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;denP &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;varchar&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;50&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;)&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;NOT&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;NULL,&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;id_um &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;NOT&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;NULL,&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;pret &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;MONEY&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;NULL&lt;BR&gt;)&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;CREATE&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;TABLE&lt;/FONT&gt;&lt;FONT size=2&gt; UnitatiDeMasura&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;id_um &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;PRIMARY&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;KEY&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;,&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;denUM &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;varchar&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;3&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;)&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;NOT&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;NULL,&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;abreviere &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;varchar&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;50&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;)&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;NULL,&lt;BR&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;CONSTRAINT&lt;/FONT&gt;&lt;FONT size=2&gt; [denUM_UNIC] &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;UNIQUE&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;denUM&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;)&lt;BR&gt;&lt;/FONT&gt;)&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;GO&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;ALTER&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;TABLE&lt;/FONT&gt;&lt;FONT size=2&gt; Produse &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ADD&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;CONSTRAINT&lt;/FONT&gt;&lt;FONT size=2&gt; [FK_Produse_UnitatiDeMasura] &lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;FOREIGN&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;KEY&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;id_um&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;)&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;REFERENCES&lt;/FONT&gt;&lt;FONT size=2&gt; UnitatiDeMasura&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;FONT size=2&gt;id_um&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;)&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/P&gt;
&lt;P&gt;Pentru a utiliza&amp;nbsp;un combo in VISUAL BASIC .NET:&lt;/P&gt;
&lt;P&gt;1.Te foloseşti de proprietatea DataSource a combo-ului căruia îi atribui un DataTable&lt;BR&gt;2.Setezi proprietatea DisplayMember cu numele coloanei pe care doreşti să o afişezi şi ValueMember cu numele coloanei bound&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;</description></item><item><title>Re: need some help with foreign keys</title><link>http://sqlserver.ro/forums/thread/3962.aspx</link><pubDate>Wed, 06 Feb 2008 21:42:13 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:3962</guid><dc:creator>adi_alina</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/3962.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=3962</wfw:commentRss><description>ms pt pont :)&lt;br&gt;</description></item><item><title>Re: need some help with foreign keys</title><link>http://sqlserver.ro/forums/thread/3960.aspx</link><pubDate>Tue, 05 Feb 2008 18:42:56 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:3960</guid><dc:creator>ggciubuc</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/3960.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=3960</wfw:commentRss><description>Conceptul de lookup nu exista la SQL Server asa cum apare la Access; insa daca tot e vorba sa folosim ceva&amp;nbsp;de tip Wizard, prin Database Diagrams se pot crea relatii intre tabele , vizual;</description></item><item><title>Re: need some help with foreign keys</title><link>http://sqlserver.ro/forums/thread/3959.aspx</link><pubDate>Tue, 05 Feb 2008 16:13:35 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:3959</guid><dc:creator>adi_alina</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/3959.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=3959</wfw:commentRss><description>p.s. ms pentru primul raspuns :)&lt;br&gt;</description></item><item><title>Re: need some help with foreign keys</title><link>http://sqlserver.ro/forums/thread/3958.aspx</link><pubDate>Tue, 05 Feb 2008 16:11:09 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:3958</guid><dc:creator>adi_alina</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/3958.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=3958</wfw:commentRss><description>o sa aibe interfata in Visual Basic.net, dar eu nu ma refeream la forme... acces are posibilitatea pana sa ajungi la forme, in stadiul de tabela sa creezi un astfel de lookup&lt;br&gt;dar probabil k ai dreptate, probabil k nici nu-mi tb un lookup la nivel de tabela, ci la nivel de forma, cand voi ajunge acolo... oricum sunt curioasa daca se poate face si cu sql server&lt;br&gt;</description></item><item><title>Re: need some help with foreign keys</title><link>http://sqlserver.ro/forums/thread/3957.aspx</link><pubDate>Tue, 05 Feb 2008 15:48:32 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:3957</guid><dc:creator>xmldeveloper</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/3957.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=3957</wfw:commentRss><description>&lt;P&gt;Ce interfata o sa aiba aplicatia client&amp;nbsp;? SQL Server nu este Access - nu are conceptul de forme. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Re: need some help with foreign keys</title><link>http://sqlserver.ro/forums/thread/3956.aspx</link><pubDate>Tue, 05 Feb 2008 15:38:12 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:3956</guid><dc:creator>adi_alina</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/3956.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=3956</wfw:commentRss><description>ah... si o ultima intrebare (sper:D) &lt;br&gt;cum pot sa creez un fel de lookup k la acces, pt o coloana?&lt;br&gt;spre exp pt coloana mea um din Produse sa am un combobox cu val lui denUm din UnitatiDeMasura de unde sa-mi aleg cand vreau sa completez um-ul&lt;br&gt;&lt;br&gt;</description></item><item><title>Re: need some help with foreign keys</title><link>http://sqlserver.ro/forums/thread/3955.aspx</link><pubDate>Tue, 05 Feb 2008 15:38:11 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:3955</guid><dc:creator>xmldeveloper</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/3955.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=3955</wfw:commentRss><description>&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;FONT size=4&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:teal;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;-- SQL Server 2008, SQL Server 2005&lt;/SPAN&gt;&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;SELECT&lt;/SPAN&gt; * &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;FROM&lt;/SPAN&gt; sys.objects &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;WHERE&lt;/SPAN&gt; name=&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;'FK_Produse_UnitatiDeMasura'&lt;/SPAN&gt;;&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:teal;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;-- SQL Server 2000&lt;/SPAN&gt;&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;SELECT&lt;/SPAN&gt; * &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;FROM&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:lawngreen;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;sysobjects&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;WHERE&lt;/SPAN&gt; name=&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;'FK_Produse_UnitatiDeMasura'&lt;/SPAN&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#808080 size=2&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;/P&gt;&lt;/FONT&gt;</description></item><item><title>Re: need some help with foreign keys</title><link>http://sqlserver.ro/forums/thread/3953.aspx</link><pubDate>Tue, 05 Feb 2008 15:10:28 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:3953</guid><dc:creator>adi_alina</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/3953.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=3953</wfw:commentRss><description>verificasem deja sa aibe acelasi tip de date si aceeasi dim...&lt;br&gt;se pare ca problema era intr-adevar k nu toate datele de pe coloana um(Produse) existau si in denUm(UnitatiDeMasura)&lt;br&gt;am modificat si acum imi zice "Command(s) completed successfully."&lt;br&gt;&lt;br&gt;multumesc mult :)&lt;br&gt;&lt;br&gt;P.S. daca ati putea sa-mi spuneti si cum pot sa verific k intr-adevar
s-a creat.... caci in object explorer pe tabela produse la keys nu imi
apare decat cheia primara, nu si cea straina si eu asa stiam k acolo tb
sa fie... am cautat si la constraints.... si la keys si constraints de la
tabela UnitatiDeMasura&lt;br&gt;&lt;br&gt;multumesc din nou ;)&lt;br&gt;</description></item><item><title>Re: need some help with foreign keys</title><link>http://sqlserver.ro/forums/thread/3951.aspx</link><pubDate>Tue, 05 Feb 2008 14:39:26 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:3951</guid><dc:creator>cretzu</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/3951.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=3951</wfw:commentRss><description>Trebuie sa aibe acelasi tip coloanele si aceea marime &lt;br&gt;Daca prima este varchar(20) si a doua este varchar(100) nu se poate face legatura.&lt;br&gt;&lt;br&gt;Vreau sa te intreb ... exista date in cele doua tabele ?? Iar daca raspunsul este DA atunci datele de pe coloana um (produse) sa existe in denUm Unitatidemasura&lt;br&gt;&lt;br&gt;&lt;br&gt;DAniel</description></item><item><title>Re: need some help with foreign keys</title><link>http://sqlserver.ro/forums/thread/3950.aspx</link><pubDate>Tue, 05 Feb 2008 14:28:44 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:3950</guid><dc:creator>ignatandrei</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/3950.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=3950</wfw:commentRss><description>fa si un drop la constraint... se pare ca l-ai creat deja ...&lt;br&gt;</description></item><item><title>need some help with foreign keys</title><link>http://sqlserver.ro/forums/thread/3949.aspx</link><pubDate>Tue, 05 Feb 2008 14:01:22 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:3949</guid><dc:creator>adi_alina</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/3949.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=3949</wfw:commentRss><description>&lt;br&gt;salut!&lt;br&gt;&lt;br&gt;eu sunt mai incepatoare cu SQL Server (am lucrat pana acum doar cu Acces si cu Visual FoxPro) si am o pb care probabil o sa vi se para floare la ureche, dar mie nu-mi iese...&lt;br&gt;am doua tabele:&lt;br&gt;&amp;nbsp;&amp;nbsp; Produse(idP, denP, um, pret),&amp;nbsp;&amp;nbsp;&amp;nbsp; primary key: idP&lt;br&gt;&amp;nbsp;&amp;nbsp; UnitatiDeMasura(denUM, abreviere),&amp;nbsp;&amp;nbsp;&amp;nbsp; primary key: denUM&lt;br&gt;si vreau sa creez relatia dintre cele doua bazata pe cheia straina "um" care face referire la "denUM"&lt;br&gt;&lt;br&gt;Am fol un querry de forma:&lt;br&gt;&lt;br&gt;USE soccom&lt;br&gt;ALTER TABLE Produse&lt;br&gt;ADD CONSTRAINT FK_Produse_UnitatiDeMasura&lt;br&gt;FOREIGN KEY (um)&lt;br&gt;REFERENCES UnitatiDeMasura(denUm);&lt;br&gt;&lt;br&gt;si imi da o eroare de forma:&lt;br&gt;&lt;br&gt;Msg 547, Level 16, State 0, Line 2&lt;br&gt;The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_Produse_UnitatiDeMasura". The conflict occurred in database "soccom", table "dbo.UnitatiDeMasura", column 'denUm'.&lt;br&gt;&lt;br&gt;am incercat sa fac si in modul visual adik fara sql (din object explorer click dr pe Keys New Foreign Key s.a.m.d.), dar exact acelasi mesaj de eroare imi apare.&lt;br&gt;am verificat k cele doua coloane sa aibe acelasi tip de date...&lt;br&gt;&lt;br&gt;Multumesc</description></item></channel></rss>