Manath Pathana

Manath Pathana

  • NA
  • 129
  • 0

How to Select Query

Aug 27 2009 11:55 PM
Hi all can help for select data in Table that have data below:

ID     Level      Code
1        1          1-0-00-00-000
2        2          1-1-00-00-000
3        3          1-1-01-00-000
4        4          1-1-01-01-000
5        5          1-1-01-01-001
6        5          1-1-01-01-002
7        5          1-1-01-01-003
8        2          1-2-00-00-000
9        3          1-2-01-00-000
10      4          1-2-01-01-000

In this table i want select data that show data below:

ID        Level           Code
1           1                 1
2           2                 1-1
3           3                 1-1-01
4           4                 1-1-01-01
5           5                 1-1-01-01-001
6           5                 1-1-01-01-002
7           5                 1-1-01-01-003
8           2                 1-2
9           3                 1-2-01
10         4                 1-2-01-01

i try to select but can not and i want take
this query  show on treeview
i don't want show code have along code only
show code by Level
if Level 1 it show only 1 and Level2 only show 1-1
and other Level it show by symbol(-)
thank Advance




Answers (2)