Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jess1984
Starting Member
14 Posts |
Posted - 2010-06-23 : 00:37:37
|
| I want to compare two strings from two table , if equal store that string in another table |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2010-06-23 : 02:07:25
|
| [code]INSERT INTO myStringsAreAlikeTableSELECT a.* FROM myStringsTable1 a INNER JOIN myStringsTable2 b ON a.ID = b.IDWHERE a.StringColumn1 = b.StringColumn2[/code]If this is not what you want then please add some more info.- LumbagoMy blog (yes, I have a blog now! just not that much content yet) -> www.thefirstsql.com |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2010-06-23 : 11:18:46
|
Beware thatWHERE a.StringColumn1 = b.StringColumn2 will be case INSENSITIVE unless you are using a Case Sensitive collation. So if you want Upper/Lower case letter to be treated as different then you need a bit more "glue".Same thing if you want different accents etc. which collate the same to be treated as being different. |
 |
|
|
|
|
|