Re: Query two databases with asp



Thanks for explaining the precision and scale. I was a little unsure about
it, that's why I didn't reply to it.
The CompanyName field actually displays a numeric value that corresponds to
the ID field. I appreciate all of the information you have provided and I'm
sorry to have taken up much of your time. I think I'll just put this project
on hold for now.

Thanks again.


"Bob Barrows [MVP]" wrote:

dusty wrote:
DB1..School
ID - INT(data type) - 4 (length) - PKey
Parish - nvarchar - 255
School - nvarchar - 255

DB2..Users
ID - numeric(data type) - 9 (length)

A numeric column (also known as a "decimal" column) has both a precision
(total number of digits allowed) and a scale (number of digits used for
the decimal portion). I can do without this information in this
particular situation, but you should make a point of providing it when
asked in the future.

FirstName - varchar - 50
LastName - varchar - 50
Address - varchar - 50
City - varchar - 25
State - varchar - 10
Zip - varchar - 10
CompanyName - varchar - 50
Username - varchar - 50 - PKey

The CompanyName field in the users table under DB2 is the ID field of
DB1.


That is not possible. An INT column cannot be used to link to a varchar
column ... unless you have a varchar column containing integer data ...
is that the case? I know you said you did not create the databases, but
this seems nonsensical to me. Anyways, if this is the case, it will make
your joins very inefficient due to the necessity of making datatype
conversions on the fly.
What version of SQL Server is this? Can you modify the design of
DB2..Users? Perhaps add a calculated field to it?

It is taking very long to gather the requirements for this task. Given
that I have my own job, I am not going to be able to devote a lot of
time to this. Perhaps you should consider hiring a consultant to do this
for you ...

Here is some information about what information needs to be provided to
enable people (including a consultant if you go that route) to help you
with database-related problems:
http://www.aspfaq.com/etiquette.asp?id=5006

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.



.


Loading