Thursday, March 29, 2012
Create a view help!
I was wonder if it is possible to create a view using a stored procedure,
e.g
Create view [name] as
exec sp 'zxc'
or is there any other way to create a view using a query stored somewhere?
Thanks in advance
SR
Not sure what you'd accomplish by doing this, but you could use a
table-valued function:
CREATE FUNCTION dbo.tables()
RETURNS @.tables TABLE
(
TABLE_NAME SYSNAME
)
AS
BEGIN
INSERT @.tables
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
RETURN
END
GO
CREATE VIEW dbo.SillyTablesView
AS
SELECT TABLE_NAME FROM dbo.tables()
GO
SELECT * FROM dbo.SillyTablesView
SELECT * FROM dbo.tables()
GO
http://www.aspfaq.com/
(Reverse address to reply.)
"SR" <srego@.seclon.com> wrote in message
news:e8OkzGzbEHA.3144@.TK2MSFTNGP09.phx.gbl...
> Hi Guys,
> I was wonder if it is possible to create a view using a stored procedure,
> e.g
> Create view [name] as
> exec sp 'zxc'
> or is there any other way to create a view using a query stored somewhere?
> Thanks in advance
> SR
>
Create a view help!
I was wonder if it is possible to create a view using a stored procedure,
e.g
Create view [name] as
exec sp 'zxc'
or is there any other way to create a view using a query stored somewhere?
Thanks in advance
SRNot sure what you'd accomplish by doing this, but you could use a
table-valued function:
CREATE FUNCTION dbo.tables()
RETURNS @.tables TABLE
(
TABLE_NAME SYSNAME
)
AS
BEGIN
INSERT @.tables
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
RETURN
END
GO
CREATE VIEW dbo.SillyTablesView
AS
SELECT TABLE_NAME FROM dbo.tables()
GO
SELECT * FROM dbo.SillyTablesView
SELECT * FROM dbo.tables()
GO
http://www.aspfaq.com/
(Reverse address to reply.)
"SR" <srego@.seclon.com> wrote in message
news:e8OkzGzbEHA.3144@.TK2MSFTNGP09.phx.gbl...
> Hi Guys,
> I was wonder if it is possible to create a view using a stored procedure,
> e.g
> Create view [name] as
> exec sp 'zxc'
> or is there any other way to create a view using a query stored somewhere?
> Thanks in advance
> SR
>
Create a view help!
I was wonder if it is possible to create a view using a stored procedure,
e.g
Create view [name] as
exec sp 'zxc'
or is there any other way to create a view using a query stored somewhere?
Thanks in advance
SRNot sure what you'd accomplish by doing this, but you could use a
table-valued function:
CREATE FUNCTION dbo.tables()
RETURNS @.tables TABLE
(
TABLE_NAME SYSNAME
)
AS
BEGIN
INSERT @.tables
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
RETURN
END
GO
CREATE VIEW dbo.SillyTablesView
AS
SELECT TABLE_NAME FROM dbo.tables()
GO
SELECT * FROM dbo.SillyTablesView
SELECT * FROM dbo.tables()
GO
http://www.aspfaq.com/
(Reverse address to reply.)
"SR" <srego@.seclon.com> wrote in message
news:e8OkzGzbEHA.3144@.TK2MSFTNGP09.phx.gbl...
> Hi Guys,
> I was wonder if it is possible to create a view using a stored procedure,
> e.g
> Create view [name] as
> exec sp 'zxc'
> or is there any other way to create a view using a query stored somewhere?
> Thanks in advance
> SR
>
Thursday, March 22, 2012
create a global data source
Hi guys,
I have a number of reports deployed on the report server. I want to point all these reports to another data source. Currently, what I am doing is go to the individual report on the report server and change the data source property to point to the new data source. It is very tedious to do the same thing for all of the reports.
So, Is there any way to point all the reports under a project at one time.
Any idea is appreciated.
Thx!
I would use global replace. That's the only way that I know of.|||
would u explain that a lil bit
thx
|||
At the top menu, click Edit -> quick replace.
In the find box, enter the old dataset name.
In the replace box, enter the new dataset name.
You may want to do a find next and replace on a case by case basis instead of replace all, because I'm not exactly sure how your project is set up.
|||This is exactly how we have our reports configured.
1. In your business intelligence projects, create a new "shared" data source that points to the database your are pulling your data from. If you are using more than once database, create a single shared data source for each database. Each data source will have a name. For this example, lets assume you created a datasource called "DS_TEST" that points to a database called "MY_DATA"
2. When you build your reports, always use the shared datasources that you created from step 1.
3. When you deploy the reports, they will still be looking for the datasources by name. From step 1, the reports are all looking for a datasource called "DS_TEST". If you developed the reports on the same machine that hosts reporting services, everything should work (although my environment is not set up this way so I have not tested this). If you developed the reports on one machine and deployed to another, you must create the datasource on the deployment machine. To do this, navigate to the reporting services home page where the reports are deployed and click the "Add New Datasource" link (if you do not see this link, then you do not have the correct permissions). Point the datasource to the database you want the reports to pull from, but make sure and name it "DS_TEST" or whatever name you choose in step 1. The reports will now use the datasource called DS_TEST on the server the report is deployed on..
By having the global data source, it makes it easy during development to point the reports to test data so we do not effect the performance of the live system, and later when the reports are deployed to the live system they naturally point to the correct data.
Sunday, March 11, 2012
CR 8.5, dual monitor printing issues, delphi
We develop software in Delphi and Crystal Report 8.5 is used as reporting tool. Delphi's crystal component is used for coding.
I have a situation with a potential client. They have toshiba tecra m2 laptop which has GEForce FX 5200 video card which is dual monitor card. The OS is XP with SP2. When I click preview it is fetching data from the database and after that it hangs for ever neither displays view window or print. If the Harware accelaration is changed to 0 and Enable write combining is checked for this hardware properties the reports can be viewed and printed. But the client said these hardware properties are required for other applications on the machine.
Could any one help me resolving the issue? Is there any one have similar kind of problem?
Thanks in advance.
-KtuserThis behaviors can occur because of the 'Hardware acceleration' setting in Microsoft Windows. Reducing hardware acceleration on your computer will resolve these behaviors.
To access the 'Hardware acceleration' setting in Microsoft Windows, click Start > Settings > Control Panel > System > Display > Settings > Advanced > Troubleshooting.
There are typically six possible settings for 'Hardware acceleration': from 'None' to 'Full'. Reduce this value one setting at a time until the above behaviors are resolved.
The behavior of 'Enable write combining' has not been tested so not sure about it. Try the following along with the 'Enable write combining' checked and unchecked.
Saturday, February 25, 2012
CPU 100%
My SQL Server 2000 SP3 have for no apparent reason begun running 100% cpu
and it does not drop off.
All the CPU is used by the SQLServer service.
Any ideas?
Thanks
Regards
JonasIt seem to be our virus protection that triggered the SQLServer service to
use 100%CPU. Once virus protection was disabled CPU usage dropped to normal
level.
Regards
Jonas
"Jonas Larsen" <Jonas.Larsen@.Alcan.com> wrote in message
news:uF71v%238jEHA.704@.TK2MSFTNGP09.phx.gbl...
> Hi guys
> My SQL Server 2000 SP3 have for no apparent reason begun running 100% cpu
> and it does not drop off.
> All the CPU is used by the SQLServer service.
> Any ideas?
> Thanks
> Regards
> Jonas
>
>|||check sysprocesses(nolock) order by cpu where status !='sleeping'
then dbcc inputbuffer(spid) find out what SQL is running.
"Jonas Larsen" wrote:
> Hi guys
> My SQL Server 2000 SP3 have for no apparent reason begun running 100% cpu
> and it does not drop off.
> All the CPU is used by the SQLServer service.
> Any ideas?
> Thanks
> Regards
> Jonas
>
>|||Could you let me know what virus protection are you using? Also, operating
system and SQLServer details.
I ask because we're looking at installing virus protection and don't want
the same symptoms as you...
Thanks|||Hi Griff
We use Trend Micro Office Scan. However this is the first time in more than
a year.
Regards
Jonas
"Griff" <Howling@.The.Moon> wrote in message
news:ue$ZfCAkEHA.2696@.TK2MSFTNGP10.phx.gbl...
> Could you let me know what virus protection are you using? Also,
operating
> system and SQLServer details.
> I ask because we're looking at installing virus protection and don't want
> the same symptoms as you...
> Thanks
>