May 17, 2013 at 12:00 pm
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
May 17, 2013 at 12:24 pm
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
May 18, 2013 at 6:26 pm
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
May 20, 2013 at 7:54 am
jayoub1 (5/18/2013)
Thank you very much for replyingThe 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 Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
May 21, 2013 at 2:00 pm
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.
May 29, 2013 at 10:45 am
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
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply