Viewing 15 posts - 136 through 150 (of 219 total)
After fixing your view, and looking a bit closer at the data in this sample code, your problem may also be in the how you are joining the data together.
If...
May 25, 2012 at 11:31 am
--check whether the source has some duplicate value..
SELECT ID, COUNT(st.ID)
FROM
sourcetable st
GROUP BY. stID
HAVING COUNT(st.ID) > 1
--check whether there is issue with the join clause somehow to retrieve dup data
SELECT...
May 25, 2012 at 8:06 am
{RDH_Detailed_Aged_Creditors.Due Date}>dateadd('d',0,currentdate)
OR {RDH_Detailed_Aged_Creditors.Due Date}>dateadd('d',-30,currentdate)
I am not sure what you are trying to achieve .But above OR is redudant..
May 25, 2012 at 7:48 am
LEFT OUTER JOIN
tblAdCategory ac ON ac.CategoryId =sb.CategoryId
--inner join
-- tblClassified csf
-- on csf.ClassifiedId=t.ClassifiedId
where
s.Locality=@Location
and
s.AdType=@AdType
and
sb.CategoryId= @CategoryId
Why are you not using this condition in the select statement which is inserting...
May 25, 2012 at 1:14 am
I'm not going to say your wrong. But I will say that I think the problem has been twisted and trounced that it's not even the same problem anymore....
Select...
May 24, 2012 at 10:01 pm
HOLY Recursive Statement Batman!!
I just noticed that the Joins don't have the NOLOCK hint, but the views all DO have the no lock hint.... so by switching to the View,...
May 24, 2012 at 2:15 pm
I'm getting really lost here.
I don't use the ISDELETED predicates in the where clause when I use the view. It's in the view so I don't need to.
these two...
May 24, 2012 at 2:00 pm
Then for the record he is having issue has isdeleted as 1..
with view it will return row..but with table.. just no row...
Simple thing is that when he is using...
May 24, 2012 at 1:53 pm
When the query was access the tables directly, they needed to select only the records where ISDELETED was NULL or 0, correct? Therefor the isnull(ISDELETED,0) = 0 for each table...
May 24, 2012 at 1:43 pm
Okay, lost. The view will not have any records where ISDELETED = 1. This query is having all table references changed to use views built over the tables. These views...
May 24, 2012 at 1:31 pm
drop table a
go
drop table b
go
drop view myvwab
go
create table a ( id int)
go
create table b (id int,isdeleted int null)
go
insert into a select 1
go
insert into a select 2
go
insert into b select 1,1
go
create...
May 24, 2012 at 1:29 pm
suppose one of your record has isdeleted = 1
when table will be joined... suppose joining column is presnet in mani table as well in this table. Then isdeleted will be...
May 24, 2012 at 1:20 pm
This is the problem in where clause
AND ISNULL(CHILD.ISDELETED,0) = 0
Also why to use left join when you are using the where clause....
May 24, 2012 at 1:08 pm
What abt the main query where it is showing diff results..
May 24, 2012 at 12:56 pm
Viewing 15 posts - 136 through 150 (of 219 total)