Viewing 15 posts - 10,306 through 10,320 (of 13,879 total)
Lisa Liel (12/14/2012)
Also... doing the subqueries with "With X as"...
December 14, 2012 at 12:54 pm
Someone had a lot of fun writing that query.
I believe that error means that there are unequal numbers of columns in the different SELECTs - so things just don't match...
December 14, 2012 at 10:54 am
Something like this (untested) should get you started.
with invs
as (
select CustKey
,sum(balance) invbalance
from tarInvoice
group by CustKey
)
,payments
as (
select CustKey
,Sum(UnappliedAmt) UnappliedAmt
from tarCustPmt
group by CustKey
)
select c.CustKey
,c.CustId
,etc etc
,IsNull(invs.invbalance, 0)
,isNull(payments.UnappliedAmt)
from tarCustomer c
left join invs on c.CustKey...
December 14, 2012 at 10:45 am
Eugene Elutin (12/11/2012)
Here I will play J.CELKO: ......
Steady on, don't overdo it :hehe:
December 11, 2012 at 10:34 am
mikes84 (12/11/2012)
I have a FULL OUTER JOIN with an OR condition that's running very slowly. The reason is because I'm trying to join a users table (id, username1, username2) where...
December 11, 2012 at 9:10 am
Eugene Elutin (12/11/2012)
Phil Parkin (12/11/2012)
WolfgangE (12/11/2012)
December 11, 2012 at 6:30 am
WolfgangE (12/11/2012)
December 11, 2012 at 4:51 am
nigelrivett (12/11/2012)
where (name = 'Paul' and position = 'manager')or name = 'Jim'
?? looks remarkably like a lowercase version of my solution 🙂
December 11, 2012 at 4:19 am
cidr (12/11/2012)
Apologies for the elusive subject title. I'm trying to filter only rows on one field only when another field has a certain value.
I have a...
December 11, 2012 at 3:58 am
select *
,GroupNumber = (
case
when HouseNumber <= 214
then 1
when HouseNumber <= 238
then 2
...
December 11, 2012 at 3:54 am
Jeff's code is not wasted, do not worry.
But there is only so much that we can do to help - now you need to help yourself & do some study/learning.
December 10, 2012 at 11:44 am
10e5x (12/10/2012)
I shall try your approach first since u sounds very confident. And I believe u totally know your stuff. But sad to say, I am not up till...
December 10, 2012 at 8:41 am
This is a most entertaining thread.
I could help with the SSIS stuff (thanks Jeff!) - if it were needed, but it is not.
First task: write the proc to return the...
December 10, 2012 at 6:03 am
guoxiang1610 (12/9/2012)
Phil Parkin (12/9/2012)
Based on the data provided, it looks like a stored proc would be suffucient...
December 9, 2012 at 12:05 pm
Viewing 15 posts - 10,306 through 10,320 (of 13,879 total)