Women in Technology

Hear us Roar



Article:
  Self-Inflicted SQL
Subject:   sql
Date:   2006-03-10 04:10:10
From:   mmmmm1
plz reply the query that if we want to compare one column with in the same table with using update command.



(update categorydet e1,categorydet e2 set e1.cateid=1 where e1.cateid=e2.cateid)


is it correct or not .plz reply immidiately.
thanks

Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • Find Child
    2007-12-17 10:41:37  nv_thien [View]

    EmployeeID EmployeeName ManagerID
    61 Sue Smith (null)
    62 David Jones 61
    63 Troy Parker 62
    64 Claire 63
    65 Grover Rivers 64
    66 Grover Rivers 62
    67 Grover Rivers 63

    can you help me.
    i want to make procedure and pass @EmployeeID
    it'll return all childs

    *** for example 1 : GetChild 62
    it'll return to
    EmployeeID EmployeeName ManagerID
    63 Troy Parker 62
    64 Claire 63
    65 Grover Rivers 64

    66 Grover Rivers 62
    67 Grover Rivers 63

    *** for example 2 : GetChild 63
    it'll return to
    EmployeeID EmployeeName ManagerID

    64 Claire 63
    65 Grover Rivers 64
    67 Grover Rivers 63