Hi,
Is it possible to create a view from tables in the different database using
T-SQL?if possible,
pls send the T-SQL statement.
Thanks in advance,
Venkat
Thanks in advance,
Venkat
create view venkat
as
select royalty
from pubs..titles
union all
select orderid
from northwind..orders
go
select * from venkat
go
drop view venkat
go
-oj
Quote:> Hi,
> Is it possible to create a view from tables in the different database
using
> T-SQL?if possible,
> pls send the T-SQL statement.
> Thanks in advance,
> Venkat
> create view venkat
> as
> select royalty
> from pubs..titles
> union all
> select orderid
> from northwind..orders
> go
> select * from venkat
> go
> drop view venkat
> go
> -oj
> > Hi,
> > Is it possible to create a view from tables in the different database
> using
> > T-SQL?if possible,
> > pls send the T-SQL statement.
> > Thanks in advance,
> > Venkat
Here i want to check whether index1 is equal to index2.Suppose if it is
equal,then i have to
retrieve the ID and Name to show in the view.This i have done using this
T-SQL
use DB1
if exists(select ID,Name from T1,DB2..T2 where T1.index1 = DB2..T2.index2)
DROP VIEW view7
GO
create view view7 as select ID,Name from T1,DB2..T2 where T1.index1 =
DB2..T2.index2
GO
But here i also have to check whether index1 is equal to index3,if it equals
then i have to update
in the view7 in the same ID and Name fields.I have tried using Many T-SQL
statements,but i can't
find the solution.
Thanks in advance,
venkat
I have a stored procedure that accepts no parameters, I would like to create
a view that displays the execution results of that stored procedure.
I tried avoiding writing a stored procedure at all, and simply putting all
the SQL in the view. However, the stored procedure uses temporary tables.
I also tried doing something like this :
create view ViewName
as Exec SPName
but that didn't work either (I was just coming up with ideas - don't know if
that's even possible)
Any suggestions?
The reason this has to be a view is that my client is gonna use Excel (dunno
how) to open the view, and whatever they're using to do that won't work on
sprocs.
2. Help Please, Cursor Problem!
3. View Creation Using Access Data Project
4. Tools for debugging stored pocedures?
5. Permission on View creation
6. Writeback/Analysis Services Tutorial
7. Newbie Question on View creation
9. View creation -- duplicate column values
11. View creation!!Please help!
12. PERL/DBI: Finding view creation info