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
 General SQL Server Forums
 New to SQL Server Programming
 Need your inputs

Author  Topic 

Villanuev
Constraint Violating Yak Guru

478 Posts

Posted - 2011-09-08 : 22:46:34
Hi Experts.

Is this possbile to incorporate this process i made into SSRS.
my objective is the user will generate the report instead
of im doing this for them and feeding them the result. I running this script manually.

The csv file can be change it depends on the filename.

This is the process i made for the scripts

1. I create a temporary table
IF OBJECT_ID('tempdb..#VPTable', 'U') IS NOT NULL DROP TABLE #VPTable
GO
Create Table #VPTable

2. Perform Bulk insert and store the record to temporary table i created
Bulk Insert #VPTable
FROM '\\axserv09\Prod\VP0001887.csv'

3. Perform select statement and stored the result to (Into #Data1 temp table)
4. Perform select statment and stored the result to (Into #Data2 temp table)
5. Perform final select statement and generate the result to grid


Regards,

JOV

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-09-08 : 22:56:10
SSRS is for reporting. You can use SSIS instead or just pure T-SQL. You can wrap it into a cmd file even.

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

Subscribe to my blog
Go to Top of Page

Villanuev
Constraint Violating Yak Guru

478 Posts

Posted - 2011-09-09 : 01:16:19
Thanks tkizer.

Or its possible to use SP?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-09-09 : 11:22:26
Yes, stored procs are just stored T-SQL scripts really.

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

Subscribe to my blog
Go to Top of Page
   

- Advertisement -