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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Unable get data from PROC.

Author  Topic 

vikky
Yak Posting Veteran

54 Posts

Posted - 2012-01-02 : 04:01:49
HI

My server is SQL 2000.

i have two tables. One is Master table having some columns.
I have another table as 'A'

Now i have to write a procedure which retuns some column from two tables.
But in table 'A' Only One record.

my query is

select master.col,master.col1,master.col2,A.COL1
FROM Master,A

While i execute above query as select statement we are getting the result. But when we use same select in procedure now data is returned from SP.


Please help to us.

Thanks,
vikky.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-01-02 : 11:43:38
What you've done is a cross join. Is that really what you want?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-01-02 : 12:14:43
quote:
Originally posted by vikky

HI

My server is SQL 2000.

i have two tables. One is Master table having some columns.
I have another table as 'A'

Now i have to write a procedure which retuns some column from two tables.
But in table 'A' Only One record.

my query is

select master.col,master.col1,master.col2,A.COL1
FROM Master,A

While i execute above query as select statement we are getting the result. But when we use same select in procedure now data is returned from SP.


Please help to us.

Thanks,
vikky.


can you show your proce code? probably you're doing an insert inside proc rather than selecting from it

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -