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)
 View error

Author  Topic 

dowens
Yak Posting Veteran

82 Posts

Posted - 2005-10-10 : 15:28:54
I have two db's db1 db2
db1 is the active db
Nightly the inactive db (in this case db2) is refreshed and becomes the active db once refresh completes.

Each db has duplicate views (UNION).
Users are receiving error 'failed row set' (crystal).

If I open the active view (Union) and save it the error goes away and the data is selected.

What am I doing wrong?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-10-10 : 15:40:57
Post the view code.

Tara
Go to Top of Page

dowens
Yak Posting Veteran

82 Posts

Posted - 2005-10-10 : 15:43:29
CREATE VIEW dw_v_GroupMaster AS

SELECT fl1stDwProd1.dbo.dw_GroupMaster.* FROM fl1stDwProd1.dbo.dw_GroupMaster
, dbo.dw_Control
WHERE activeDbName = 'prod1'

UNION

SELECT fl1stDwProd2.dbo.dw_GroupMaster.* FROM fl1stDwProd2.dbo.dw_GroupMaster
, dbo.dw_Control
WHERE activeDbName = 'prod2'
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-10-10 : 16:31:40
I suspect this has to do with the * in your view. Try modifying the view so that it uses an explicit column list in both select statements. If this fixes it, then it has to do with how you are performing the refresh.

Tara
Go to Top of Page

dowens
Yak Posting Veteran

82 Posts

Posted - 2005-10-11 : 08:37:27
I'm not clear as to what you mean by explicit column list.
Perhaps listing each data field of the table?

I use DTS to pull the data in and sp to normalize the data.
Once all tables are built a control table is updated to point to the refreshed db.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-10-11 : 10:01:05
"I'm not clear as to what you mean by explicit column list"

Instead of using

fl1stDwProd2.dbo.dw_GroupMaster.*

list each column in the table

Kristen
Go to Top of Page
   

- Advertisement -