Viewing 15 posts - 6,781 through 6,795 (of 8,731 total)
You need to work with cross tabs or pivot. I suggest that you do it before joining the dependents view to your query.
To know how to handle cross tabs, read...
March 11, 2014 at 12:13 pm
With a calendar table you could count the rows without a problem. 🙂
March 11, 2014 at 10:12 am
Lynn Pettis (3/10/2014)
If any one has some free time this person could use some help. I don't have the free time at the moment.http://www.sqlservercentral.com/Forums/Topic1549023-391-1.aspx
I've wasted a lot of time...
March 10, 2014 at 2:41 pm
If you're already working on it, why won't you go the whole way?
SELECTmm.MEMMT_ID,
mm.MEM_ID,
mmp.MEMMP_salutation,
mmp.MEMMP_nickName,
mmp.MEMMP_firstName,
mmp.MEMMP_MI,
mmp.MEMMP_lastName,
mmp.MEMMP_company,
mmp.MEMMP_title,
mmp.MEMMP_address1,
mmp.MEMMP_address2,
mmp.MEMMP_address3,
mmp.MEMMP_city,
mmp.STA_ID,
mmp.MEMMP_zipCode,
mmp.MEMMP_country,
mmp.MEMMP_homePhone,
mmp.MEMMP_bizphone,
mmp.MEMMP_bizPhoneExt,
mmp.MEMMP_fax,
mmp.MEMMP_cellPhone,
mmp.MEMMP_email1,
mmp.MEMMP_source,
mmp.MEMMP_refOther,
(select PROM_CODE from promotion where PROM_ID = mm.PROM_ID),
mm.MEMMT_cmpgn,
mm.MEMMT_premium,
mm.MEMMT_gateway
FROMMember_Meeting mm
JOIN Member_MeetingProfile mmp ON mm.memmt_id = mmp.memmt_id
JOIN Meeting m...
March 10, 2014 at 2:38 pm
This is an option using 2 deletes. I'm assuming that you don't have gaps on mrid, if you have gaps, you'll need to create an artificial key.
DELETE r
FROM Readings r
JOIN...
March 10, 2014 at 2:27 pm
Koen Verbeeck (3/10/2014)
koti.raavi (3/10/2014)
The objective of this task is to create a report that will connect to the AdventureWorksDemo database on the...
March 10, 2014 at 2:00 pm
You're welcome. It's great to help, but I wonder if it's the best solution.
March 10, 2014 at 1:49 pm
What happens if a parent needs to have more than 10 children?
March 10, 2014 at 1:38 pm
I don't have much experience with MERGE either, but this might help you.
MERGE dbo.TestA AS trgt
USING dbo.TestB AS src
ON trgt.SomeAId = src.SomeBId AND trgt.SomeSubAId = src.SomeSubBId
WHEN MATCHED THEN
UPDATE SETSomeAValue =...
March 10, 2014 at 1:34 pm
The best option could be a calendar table that can establish those values without further calculations.
If you don't have it, or can't create it, here's a possible option. Be sure...
March 10, 2014 at 12:46 pm
My first choice was to change the SUBSTRING to the LIKE operator to make the query SARGable.
SELECT t0.accountId, SUM(t1.debit), SUM(t1.credit)
FROM accounts t0
LEFT JOIN accountMovs t1 ON t1.accountId LIKE t0.accountId...
March 10, 2014 at 11:07 am
Ed Wagner (3/10/2014)
Luis Cazares (3/10/2014)
I've been away for a week and seems a lot to me. I moved to a different area in my company and I've been...
March 10, 2014 at 10:20 am
Koen Verbeeck (3/10/2014)
Is there also a question?
Hint: read the links How to post forum questions[/url] and Need an answer? No, you need a question.
ps: just to shove you...
March 10, 2014 at 9:41 am
I agree with Sean. What will happen when you get to one thousand?
You could have an identity column and a computed column to show your alphanumeric ID if the characters...
March 10, 2014 at 9:36 am
Good Monday everyone,
I've been away for a week and seems a lot to me. I moved to a different area in my company and I've been adapting and learning (and...
March 10, 2014 at 9:32 am
Viewing 15 posts - 6,781 through 6,795 (of 8,731 total)