Forum Replies Created

Viewing 15 posts - 46 through 60 (of 95 total)

  • RE: Top 1000 of each group in a table

    -- EDIT: I just saw Gsquared's post, did not mean to double answer. My solution does not take into consideration ties or if a rep is there more than once....

  • RE: Column matching

    Hi jc

    A check constraint will limit what value can be inserted into a field, I am not sure this adresses your requirement correctly.

    I suggest first running an update to sync...

  • RE: DB2 Update problem

    Hi Nigel

    I dont have much experience with DB2, I was curious when I checked in on this thread and it ended up being a TSQL syntax problem. I cannot help...

  • RE: Why my Join does not work ?

    vmrao (3/24/2009)


    My following query yields 0 records but I expect 3 records as 'catalogItems' table has 3 records for categoryId:1 and active:1.

    SELECT catalogItems.itemId, catalogItems.itemDescription, itemDepartments.itemId...

  • RE: Advanced SQL Issue (maybe)

    russellmhirsch (3/24/2009)


    There would be a ton of duplicated data. Table D has 20-30 fields that aren't relevant to my query (so not included in the basic schema), but I don't...

  • RE: Advanced SQL Issue (maybe)

    russellmhirsch (3/24/2009)


    I am having a real problem visualizing the query to give me the above results.

    A quick tip or some pseudo code would be much appreciated. I just need some...

  • RE: Advanced SQL Issue (maybe)

    russellmhirsch (3/24/2009)


    Table D

    ----------

    ReportID AS INT

    ReportDate AS DATETIME

    -- A test report for which a product might have many reports over time with various test types attached.

    Table E

    ---------

    ReportID AS INT

    TestTypeID AS INT

    PassFail...

  • RE: DB2 Update problem

    nigel.fairbairn (3/24/2009)


    UPDATE A.ICSUDO

    SET A.ICSUDO = B.DELNO

    FROM MOVEX.DANIELS.MVXBDTA200.MPLIND A

    INNER JOIN GoodsIn.dbo.POIN B

    ON A.ICPUNO = B.PUNO

    WHERE A.ICWHLO = 'CLO' AND A.ICPUNO = '2218144' AND A.ICPNLI = '10'

    Hi Nigel,

    I am sorry...

  • RE: DB2 Update problem

    nigel.fairbairn (3/24/2009)


    SELECT DISTINCT A.ICSUDO, A.ICPUNO, A.ICPNLI,A.ICPNLX

    FROM MOVEX.DANIELS.MVXBDTA200.MPLIND A

    INNER JOIN GoodsIn.dbo.POIN B

    ON A.ICPUNO = B.PUNO

    WHERE A.ICWHLO = 'CLO' AND A.ICPUNO = B.PUNO

    ORDER BY A.ICPUNO, A.ICPNLX

    UPDATE A.ICSUDO

    SET A.ICSUDO =...

  • RE: Counting Specific Tables In a Database

    Hi again

    I saw Lowell's post after replying...

    How reliable is the count in sys.partitions because a solution based on that will definitly beat a cursor on speed!

  • RE: Counting Specific Tables In a Database

    Hi Michael

    This should get you started. It is a basic example, I did not implement any kind of error management so please test extensively!

    DECLARE@TableName SYSNAME

    DECLARE @sql VARCHAR(MAX)

    DECLARE @RowCount...

  • RE: Large Table Partitioning

    stevoid1970 (3/18/2009)


    ... Either a column partition (first digit of zip) or table partitioning by some date. Any advice on performance, pros, cons, etc...

    This question can not be...

  • RE: Two column interdependency query

    Good morning

    I was thinking of reorganizing your data into only two columns like this:

    --==== Temp table to simulate nike83's

    IF OBJECT_ID('tempdb..#MyTable') IS NOT NULL

    DROP TABLE #MyTable

    CREATE TABLE #MyTable (

    ID INT...

  • RE: Two column interdependency query

    Hi there

    This is a lot like a hierarchy except the circular references make the recursive query unusable.

    I would reorganize your records into a temporary table with two columns (Search Term,...

  • RE: ERROR 14274 in SQL Server 2005

    Very strange. You get this error when trying to delete a job I assume? If you run a profiler trace on msdb while doing the delete (or add, or update)...

Viewing 15 posts - 46 through 60 (of 95 total)