Jump to content

Please help query


Guest jacky.li
 Share

Recommended Posts

Guest jacky.li

Dear all,I have 5 tables. i would like to find out that the same datas appear more then 3 times.For example:Table1 Table2 Table3 Table4 Table5data01 data02 data04 data02 data01data03 data01 data01 data07 data08data07 data07 data02 data08 data03PS. every data in the same table is unique, all table have 1 column only, data type is nvarcharthe output should be:All data appear more then 4 times(data01) should be inserted into a new tables call [MoreThen4]All data appear more then 3 times (data02)(data07)should be inserted into a new tables call [MoreThen3]Is it possible? Please give me some suggestion

Link to comment
Share on other sites

shouldn't data01 be added to morethan3 as well????I am not sure why you want to do this and why you are creating tables with only one column???Are you just experimenting or does this have a purpose??? From what I understand...I think you should rethink your database structure.If you tell me what you need to do and why I can suggest a good structure and method for acheiving it.I think what you want to do instead of 'moving' the data to a new table is create 2 views to accomidate your needs.

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
 Share

×
×
  • Create New...