Viewing 15 posts - 766 through 780 (of 1,034 total)
Bob Hovious 24601 (10/12/2009)
GROUP BY convert(varchar(6),getdate(),112)
I'd have gone
GROUP BY DATEADD(dd,datediff(dd,0,cv.Dischargedtm),0)
but that's because I hate to convert pretty things like datetimes into varchars...
October 12, 2009 at 9:46 am
Grinja (10/12/2009)
The result of Value1/Value2 is 129200.84577771904321395533
What I would like is to fit this into a Decimal(18,17)
The following works:
CAST(Value1/Value2 AS DECIMAL(18,12))
But the following gives...
October 12, 2009 at 6:59 am
Couldn't SSIS handle this with little to no trouble? With a little work you can even join the tables together in it...
October 9, 2009 at 10:20 am
WayneS (10/9/2009)
October 9, 2009 at 7:06 am
Write an INSTEAD OF DELETE trigger that passes the ID to a stored proc that iterates through the constraints on the table and checks them via some nasty cursor?
October 9, 2009 at 6:59 am
Trust me when I say this.
Your users do not want to delete customers. Especially not the ones with sales information that depends on the customer info.
Later on somebody is...
October 8, 2009 at 2:56 pm
Well if you want a bad approach and want to delete the orders, shipments, invoices, etc...
Change the Foreign key to ON DELETE CASCADE
That will clean it up.
Otherwise testing the tables...
October 8, 2009 at 2:54 pm
adams.squared (10/8/2009)
IF @type='Auto'
BEGIN
Select *
From Table
Where Class in ('RD','MD','RS')
END
IF @type='Industrial'
BEGIN
Select *
From Table
Where Class in ('ID','IW','JP')
END
ELSE
BEGIN
Select *
From...
October 8, 2009 at 2:48 pm
Thanks Jeff,
Now I get it... I was so confused to see the seek because of the search by apples that I didn't pay attention to the 78% of the sort......
October 8, 2009 at 10:51 am
I definately need Jeff to explain because I've confused myself.
I made a (VERY) limited test.
create table #inventory(itemcode varchar(10),startlevel int, endlevel int, cost money)
create index funfun on #inventory(itemcode,startlevel,endlevel,cost)
insert into #inventory
select
'Apples',
100,
50,
.35
UNION ALL
SELECT
'Bannanas',
75,
50,
.25
UNION...
October 8, 2009 at 9:43 am
I'd leave Jeff to explain exactly because I sometimes get confused as to why SCANs creep up in situations like this but.
As I recall the order of operations in a...
October 8, 2009 at 9:35 am
It's not the Order by so much as the ABS function in the Order by I'm pretty sure.
October 8, 2009 at 9:16 am
Setiv,
also open Tools -> Options -> Results to text and set the maximum length to a value higher than 256. I set mine to 4000 which works wonderfully 🙂
October 7, 2009 at 10:52 am
Sanjay is right.... it got me because I wasn't reading clearly.
<customersa customers.id="6">
Is not the same as
<customers customers.id="6">
🙂 Good question... shows me why I hate xml as much...
October 7, 2009 at 9:48 am
Viewing 15 posts - 766 through 780 (of 1,034 total)