Skip to main content
Nintex Community Menu Bar

Using SQL Server Views instead of tables

  • February 19, 2008
  • 2 replies
  • 11 views

Forum|alt.badge.img+2

I am trying to use a SQL Server view (not a table) to provide a denormalized (joined) dataset to an InfoPath form via a smartObject, but the SQL Service doesn't seem to see views, only tables.  Any ideas about how to get around this? 


 


Thanks,


-alex

2 replies

Forum|alt.badge.img+7
  • February 19, 2008

Hi Alex,


I've not attempted this with SQL Views, but you could try:


SELECT * INTO YourNewTableName FROM YourExistingViewName


as this will create a table from your view.


If you want, you can get SQL Server Agent to run a job to recreate this table every hour or something with a TSQL statement like:


 


use YOURDB
truncate table YourNewTableName
SELECT * INTO YourNewTableName FROM YourExistingViewName


 


if your view is dynamic, replace the truncate with a drop.


HTH


Martin


Forum|alt.badge.img+2
  • Author
  • February 19, 2008

Martin,


 Thanks, but unfortunately I need this to work in real-time.  I guess I could create a table instead of the view and drive it from triggers, but that's really ugly and unmaintainable.


I wonder if K2 is coming out with a fix for the SQL Service.


 


-a