Viewing 15 posts - 121 through 135 (of 294 total)
In my interview for my first full time DBA Position, I was bemused with the following; the interviewer, a in-house recruiter from the company where I was applying, said
"You've...
March 2, 2008 at 12:08 pm
Steve,
I took your first example and ran though my favorite online formatter and it came out as this:
select a.name
,b.address
...
March 2, 2008 at 11:19 am
First, sorry this has taken a while to get back to you and post.
Second, this is a function taken from a vbs script, but it should work in a DTS...
March 2, 2008 at 10:48 am
Yes Chris, that's exactly what I was chasing down. š
I mean I knew you could do this without a correlated sub-query, but I was struggling to prove...
February 29, 2008 at 8:49 am
Mark (2/28/2008)
select X.h_id, X.l_id, X.ton
from #t1 X
where not exists (select * from #t1 Y
...
February 28, 2008 at 10:46 am
Kev (the developer) has come up with this
select h_id, max(l_id), max(ton)
from #t1 X
where ton =
(
SELECT MAX(ton)
from #t1 Y
WHERE Y.h_id = X.h_id
)
group by h_id
February 28, 2008 at 10:16 am
Jeff Moden (2/28/2008)
David Jackson (2/28/2008)
where CreatedDate between dateadd(dd, datediff(dd,0,Getdate()),0) --midnight TODAY
and ...
February 28, 2008 at 7:48 am
This looks complex but will use your index.
where CreatedDate between dateadd(dd, datediff(dd,0,Getdate()),0) --midnight TODAY
and dateAdd(ss,-1,dateAdd(dd,1,dateadd(dd, datediff(dd,0,Getdate()),0))) --23:59:59 TODAY...
February 28, 2008 at 4:54 am
From a page on my site.
Personality Tests
Iām a sucker for these, which no doubt says something about my personality type, (Gullible?), so here are the results of a couple I...
February 26, 2008 at 10:33 am
without disagreeing with any of the above, I got bit by having a "list of holidays" table yesterday.
We have a table, unimaginatively called ms_holiday.
The structure is similar to
CREATE TABLE...
February 20, 2008 at 7:42 am
I would do this by iterating through the files collection of the folder object, and moving them after processing into a 'Processed' Folder. Is that possible?
If none of the...
February 19, 2008 at 7:20 am
Funny, I could remember the opening line, but had to look up the title of the book. š
The Gun Seller
by Hugh Laurie (of House M.D. Fame)
From memory
"Imagine you...
February 15, 2008 at 11:47 am
It's not the WAITFOR that is the problem, it's the Print statement.
Try
while 0=0
begin
raiserror ('Martin',0,1) with nowait
waitfor delay '00:00:05'
end
HTH
Dave J
February 13, 2008 at 8:45 am
Can you not add a where clause (or add to it) ?
SalesData.dbo.tbl_CYProcessedSales ps
INNER JOIN SalesData.dbo.vw_Product_CYProcessedSalesXref xr
ON ps.Prod = xr.Prod
AND ps.Acct = xr.AcctCode
INNER JOIN TxnRptg.dbo.vw_NetNewRevenueUnion nn
ON xr.BillingType = nn.BillingType
AND xr.ProdGroup =...
February 13, 2008 at 8:38 am
Try
update i
set i.INV_QTYONORDER = 0
from inventory i
full outer join inventory_supplier
on (i.INV_ID = inventory_supplier.INVSUP_INVID)
where i.INV_QTYONORDER <> 0
and inventory_supplier.INVSUP_SUPPNUM = 11
HTH
Dave J
February 11, 2008 at 1:15 pm
Viewing 15 posts - 121 through 135 (of 294 total)