Let $n_i, m_i, v_i$ be the number of samples, observed mean, and variance in sample $i$.
Let $n, m, v$ be similar figures for the combined data (sorry I redefined $n$ here).
$$m = \frac{1}{n}\sum_i n_i m_i$$.
Now for the variance:
$$v = \frac{1}{n-1}\sum_{i,j} (x_{i,j} - m)^2$$
with $x_{i,j}$ the $j^{th}$ observation of sample $i$ and $j=1,2,\ldots, n_i$.
Play around a little:
$$(x_{i,j} -m)^2 = (x_{i,j} - m_i + m_i - m)^2 = (x_{i,j} -m_i)^2 + (m_i-m)^2 +2(x_{i,j}-m_i)(m_i-m)$$.
Terms $(m_i-m)$ can be factored out of the summation over $j$:
$$v = \frac{1}{n-1}\left[\sum_i n_i(m_i-m)^2 + 2\sum_i(m_i-m)\sum_j(x_{i,j}-m_i) + \sum_{i,j} (x_{i,j} - m_i)^2\right]$$.
Since $\sum_j (x_{i,j}-m_i)=0$, the middle term cancels out. So you're left with:
$$v=\frac{1}{n-1}\left[\sum_i n_i(m_i-m)^2 + \sum_i(n_i-1)v_i\right]$$
Confidence intervals are obtained with $m$ and $v$.
Is that what you were looking for ?