Viewing 15 posts - 181 through 195 (of 335 total)
Sounds like you want a cartesian product. This is from books online.
A cross join that does not have a WHERE clause produces the Cartesian product of the...
January 3, 2006 at 9:58 am
I don't think there is a need for a join. If a shipment isn't complete then it has a lowval date and that excludes all items from that shipment in...
December 30, 2005 at 7:42 am
How about something like this:
select distinct shipment, MAX(scandate) ScanD
from carton
where scandate = dateadd(dd, datediff(dd,0,Getdate()),0)-1
and shipment not in (select shipment from carton where scandate <> '12/30/1899')
group by shipment
order by shipment
Tom
December 29, 2005 at 8:37 am
Varchar() trims blanks from the right of the data. Ie. 'tom ' is stored as 'tom' but ' tom' is ' tom'.
Tom
December 29, 2005 at 8:15 am
I found this in bol.
Because the leaf level of a clustered index and its data pages are the same by definition, creating a clustered index and using the ON filegroup...
December 28, 2005 at 8:06 am
It's been a while since I rebuilt/built a big index but the general rule of thumb is that it will take double the size of the table to build the...
December 28, 2005 at 8:05 am
Write a trigger that doesn't allow inserts. Instead of trigger.
Tom
December 27, 2005 at 12:44 pm
I'm not sure what you have tried, but proper indexes(usefulness and defragged), updated statistics, trace of the queries being executed against the database, bad execution plan on a query. Someone...
December 16, 2005 at 12:31 pm
You can have the original column and use that column in a case statement else where in the query. I moved credit to the end and left the original slbtyp...
December 14, 2005 at 9:41 pm
INSERT INTO INVTEST ( SLCTK1, SLCTK2, SLBTYP, SLBJOB, SLBCUS,
SLBFLG, SLBDNM, SLBDES, CREDIT ) SELECT SLPBXLT.SLCTK1,
SLPBXLT.SLCTK2, case SLPBXLT.SLBTYP when 7 then 'CR'
when 8 then 'CR'
when 9 then...
December 13, 2005 at 4:30 pm
case SLPBXLT.SLBTYP when 7 then 'CR'
when 8 then 'CR'
when 9 then 'CR'
else 'not credit' end Credit
December 13, 2005 at 1:25 pm
You'll need to setup all of the users with the same spids on the test server. On my test/production machines, I moved all of the logins with the corresponding sids. When...
December 13, 2005 at 1:17 pm
What database system do work on that allows you to take a backup and compress the file contents. I work with several other systems (oracle, db2) and what I backup is...
December 6, 2005 at 1:33 pm
I'll add something to this also. I partially base the selection of my clustered indexes on my reindexing strategy. I've got some indexes that I can reindex every night, so...
August 25, 2005 at 12:59 pm
In the past when I have had errors when running dbcc checkdb, they seemed to be related to pending disk i/o problems. You might look at the hardware and see if...
August 25, 2005 at 12:48 pm
Viewing 15 posts - 181 through 195 (of 335 total)