Advertisement

04.04.2008 at 08:06AM PDT, ID: 23296270
[x]
Attachment Details

Not like in sql query

Asked by running32 in SQL Query Syntax

I need to get all the results of an address not like the other.  The problem is that oen access may be 1234 Maple Street and the other is 1234 Maple Street #B.  I do not want this to show up in the result.  How I can I fix my query to not show these.  thanksStart Free Trial
1:
SELECT chart, straddress, street FROM [test].dtest.dbo.PAT_BASE as p inner join tblPatient as pat on p.chart = pat.strPatientid inner join tblhousehold as h on pat.lnghouseid = h.lnghouseid inner join [testDENTRIX].dtest.dbo.BASE as addr on p.addressid = addr.addressid where date_changed > getdate() -1 and chart <> ' ' and street+ '%' not like  straddress + '%'
[+][-]04.04.2008 at 08:11AM PDT, ID: 21282576

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: SQL Query Syntax
Sign Up Now!
Solution Provided By: ee_rlee
Participating Experts: 1
Solution Grade: A
 
 
[+][-]04.04.2008 at 08:15AM PDT, ID: 21282608

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906