July 25, 2013 at 2:02 pm
Dear friends,
i have a task to write a business report that has 300 fields ( 200 from one table and 100 from another table) . Currently I'm creating a TEMP Table with all the report fields then inserting data into that from the 2 Source tables using Joins... , wanted to know a much better way with a sample of how do it.
Also the business gives me the requiremenst in an excel i had to work hard to collect the fields from the excel and then align them to create Temo table, any easy way for to gather all the report fields from the excel and put them in SQL ?
Kind Regards
Dhananjay
July 25, 2013 at 2:08 pm
dhananjay.nagarkar (7/25/2013)
Dear friends,i have a task to write a business report that has 300 fields ( 200 from one table and 100 from another table) . Currently I'm creating a TEMP Table with all the report fields then inserting data into that from the 2 Source tables using Joins... , wanted to know a much better way with a sample of how do it.
Also the business gives me the requiremenst in an excel i had to work hard to collect the fields from the excel and then align them to create Temo table, any easy way for to gather all the report fields from the excel and put them in SQL ?
Kind Regards
Dhananjay
The problem here is that we can't see your screen, we don't know your system, we have no idea what you data looks like, we don't know the business requirement and we don't have this excel file. In short, you haven't really asked a question that anybody has any chance of answering at this point.
I have a question though. Why does anybody think that a report with 300 columns of information is going to be useful?
_______________________________________________________________
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/
July 25, 2013 at 2:16 pm
basically I get requests in an excel with the fields that go on the report- as of todate I amnually create a Transpose of those fields in excel then use concatenate function in excel and assign the data type to the fields based on the DB we have.
I was thinking an easir way if any one knew 🙂
also other part of question is I create a temp table in SQL by copying all these fields from excel manually, then I dump information into them from the rquired sources, hence was looking a more efficient way to avoid temp tables...
July 25, 2013 at 3:19 pm
Please read this article and think about how it pertains to what you have posted here.
http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx
_______________________________________________________________
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/
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply