Two Querries In One

Apr 14, 2006

i have this two simillar querries :

SELECT allgestiuni.numegest, iesiri.nrdoc
FROM ((iesiri JOIN intrari ON ((iesiri.lotid = intrari.idlot)))
JOIN allgestiuni ON ((intrari.gestid = allgestiuni.idgest)))
WHERE (iesiri.tipdoc= 'tvliv') AND
(iesiri.nrdocsec like 'validat')

and

SELECT allgestiuni.numegest, iesiri.nrdoc
FROM ((iesiri JOIN intrari ON ((iesiri.nrdoc=intrari.nrdoc)))
JOIN allgestiuni ON ((intrari.gestid = allgestiuni.idgest)))
WHERE (iesiri.tipdoc = 'tvliv') AND
(iesiri.nrdocsec like 'validat')

as you see the querries returns the same columns only the
first join differs.
I want this two querries in one querry that will display
4 columns with data

View 4 Replies


ADVERTISEMENT

Owner Name Cannot Be Omitted In Sql 2005 Querries?

Jan 4, 2006

Dear All,Our project was done in SQL 2000, now we are migrating to 2005.however, there are lots of command such as:a) SELECT * FROM myTableNamewhich, shall beb) SELECT * FROM myLoginId.myTableNameboth (a) and (b) are ok in sql 2000, as long as you login withmyLoginId, but, only (b) works in sql 2005.seems in sql 2005, you can not omit the "Owner Name" when speifying atable, unless the table's owner is 'DBO'.which means, even if I login with myLoginId, I have to use the detailedformat (b),not (a).this causes trouble in our project -- developed in sql 2000, hundredsof command omitted the owner name prefix, troublesome to modify one byone.Any workaround or suggestions, please? Thanks.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved