Forum Replies Created

Viewing 15 posts - 181 through 195 (of 335 total)

  • RE: Result from 2 tables with no link

    Sounds like you want a cartesian product.  This is from books online.

    Using Cross Joins

    A cross join that does not have a WHERE clause produces the Cartesian product of the...

  • RE: Another user trying get around a TEMP table

    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...

  • RE: Another user trying get around a TEMP table

    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

     

  • RE: Data Value

    Varchar() trims blanks from the right of the data.  Ie. 'tom   ' is stored as 'tom' but '   tom' is '   tom'.

    Tom

  • RE: Question about ENORMOUS transaction log

    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...

  • RE: Question about ENORMOUS transaction log

    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...

  • RE: HOW TO RESTRIC INSERT IN A TABLE

    Write a trigger that doesn't allow inserts.  Instead of trigger.

    Tom

  • RE: Help understanding Page Faults/sec results

    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...

  • RE: Insert into question

    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...

  • RE: Insert into question

    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...

  • RE: Insert into question

    case SLPBXLT.SLBTYP when 7 then 'CR'

                        when 8 then 'CR'

                        when 9 then 'CR'

    else 'not credit' end Credit

     

  • RE: restore datbase problem

    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...

  • RE: How do I restore a DB that wants 6X more space then it needs?

    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...

  • RE: Indexing

    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...

  • RE: Possibility of indexdefrag causing table corruption??

    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...

Viewing 15 posts - 181 through 195 (of 335 total)