Find Jobs
Hire Freelancers

Advanced CrossTab/Pivot Query SQL Server

$30-250 USD

Completed
Posted about 5 years ago

$30-250 USD

Paid on delivery
I have an extensive product database in SQL Server. I need to take 3 tables and combine them so that I have at the end a table with columns named after items of one table, with productid as rows with the field data concatenated data from 2 other tables. No mathematical functions are performed at all. Data is just collated. 1) Table 1 pdt_WebWidgets has 132 items I call "Widgets." Column names for the pivot crosstab will come from field labeltext. New widgets are occasionally added, so pivot must be able to include these new widgets as they are created. 2) Table 2 pdt_WebWidgetValue has over 7 million records, with fields ProductID, WidgetID, Value. pdt_WebWidgetValue.WidgetID=pdt_WebWidgetID 3) For [login to view URL] IN (2,6), we can join pdt_WebWidgetListBox (57,000 records) to pdt_WebwidgetValue ON pdt_WebWidgetListBox.ID=[login to view URL] AND (important) pdt_Webwidgetlistbox.WidgetID=[login to view URL] Again, this is only for items in Type=(2,6). For this WidgetType, we will concatenate the values in [login to view URL] as a comma-delimited list in the pivot fields. All other Types, we will just take the actual pdt_WebWidgetValue.Value. These should be single values, typically. I already have a query that does this, but it can be very slow. I use a number of static temp tables to help build the data to get it ready and make it easier/faster for the crosstab to be built. I wanted to see if someone could design something that would run much faster, creating a static pivot table after collating the data, so I could reduce a number of steps in a SQL Server Agent Job.
Project ID: 18884472

About the project

8 proposals
Remote project
Active 5 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hello, I can for sure build your pivot query in most efficient way. Table of 7 million rows shouldn't represent such a big issue if properly indexed but as you want items to be the columns and columns must be defined in SQL Server pivot table, your solution with temp can surely be upgraded in something better performing. I usually use dynamic SQL which ends up as pretty good choice when it comes to dynamic pivot tables. If you would like me to do this for you, feel free to contact me. Thank you for the consideration and cheers!
$110 USD in 2 days
5.0 (37 reviews)
7.5
7.5
8 freelancers are bidding on average $148 USD for this job
User Avatar
Hello, As an expert in SQL, i am very much interested to do this project. I am not fully clear about the requirements, but as you did it already, i think i can just optimize it to run faster. If you want me to do it, will you give me the database and the current query? Let's discuss more. Thanks
$98 USD in 0 day
5.0 (262 reviews)
7.7
7.7
User Avatar
Hello Sir I can help you handle that, I have good experience on SQL. Contact me asap Sincerely Maurice
$222 USD in 10 days
5.0 (1 review)
2.4
2.4
User Avatar
Hi euroluxhome Greetings !! Hope you finds in good health !! I saw your job post on www.freelancer.com and happy to assist you on same. I will redesign and maintain your details into a professional manner. Is it possible if we can discuss complete details of your project and then come to a final discussion.
$140 USD in 12 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hello. How are you? I am highly interested to work on the "Advanced CrossTab/Pivot Query SQL Server". I am a full stack website developer. I have more than 7 years experience in "Microsoft SQL Server, SQL". I will make sure the best quality service. Let us work together. Best regards, Yang L.
$140 USD in 1 day
0.0 (0 reviews)
1.4
1.4
User Avatar
hi I have good amount of knowledge about the SQL server. I can help you regarding your task. I have gone through your requirement. either you can share to me your query or I will write my self. kindly give chance to me.
$277 USD in 2 days
0.0 (0 reviews)
0.0
0.0
User Avatar
5 yr experience in sql Relevant Skills and Experience Sql, storedprocedure, function, trigger views
$155 USD in 3 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Newberry, United States
5.0
15
Payment method verified
Member since Aug 26, 2016

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.