Forum Replies Created

Viewing 15 posts - 91 through 105 (of 110 total)

  • RE: Help required in SQL Statement

    Can it be assumed that [emp_no + emp_date] will make all records unique?

  • RE: Help required in SQL Statement

    How to decide which record becomes the first set of (emp_status, emp_time) and which bocomes the 2nd?

    Which field(s) makes the unique key of sample data?

  • RE: Is it possible to do.....Query help

    Try

    DECLARE @T TABLE (Invoice char(5), Item char(3), Quantity int)

    INSERT INTO @T VALUES ('A1234', 'ABC', 5)

    INSERT INTO @T VALUES ('A1234', 'MMM', 9)

    INSERT INTO @T VALUES ('A1234', 'XYZ', 3)

    DECLARE @N TABLE (N...

  • RE: Tree View Data Report

    Change

    SELECT Level, PkID, Name FROM @Result ORDER BY Sequence

    to

    SELECT Level, GroupID, Name FROM @Result ORDER BY Sequence

    K. Matsumura

  • RE: Update table query needed

    Try

    DECLARE @a TABLE ([DateTime] datetime, [Order] int, Post int, Lot int, Temp1 int)

    DECLARE @b-2 TABLE (StartDate datetime, EndDate datetime, [Order] int, Post int, Lot int, Stat...

  • RE: Tree View Data Report

    How about something like:

    DECLARE @Group TABLE (PkID int NOT NULL, Name varchar (30) NULL, Type int NULL, GroupID int NULL)

    DECLARE @product TABLE (PkID int NOT NULL, Name varchar...

  • RE: Sequential Ordering of a Column

    Hi, Jeff,

    I would like to study on "triangular join."

    Would you point me to right direction?

    Where can get some information?

  • RE: Sequential Ordering of a Column

    UPDATE A

    SET A.SortOrder =

    (SELECT COUNT(*) FROM tbl_Names Z WHERE Z.SortOrder <= A.SortOrder)

    FROM tbl_Names A

  • RE: Backup db vs Generate SQL Script?

    Generating script and running it does not copy any data.

    It creates everything but all tables have no records.

  • RE: Tree View Data Report

    SELECT * FROM Product A

    LEFT OUTER JOIN Details B

    ON B.[???] = A.[???]

    [???] should be the fields linking two tables.

    If all records in Product have records in Details

    or

    You don't have to...

  • RE: Tree View Data Report

    What do you mean by "Tree View" and "Report Format?"

  • RE: Query

    Then why you don't use that field to filter records?

  • RE: Select distinct

    What is the unique key of the table?

  • RE: Query

    We are all asking you if you have a datetime columns in you table.

  • RE: embed select statment within a insert statement?

    Try

    insert into table1

    (

    report_date,

    employee

    )

    select rpt_dt, (select emp from employees where emp = id)

    from reports where rpt_dt = somevalue

Viewing 15 posts - 91 through 105 (of 110 total)