November 26, 2004 at 6:11 am
Does anybody know if there are any implications to joining VARCHAR columns from different tables that are different sizes?
i.e. Table 1 - Column1 - VARCHAR(255)
Table 2 - Column1 - VARCHAR(25)
I assume if the length of the data is 20, that there will be no adverse effect.
Any help would be appreciated.
November 26, 2004 at 6:25 am
Counterquestion:
Why do the columns that you join on have different datatype length?
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
November 26, 2004 at 6:32 am
I'm new to the company and have found that a lot of the tables in the Data Warehouse are set for VARCHAR(255). As the max row size in SQL is 8060 and a number of the tables exceed this, I have set the columns in this newly created table to more sensible sizes.
Thus Table1 - Column1 = VARCHAR(255) and table2 - Column1 = VARCHAR(25)
November 26, 2004 at 6:42 am
Sounds like a port of an old Access app
But to answer your question, I don't think there should issues when joining both columns. But if you could narrow the columns anyway, I would prefer this. Would also make your schema more readable and easier to understand.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
November 26, 2004 at 6:50 am
From speaking to one of the guys here, he tells me it is a port of an old access app.
thanks for your help.
Carl
November 26, 2004 at 7:09 am
From speaking to one of the guys here, he tells me it is a port of an old access app.
Sorry about that.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply