| Author |
Topic  |
|
|
Ciupaz
Posting Yak Master
Italy
176 Posts |
Posted - 01/10/2013 : 08:08:46
|
Hello all, I have 2 tables with a Varchar(100) fields, something like these:
TableA TableA_ID - Value - Description - Value2 1 - 23 - 'City1 Gr. 1' - 300 2 - 25 - 'City1 Gr. 2' - 340 3 - 33 - 'City2 Gr. 1' - 320 4 - 13 - 'City3 Gr. 1' - 308
TableB TableB_ID - Value - Description - Value2 1 - 63 - 'City1 Gr. 1' - 500 2 - 75 - 'City1 Gr. 2' - 540 3 - 63 - 'City2 Gr. 1' - 520 4 - 83 - 'City3 Gr. 1' - 508
Is it possible join them with the varchar fields?
Thanks in advance.
Luigi
PS I'm using SQL Server 2008 R2 |
|
|
nigelrivett
Flowing Fount of Yak Knowledge
United Kingdom
3328 Posts |
Posted - 01/10/2013 : 08:58:47
|
Yes.
========================================== Cursors are useful if you don't know sql. SSIS can be used in a similar way. Beer is not cold and it isn't fizzy. |
 |
|
|
Ciupaz
Posting Yak Master
Italy
176 Posts |
Posted - 01/10/2013 : 09:26:25
|
It does not work, maybe for culture o accent impostations?
Luigi |
 |
|
|
Lamprey
Flowing Fount of Yak Knowledge
3821 Posts |
Posted - 01/10/2013 : 13:26:28
|
| Are you saying the varchar COLUMNs have different collations? |
 |
|
|
wholesalenfljerseyssale
Starting Member
9 Posts |
Posted - 01/11/2013 : 01:17:14
|
Our company are professional wholesaler for Nike NFL Jerseys. We wholesale all kind of jerseys, include NFL, NHL, MLB, NBA and NCAA. All stitched on numbers and names, also with authentic packing jerseys for sale at our site. Huge stock for all kind of jerseys, also full way guaranteed for your goods. Wholesale NFL jerseys, basketball jerseys, hockey jerseys will be our speciality business. We are offical jerseys supplier and manufacturer for all leagues. So you will get correct style, best quality, best service from our site. Thanks for reading and enjoy your shopping! Only Wholesale jerseys at our site! Enjoy shopping for the NFL Jerseys Wholesale online sale and cheap NFL jerseys from China in the professional China NFL jerseys outlet.high quality, lowest Attention Clearance Sale fans! Use the Clearance Sale Categories below to purchase Clearance Sale Apparel, Clearance Sale Gifts and Clearance Sale Merchandise. We are your Jerseys for sale for all the authentic Clearance Sale Gear. Because you are a Clearance Sale fanatic you should have only the best licensed Clearance Sale Apparel guaranteed to show your Clearance Sale Pride. Fanzz only carries licensed Clearance Sale Jerseys, Clearance Sale T-Shirts, Clearance Sale Hats and Clearance Sale Drinkware for all Clearance Sale Players.
Attention Clearance Sale fans! Use the Clearance Sale Categories below to purchase Clearance Sale Apparel, Clearance Sale Gifts and Clearance Sale Merchandise. We are your Jerseys for sale for all the authentic Clearance Sale Gear. Because you are a Clearance Sale fanatic you should have only the best licensed Clearance Sale Apparel guaranteed to show your Clearance Sale Pride. Fanzz only carries licensed Clearance Sale Jerseys, Clearance Sale T-Shirts, Clearance Sale Hats and Clearance Sale Drinkwar |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47023 Posts |
Posted - 01/11/2013 : 03:02:48
|
quote: Originally posted by Ciupaz
It does not work, maybe for culture o accent impostations?
Luigi
first check if contents are exactly same without any additional non printable characters
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
|
Ciupaz
Posting Yak Master
Italy
176 Posts |
Posted - 01/11/2013 : 03:06:09
|
Yes, they have, I think, differente collations.
Luigi |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47023 Posts |
Posted - 01/11/2013 : 03:09:46
|
then overide them using COLLATE in join like
SELECT *
FROM tablA a
JOIN TableB b
ON b.Description COLLATE database_default = a.Description COLLATE database_default
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
|
Ciupaz
Posting Yak Master
Italy
176 Posts |
Posted - 01/11/2013 : 03:33:32
|
This works. Thank you very much Visakh.
Luigi |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47023 Posts |
Posted - 01/11/2013 : 03:37:38
|
welcome
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
| |
Topic  |
|