Viewing 13 posts - 1 through 13 (of 13 total)
Yes this should be it, thanks :). I will be working from here:-D
November 12, 2014 at 12:17 am
If i do this I get all the rows returned. What I want is two seperate tables. To get the first result set (exact matches on the partnumbers) I do...
November 10, 2014 at 3:53 am
-- sample table 1
DROP TABLE #Table_1
CREATE TABLE #Table_1 (Partnumber INT, Description VARCHAR(20))
INSERT INTO #Table_1 (Partnumber, Description)
VALUES (101,'QQQ313'),(102,'DFE911'),(103,'QKL721'),(104,'QQL555'),(105,'DLL323'), (121, 'QQQ313')
-- sample table 2
DROP TABLE #Table_2
CREATE TABLE #Table_2 (Partnumber INT, Description VARCHAR(20))
INSERT...
November 10, 2014 at 2:53 am
ChrisM@Work (11/7/2014)
-- Try this (if you can provide sample tables I could try it for you)
-- Measure the highest...
November 10, 2014 at 1:50 am
Hi Chris,
Sorry for the late reply!! Tommorow I can give the queries you provided a try at our database.
What I want to achieve:
- First the user has to choose two...
November 9, 2014 at 7:24 am
To get all the results with your queries I should do both T1.rij <= T2.rij and T2.rij <= T1.rij. If I only do the first I won't get 'AQQ313' as...
November 7, 2014 at 8:15 am
ChrisM@Work (11/7/2014)
DROP TABLE #Table1
CREATE TABLE #Table1 (Bestelnummer INT, Omschrijving VARCHAR(20))
INSERT INTO #Table1 (Bestelnummer, Omschrijving)
VALUES (101,'ABN101'),(102,'ZBN'),(103,'KDN154'),(104,'ADN235'),(105,'QND999'),(110,'QQQ313'),(112,'ABL513')
-- 7 rows
DROP TABLE #Table2
CREATE TABLE #Table2 (Bestelnummer INT, Omschrijving...
November 7, 2014 at 6:15 am
Let me explain why your method isn't going to work.
The two tables look like this (the highlighted ones HAS to result in a match when the query is executed):
Then I...
November 7, 2014 at 4:34 am
ChrisM@Work (11/6/2014)
SELECT T1.*, T2.* FROM (SELECT rn = ROW_NUMBER() OVER(ORDER BY something) FROM table_1) AS T1
INNER JOIN (SELECT rn = ROW_NUMBER() OVER(ORDER BY something) FROM table_2) AS T2
ON T1.rn...
November 7, 2014 at 1:28 am
ChrisM@Work (11/6/2014)
Try this:
SELECT T1.*, T2.*
FROM table_1 AS T1
INNER JOIN table_2 AS T2
ON T1.[column_T1] < T2.[column_T2]
WHERE dbo.Levenshtein(T1.[column_T1], T2_2.[column_T2]) > percentage
I'm going to try it tommorow (well atleast in my...
November 6, 2014 at 9:08 am
Ok I think I figured it out, at last :).
The query:
SELECT T1.*, T3.* FROM table_1 AS T1
LEFT JOIN table_2 AS T2 ON (T1.[column_T1] = T2.[column_T2)
LEFT JOIN table_2 AS T2_2...
November 6, 2014 at 8:00 am
In the second query, you're forcing SQL Server to evaluate an expression on which to join.
Aha that explains why it's slow, thanks.
Is there any way to first check...
November 6, 2014 at 6:45 am
I tried the function you posted in that thread, still have the same results. As you stated you have to compare all the rows from both tables with eachother. So...
November 6, 2014 at 4:56 am
Viewing 13 posts - 1 through 13 (of 13 total)