SQL query to fill excel table

didijaba

Well-known Member
Joined
Nov 26, 2006
Messages
511
Hi, I need help with creating SQL query. Thanks for any help you provide.
I have table with not fully filled with matching values. For example in column Name there is #1487, but if you offset to column Financial status, you will see that only first value is filled, other are not. What I want is to have SQL quary to create "full" table where empty cells are filled with matching values.
I know how to do it using formulas and VBA, but SQL is 10x faster, and I have large data set that is changing.
Here are links I use for implementing SQL
The Analyst Cave | Excel, analytics, programming and more

<style type="text/css">
table.tableizer-table {
border: 1px solid #CCC; font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #ccc;
}
.tableizer-table th {
background-color: #104E8B;
color: #FFF;
font-weight: bold;
}
</style><table class="tableizer-table">
<tr class="tableizer-firstrow"><th>Name</th><th>Created at</th><th>Financial Status</th><th>Payment Type</th><th>Lineitem quantity</th><th>Product code</th><th>Customer ID</th><th>Billing City</th><th>Billing Zip</th><th>Billing Province</th><th>Billing Country</th></tr>
<tr><td>#1486</td><td>1/2/2015 13:36</td><td>unpaid</td><td> </td><td>1</td><td>A01</td><td>285737</td><td>Tucker</td><td>30084</td><td>GA</td><td>US</td></tr>
<tr><td>#1487</td><td>1/2/2015 17:39</td><td>unpaid</td><td> </td><td>1</td><td>A02</td><td>285775</td><td>Borger</td><td>79007</td><td>TX</td><td>US</td></tr>
<tr><td>#1487</td><td>1/2/2015 17:39</td><td> </td><td> </td><td>1</td><td>A03</td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>#1488</td><td>1/4/2015 0:45</td><td>paid</td><td>cash</td><td>1</td><td>B04</td><td>285970</td><td>BEVERLY HILLS</td><td>90211</td><td>CA</td><td>US</td></tr>
<tr><td>#1488</td><td>1/4/2015 0:45</td><td> </td><td> </td><td>1</td><td>B05</td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>#1489</td><td>1/5/2015 14:44</td><td>paid</td><td>credit</td><td>1</td><td>A02</td><td>286155</td><td>New York</td><td>10014</td><td>NY</td><td>US</td></tr>
<tr><td>#1489</td><td>1/5/2015 14:44</td><td> </td><td> </td><td>1</td><td>A03</td><td> </td><td> </td><td> </td><td> </td><td></td></tr>
</table>
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,224,551
Messages
6,179,476
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top