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.
Hi,My table as follow,tSysUserUsID | SLvl | gCounter |-------------------------------ADMIN | 1 | NOFFICER | 2 | N...............tSysParaImID | Linc------------S32 | 0*tSysPara only contains 1 row and dont have any relationship with tSysUsertSysLincsComp | Cout | CNam---------------------AMRU | HPT | BROKEN*tSysLinc only contains 1 row and dont have any relationship with tSysUserHow my SQL look's like, to generate row as followUsID | SLvl | gCounter | ImID | Linc | sComp | Cout |CNam--------------------------------------------------------------------ADMIN | 1 | N | S32 | 0 | AMRU | HPT | BROKENPlese help
singularity
Posting Yak Master
153 Posts
Posted - 2009-10-18 : 13:16:35
select *from tSysUser across join tSysPara bcross join tSysLinc c
Delinda
Constraint Violating Yak Guru
315 Posts
Posted - 2009-10-18 : 14:58:30
quote:Originally posted by singularity select *from tSysUser across join tSysPara bcross join tSysLinc c
if table tSysPara, as follow,tSysParaImID | Linc------------S32 | 0how to filter in cross join tSysPara? let's say i want to select Linc only?
singularity
Posting Yak Master
153 Posts
Posted - 2009-10-19 : 20:50:00
Just specify the columns you want from each table:
select a.UsID, a.SLvl, a.gCounter, b.Linc, c.sComp c.Cout, c.CNamfrom tSysUser across join tSysPara bcross join tSysLinc c