Viewing 15 posts - 10,606 through 10,620 (of 13,879 total)
Aha: XMLSQLNinja - just what the doctor ordered! 🙂
That's a cool solution - can you explain how it works?
And if you've got time, perhaps you could also have a go...
July 24, 2012 at 1:49 am
Beat me! And I missed the IsNull on ColC, oops.
July 24, 2012 at 1:42 am
You need a nested if...then construction along the lines of
IsNull(ColA)? (IsNull(ColB)? ColC: ColB) : ColA
July 24, 2012 at 1:41 am
forsqlserver (7/23/2012)
I have lakh of rows to be deleted in this table it will full my log file...I want to use top in delete statement..
It's about time you started thinking...
July 23, 2012 at 8:08 am
Did you add your variable to the Script Task's 'ReadOnlyVariables' property?
July 23, 2012 at 6:38 am
Are you trying to have dynamic columns in your data flow?
If not, what is the purpose of the variable?
July 23, 2012 at 6:10 am
forsqlserver (7/23/2012)
I am using 2008 R2 Std edtn.I think it is giving error due to brackets..
Indeed. Another version:
;with Remove
as (
select a.c1
from t1580 a
except
select a.c1
...
July 23, 2012 at 5:56 am
Something like this (untested)?
;with Remove
as (
select a.c1
from t1580 a
)
except
(
select a.c1
from T1580 a
inner join T2115 b on a.C301289100 =...
July 23, 2012 at 5:06 am
forsqlserver (7/23/2012)
delete a
from T1580 a
inner join T2115 b on a.C301289100 = b.C1000000161
and b.C7 < 5
this query will delete my actual data I want to...
July 23, 2012 at 4:43 am
But now I am confused, and I hope your query is what he wants
Haha, caveat emptor as always.
July 23, 2012 at 4:37 am
forsqlserver (7/23/2012)
Its giving syntax error,I have changed the query with my actual can u help on that.Can we use join in delete statement.
delete a
from T1580 a
inner join T2115 b on...
July 23, 2012 at 3:36 am
Kingston Dhasian (7/23/2012)
I hope the below mentioned query will satisfy your request
DELETEordFROMOrders ord
LEFT OUTER JOINCustomers c
ONord.CustomerID = c.CustomerID
ANDc.FirstName = 'vikash'
WHEREc.CustomerID IS NULL
Edit: Edited the incorrect code
Not sure I understand the...
July 23, 2012 at 3:04 am
Please explain what you are trying to do. Newid() is a SQL thing and a script task is not. Combining them can be done, but not without trips to the...
July 20, 2012 at 11:32 am
Gazareth (7/20/2012)
anthony.green (7/20/2012)
Good spot Phil. I shall ammend.Amend? :hehe:
i assumed that was deliberate!
July 20, 2012 at 9:19 am
That would not capture updates to existing data.
July 20, 2012 at 9:01 am
Viewing 15 posts - 10,606 through 10,620 (of 13,879 total)