April 10, 2012 at 12:50 pm
i am getting result like
item1 item2 item3
1 pen 34
1 pen null
how to remove the null one,i cannot place where is null
any other way
April 10, 2012 at 12:53 pm
hbtkp (4/10/2012)
i am getting result likeitem1 item2 item3
1 pen 34
1 pen null
how to remove the null one,i cannot place where is null
any other way
Again!!! :w00t:
Your question(s) is/are so so vague!
Please read the following article on the rules to be followed while posting!
http://www.sqlservercentral.com/articles/Best+Practices/61537/
April 10, 2012 at 12:54 pm
ya again, my req r change ,plz help
April 10, 2012 at 12:56 pm
hbtkp (4/10/2012)
i am getting result likeitem1 item2 item3
1 pen 34
1 pen null
how to remove the null one,i cannot place where is null
any other way
you are saying you cannot use a command like this, or you are not familiar with it?
DELETE FROM UNKNOWNTABLENAME
WHERE item1 = 1
AND item2 = 'pen'
AND item3 IS NULL
Lowell
April 10, 2012 at 2:41 pm
Lowell (4/10/2012)
hbtkp (4/10/2012)
i am getting result likeitem1 item2 item3
1 pen 34
1 pen null
how to remove the null one,i cannot place where is null
any other way
you are saying you cannot use a command like this, or you are not familiar with it?
DELETE FROM UNKNOWNTABLENAME
WHERE item1 = 1
AND item2 = 'pen'
AND item3 IS NULL
of course the question then becomes why is he getting the null. is it the result of an outer join? if so then he would need to find the underlying table that is causing the null. really to little info to tell what is going on.
to the OP please post DDL and Sample data along with the query you are running and you will get a much better answer.
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 11, 2012 at 9:23 am
I agree with ColdCoffee on the vagueness of the questions.
To the OP - you simple don't provide enough information to even begin answering your posts. Take a look at this article which will help explain.
http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
April 12, 2012 at 12:31 am
Works Perfectly for me with IS NULL.
Tried it like this :
Create Table Ex
(item1 int,
item2 varchar(5),
item3 int)
Insert Into Ex
Select 1, 'pen', 34
Union All
Select 1, 'pen', null
Select * From Ex
Delete From Ex
Where item3 IS NULL
Select * From Ex
and it worked perfectly.
Please post your DDL and sample data, if you still think this doesn't work.
Vinu Vijayan
April 12, 2012 at 7:25 am
vinu512 (4/12/2012)
Works Perfectly for me with IS NULL.Tried it like this :
Create Table Ex
(item1 int,
item2 varchar(5),
item3 int)
Insert Into Ex
Select 1, 'pen', 34
Union All
Select 1, 'pen', null
Select * From Ex
Delete From Ex
Where item3 IS NULL
Select * From Ex
and it worked perfectly.
Please post your DDL and sample data, if you still think this doesn't work.
Vinu Vijayan
we can do that and lowell all ready posted that
Lowell (4/10/2012)
hbtkp (4/10/2012)
i am getting result likeitem1 item2 item3
1 pen 34
1 pen null
how to remove the null one,i cannot place where is null
any other way
you are saying you cannot use a command like this, or you are not familiar with it?
DELETE FROM UNKNOWNTABLENAME
WHERE item1 = 1
AND item2 = 'pen'
AND item3 IS NULL
the question is vague and we are trying to get the op to answer why he wants to delete the nulls. if it is in a view or a join the query needs to be changed. if its in the table a delete statement is needed. there is just not enough information in the post.
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply