Hi all,
I try to execute an inner join using In-Database tools within SQL Server (see atachment).
Left table: 783 423 rows - 10 fields selected
Right table: 10 381 238 rows - 10 fields selected
Key based on 2 fields.
I had to stop the process after 8 hours of execution and my SQL Server mdf file grew from 120 Go to 1 To!!! (only during the execution of this simple query).
=> Did I do something wrong?
I tried to do it differently (see attachment): when I execute the process I've got an error:
"Error: Data Stream In (50):
Error creating table "TABLE1":
Microsoft OLE DB Provider for SQL Server:
Column or parameter #1: Specified column precision 39 is greater than the maximum precision of 38.
\42000 = 2750
CREATE TABLE "TABLE1" ("JFO_SEQNO" decimal(39,0),"DEP_TPOP_ID" varchar(17),"ARR_TPOP_ID" varchar(17),
"DEP_COUNTRY" varchar(3),"ARR_COUNTRY" varchar(3),"DEP_STATE" varchar(3),"ARR_STATE" varchar(3),
"Right_JFO_SEQNO" decimal(39,0),"Right_DEP_TPOP_ID" varchar(17),"Right_ARR_TPOP_ID" varchar(17),
"Right_DEP_COUNTRY" varchar(3),"Right_ARR_COUNTRY" varchar(3),"Right_DEP_STATE" varchar(3),"Right_ARR_STATE" varchar(3))"
The SQL code used to write my table (TABLE1) put a format to JFO_SEQNO decimal(39,0) whereas in SQL Server the format is numeric(38,0) (see attachment);
Any idea?
Thanks!
Franck
Solved! Go to Solution.
My "guess" is that your JOIN fields are the issue. A cartesian join (many to many) creates these symptoms. Say for example you join two tables on ZIPCode. Join everyone from 90210 to 90210 and you'll get millions and millions of records on output.
Please check your join fields!
Cheers,
Mark
Thanks.
You were right, I had some missing values in my key.