Jump to content

How can I get some data, it's a logical question


joymis

Recommended Posts

Hi all,

I have a data like this,

 

dept_no under_dept level

01000 01000 0

01010 01000 1

03000 01000 1

03010 03000 2

03016 03010 3

03020 03000 2

03050 03000 2

03056 03050 3

91020 91020 1

 

now I have a var $x = 01000, then I should get all data row,

 

when $x = 03000, then I should get dept_no like '03%' row

 

when $x = 03010, then I should only get dept_no = 03010 and 03016 row

 

does anyone have good idea can tell me how can I do?

 

thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...