Viewing 15 posts - 2,431 through 2,445 (of 5,843 total)
Please provide the expected output for the sample data you provided. Also, you may want to include a second PAT worth of data so we can understand what you...
August 21, 2013 at 3:04 pm
lisa.ogle (8/21/2013)
So I should just use Join then all the way? Thanks I will try that.
NO, I did NOT say that!! 🙂 You should use TSQL as necessary...
August 21, 2013 at 2:57 pm
See if this helps:
CREATE TABLE dbo.#responses (serial tinyint NOT NULL)
CREATE TABLE dbo.#otherdata2 (serial tinyint NOT NULL, variableid tinyint NOT NULL, TextVal varchar(10) NULL)
INSERT dbo.#responses VALUES (1)
INSERT dbo.#responses VALUES (2)
INSERT dbo.#otherdata2...
August 21, 2013 at 2:56 pm
Let me try to put together a quickie demo to see if what I am thinking will work in this case. I have come across your situation before so...
August 21, 2013 at 2:16 pm
One question: is the numeric value that indicates each "type" of value fixed? If so I think I can come up with something to get what you need in...
August 21, 2013 at 2:08 pm
You want this one Sean?!? You are WELCOME to it!! 😛
August 21, 2013 at 2:00 pm
Sean Lange (8/21/2013)
TheSQLGuru (8/21/2013)
I would have appreciated a warning to take a deep breath and be sitting down before I opened up that file and saw the query therein!! :w00t:
EAV...
August 21, 2013 at 1:59 pm
Looks like some very ugly EAV crap..., er, design. 😀
August 21, 2013 at 1:58 pm
BTW, I don't need (or want) any type of production data. Simple dummy stuff that matches requirements is best...
August 21, 2013 at 1:56 pm
I would have appreciated a warning to take a deep breath and be sitting down before I opened up that file and saw the query therein!! :w00t:
August 21, 2013 at 1:55 pm
erikd (8/21/2013)
August 21, 2013 at 1:06 pm
aykut canturk (8/21/2013)
I'm just confused about varchar and nvarchar types. I learned that nvarchar holds unicode character sets and varchar cannnot. varchar doubles the size. thats fine.
What I confused...
August 21, 2013 at 1:04 pm
lisa.ogle (8/21/2013)
Select Distinct
M.Memid,
M.Fullname,
E.enttype,
EK.planid,
Ek.Carriermemid HICN,
EK.effdate EffectiveDate,
BP.upid ContractPBP,
PA.CreateDate,
PA.Comment,
PA.[Source],
PA.CompleteDate
From dbo.Member M
Left Join dbo.Entity E
on E.entid=M.entityid
Join dbo.EnrollKeys Ek
on EK.Memid=M.Memid
Join dbo.BenefitPlan BP
on BP.Planid=EK.planID
...
August 21, 2013 at 1:03 pm
Even IF your 2 queries are logically equivalent (which I am not going to bother to figure out), the optimizer is just like any other piece of software. It...
August 21, 2013 at 12:14 pm
erikd (8/21/2013)
A bit of a general question:
I have a query with 28 LEFT JOINS. 20 of them join one table to the original query in order to break information out...
August 21, 2013 at 12:10 pm
Viewing 15 posts - 2,431 through 2,445 (of 5,843 total)