Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Using an ASP Expand / Collapse
Author
Message
Posted Friday, May 17, 2013 12:00 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, July 30, 2014 4:00 PM
Points: 96, Visits: 252
I am a total newbie and have a question to ask. I am the only DBA on a team managing several SQL servers and we have a new project that require the creation of a CVS flat file.

I was give a note pad document with ASP script and (here is the crazy part) I don’t know what to do with it.

What’s also weird is that the DBA that gave it to me said it’s a very old version of ASP that it was done in and at the top of the script it says

<%@ language="vbscript" %>
<!--#include file="Connections/connSecurity.asp" -->
<%

Also a user needs to enter a start and end date and can enter SSN to get specific info.

Is there a way to implement Report Server to generate CVS Flat files and maybe use this script
Can i design this using Report Server alone.

Please let me know. Your help is appreciated.


Jeff
Post #1454154
Posted Friday, May 17, 2013 12:24 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 5:47 PM
Points: 12,910, Visits: 32,020
jayoub1 (5/17/2013)
I am a total newbie and have a question to ask. I am the only DBA on a team managing several SQL servers and we have a new project that require the creation of a CVS flat file.

I was give a note pad document with ASP script and (here is the crazy part) I don’t know what to do with it.

What’s also weird is that the DBA that gave it to me said it’s a very old version of ASP that it was done in and at the top of the script it says

<%@ language="vbscript" %>
<!--#include file="Connections/connSecurity.asp" -->
<%

Also a user needs to enter a start and end date and can enter SSN to get specific info.

Is there a way to implement Report Server to generate CVS Flat files and maybe use this script
Can i design this using Report Server alone.

Please let me know. Your help is appreciated.


wow I have more questions than answers for you, sorry:
Generally a DBA will use SQLCMD.exe, BCP.exe, SSIS or maybe a custom CLR to export data to disk, whehter it's csv,tsv or some other format.

A developer might write code or a web page to do the same thing, but one step removed from the data.

Why do you need to use an asp page to do it, instead of the tools a DBA would typically use?


Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1454164
Posted Saturday, May 18, 2013 6:26 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, July 30, 2014 4:00 PM
Points: 96, Visits: 252
Thank you very much for replying
The reason I would not be able to use these tools is that the user needs to be able to enter a start date, end date and SSN number to generate the report. The use must be able to access the report any time they want. I don’t think the users have access to these tools.
I spoke to a developer after posting and he said that you would need to change the file to .asp and then place it on a web server that the user can access. He said that the script would need to be modified with the correct connection string and table and field references before it would work.
Aside from the developers creating a program I need a solution that a user can generate a CVS file and the specs for the output are as follows:
Example:
Position 0-9 = SSN
Position 10-22 = First Name
Position 23-35 = Last name
Position 36- … = …

Do you know if report server will do the job. I know I can write the query to extract the data, but the users must be able to generate it and it must be delivered as a CVS

Your help is appreciated.


Jeff
Post #1454294
Posted Monday, May 20, 2013 7:54 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, August 29, 2014 2:32 PM
Points: 13,302, Visits: 12,168
jayoub1 (5/18/2013)
Thank you very much for replying
The reason I would not be able to use these tools is that the user needs to be able to enter a start date, end date and SSN number to generate the report. The use must be able to access the report any time they want. I don’t think the users have access to these tools.
I spoke to a developer after posting and he said that you would need to change the file to .asp and then place it on a web server that the user can access. He said that the script would need to be modified with the correct connection string and table and field references before it would work.
Aside from the developers creating a program I need a solution that a user can generate a CVS file and the specs for the output are as follows:
Example:
Position 0-9 = SSN
Position 10-22 = First Name
Position 23-35 = Last name
Position 36- … = …

Do you know if report server will do the job. I know I can write the query to extract the data, but the users must be able to generate it and it must be delivered as a CVS

Your help is appreciated.


As Lowell stated previously there just isn't enough information here to provide much help. We can't see your screen, we don't know the project and we are not familiar with the data structures.

I suppose you could create an asp page to capture the parameters (SSN, dates, etc) and have that page call your stored proc. I would agree with Lowell that a CLR is probably a good candidate here. Have your proc generate the file, return it to your asp page and then send the file as an attachment in the header.



_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1454541
Posted Tuesday, May 21, 2013 2:00 PM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Monday, August 25, 2014 8:36 AM
Points: 775, Visits: 243
Why not just use MS SQL Reporting Services or Crystal reports (what ever you reporting tool is) to generate a report, you can have input parameters, the report can use a SQL query as the source.. The results can be exported as a csv, as well as other formats. Generating a ASP page seems to be overkill.
Post #1455208
Posted Wednesday, May 29, 2013 10:45 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, July 30, 2014 4:00 PM
Points: 96, Visits: 252
Thank you very much for the help

I researched and found out that Report Server will generate the CVS file, so I will spin up an report server instances and begin creating the report.

Again thanks for the help



Jeff
Post #1457849
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse