Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
SELECT IDDOCD,IDCOM#, IDPRT#, IDGRC#, IDENT#,IDSFX#,IDPRLC, IDNTU$, IDSHP#, IDINV# from astdta.oeind94, SELECT IARCC9 from astdta.icprt1each select alone is ok. how do you combine these?
James K
Master Smack Fu Yak Hacker
3873 Posts
Posted - 2013-09-13 : 13:19:51
Something like this perhaps? You have to find some relationship between the two tables i.e., some column or columns on which to JOIN them
SELECT IDDOCD,IDCOM#, IDPRT#, IDGRC#, IDENT#,IDSFX#,IDPRLC, IDNTU$, IDSHP#, IDINV# , IARCC9from astdta.oeind94 o INNER JOIN astdta.icprt1 i ON i.SomeColumnIn_oeind94 = o.SomeColumnIn_oeind94
AdamWest
Constraint Violating Yak Guru
360 Posts
Posted - 2013-09-13 : 13:22:04
I see. OK because I am taking something that the crystal reports makes and trying to apply it on the server. Thanks for the help, James.
visakh16
Very Important crosS Applying yaK Herder
52326 Posts
Posted - 2013-09-15 : 04:09:02
unless you specify a relation what you would end up would be a cartesian product.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs