How to select attribute specific values? [on hold]How to Select by Attributes on features sharing common value?What is a SQL Query to all values in a column with Select by Attribute in ArcGIS?How to select different values from two columns through Select By Attributes?How to assign a new name for values selected from two columns?Select by attributes is not selecting correctlySelect by attributes alternativeDeleting only specific attributes (columns) by name in an attribute table in QGIS with PythonSelect by character limitAutomatically select a feature from another layer based on shared attribute in QGISSelecting by attribute by specific characters fields

Should I cover my bicycle overnight while bikepacking?

Extract rows of a table, that include less than x NULLs

Which is the best way to check return result?

What exploit Are these user agents trying to use?

Is this a hacking script in function.php?

How to add frame around section using titlesec?

Does the Idaho Potato Commission associate potato skins with healthy eating?

Forming a German sentence with/without the verb at the end

Forgetting the musical notes while performing in concert

What is the most common color to indicate the input-field is disabled?

Plagiarism or not?

Unlock My Phone! February 2018

Personal Teleportation: From Rags to Riches

How do I gain back my faith in my PhD degree?

What mechanic is there to disable a threat instead of killing it?

Could the museum Saturn V's be refitted for one more flight?

Can I run a new neutral wire to repair a broken circuit?

How dangerous is XSS?

Bullying boss launched a smear campaign and made me unemployable

Valid term from quadratic sequence?

What type of content (depth/breadth) is expected for a short presentation for Asst Professor interview in the UK?

How can I deal with my CEO asking me to hire someone with a higher salary than me, a co-founder?

Ambiguity in the definition of entropy

What method can I use to design a dungeon difficult enough that the PCs can't make it through without killing them?



How to select attribute specific values? [on hold]


How to Select by Attributes on features sharing common value?What is a SQL Query to all values in a column with Select by Attribute in ArcGIS?How to select different values from two columns through Select By Attributes?How to assign a new name for values selected from two columns?Select by attributes is not selecting correctlySelect by attributes alternativeDeleting only specific attributes (columns) by name in an attribute table in QGIS with PythonSelect by character limitAutomatically select a feature from another layer based on shared attribute in QGISSelecting by attribute by specific characters fields













-1















I have table like



enter image description here



I need to select if R_no values is more than two same values and in ANGLE select first three numbers common and more than three attributes is same



enter image description here



Finally I want to select like blue highlighted attributes.










share|improve this question









New contributor




Rakesh Reddy Posham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as unclear what you're asking by ahmadhanb, Vince, Hornbydd, Erik, csk 2 days ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


















  • To select multiple instances of R_no: summary statistics with a summary field of FID/OBJECTID case field of R_no to create a table with counts, optionally use table select where count_FID > 1 to create a new table with just R_no values that have a count of more than 1 instance then join by attributes R_no to R_no in the summary table extract and then finally select where count_FID > 1, right click on the layer and choose create layer from selected features and then remove the join on the selection layer - this will leave you with a layer where all the rows have a instance of R_no more than 1.

    – Michael Stimson
    2 days ago












  • thanks sir, but it is to lengthy. And what about Angle select starting three letters same attributes if more than three values.

    – Rakesh Reddy Posham
    2 days ago












  • Again, you can use the same technique to select from the selected layer but this could be simplified with python and dictionaries using a search cursor then iterating the first dictionary by key to select the matching R_no, ANGLE and DIST; the two-from-three duplication match can be evaluated and selection added to an existing selection (starting from no selection) of a layer. This is fairly advanced python, do you have reasonable python ability?

    – Michael Stimson
    2 days ago











  • i don't have knowledge about python so could u please give VB Script querry for above.

    – Rakesh Reddy Posham
    2 days ago












  • I don't know VB Script, VB.net with ArcObjects I do know but that's far too much to write for a single question. Use Model Builder if you want this to be repeatable and save into a toolbox.

    – Michael Stimson
    2 days ago















-1















I have table like



enter image description here



I need to select if R_no values is more than two same values and in ANGLE select first three numbers common and more than three attributes is same



enter image description here



Finally I want to select like blue highlighted attributes.










share|improve this question









New contributor




Rakesh Reddy Posham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as unclear what you're asking by ahmadhanb, Vince, Hornbydd, Erik, csk 2 days ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


















  • To select multiple instances of R_no: summary statistics with a summary field of FID/OBJECTID case field of R_no to create a table with counts, optionally use table select where count_FID > 1 to create a new table with just R_no values that have a count of more than 1 instance then join by attributes R_no to R_no in the summary table extract and then finally select where count_FID > 1, right click on the layer and choose create layer from selected features and then remove the join on the selection layer - this will leave you with a layer where all the rows have a instance of R_no more than 1.

    – Michael Stimson
    2 days ago












  • thanks sir, but it is to lengthy. And what about Angle select starting three letters same attributes if more than three values.

    – Rakesh Reddy Posham
    2 days ago












  • Again, you can use the same technique to select from the selected layer but this could be simplified with python and dictionaries using a search cursor then iterating the first dictionary by key to select the matching R_no, ANGLE and DIST; the two-from-three duplication match can be evaluated and selection added to an existing selection (starting from no selection) of a layer. This is fairly advanced python, do you have reasonable python ability?

    – Michael Stimson
    2 days ago











  • i don't have knowledge about python so could u please give VB Script querry for above.

    – Rakesh Reddy Posham
    2 days ago












  • I don't know VB Script, VB.net with ArcObjects I do know but that's far too much to write for a single question. Use Model Builder if you want this to be repeatable and save into a toolbox.

    – Michael Stimson
    2 days ago













-1












-1








-1








I have table like



enter image description here



I need to select if R_no values is more than two same values and in ANGLE select first three numbers common and more than three attributes is same



enter image description here



Finally I want to select like blue highlighted attributes.










share|improve this question









New contributor




Rakesh Reddy Posham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I have table like



enter image description here



I need to select if R_no values is more than two same values and in ANGLE select first three numbers common and more than three attributes is same



enter image description here



Finally I want to select like blue highlighted attributes.







arcgis-desktop arcgis-10.3 attribute-table select-by-attribute select






share|improve this question









New contributor




Rakesh Reddy Posham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Rakesh Reddy Posham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 2 days ago









Vince

14.8k32849




14.8k32849






New contributor




Rakesh Reddy Posham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









Rakesh Reddy PoshamRakesh Reddy Posham

1




1




New contributor




Rakesh Reddy Posham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Rakesh Reddy Posham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Rakesh Reddy Posham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




put on hold as unclear what you're asking by ahmadhanb, Vince, Hornbydd, Erik, csk 2 days ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









put on hold as unclear what you're asking by ahmadhanb, Vince, Hornbydd, Erik, csk 2 days ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • To select multiple instances of R_no: summary statistics with a summary field of FID/OBJECTID case field of R_no to create a table with counts, optionally use table select where count_FID > 1 to create a new table with just R_no values that have a count of more than 1 instance then join by attributes R_no to R_no in the summary table extract and then finally select where count_FID > 1, right click on the layer and choose create layer from selected features and then remove the join on the selection layer - this will leave you with a layer where all the rows have a instance of R_no more than 1.

    – Michael Stimson
    2 days ago












  • thanks sir, but it is to lengthy. And what about Angle select starting three letters same attributes if more than three values.

    – Rakesh Reddy Posham
    2 days ago












  • Again, you can use the same technique to select from the selected layer but this could be simplified with python and dictionaries using a search cursor then iterating the first dictionary by key to select the matching R_no, ANGLE and DIST; the two-from-three duplication match can be evaluated and selection added to an existing selection (starting from no selection) of a layer. This is fairly advanced python, do you have reasonable python ability?

    – Michael Stimson
    2 days ago











  • i don't have knowledge about python so could u please give VB Script querry for above.

    – Rakesh Reddy Posham
    2 days ago












  • I don't know VB Script, VB.net with ArcObjects I do know but that's far too much to write for a single question. Use Model Builder if you want this to be repeatable and save into a toolbox.

    – Michael Stimson
    2 days ago

















  • To select multiple instances of R_no: summary statistics with a summary field of FID/OBJECTID case field of R_no to create a table with counts, optionally use table select where count_FID > 1 to create a new table with just R_no values that have a count of more than 1 instance then join by attributes R_no to R_no in the summary table extract and then finally select where count_FID > 1, right click on the layer and choose create layer from selected features and then remove the join on the selection layer - this will leave you with a layer where all the rows have a instance of R_no more than 1.

    – Michael Stimson
    2 days ago












  • thanks sir, but it is to lengthy. And what about Angle select starting three letters same attributes if more than three values.

    – Rakesh Reddy Posham
    2 days ago












  • Again, you can use the same technique to select from the selected layer but this could be simplified with python and dictionaries using a search cursor then iterating the first dictionary by key to select the matching R_no, ANGLE and DIST; the two-from-three duplication match can be evaluated and selection added to an existing selection (starting from no selection) of a layer. This is fairly advanced python, do you have reasonable python ability?

    – Michael Stimson
    2 days ago











  • i don't have knowledge about python so could u please give VB Script querry for above.

    – Rakesh Reddy Posham
    2 days ago












  • I don't know VB Script, VB.net with ArcObjects I do know but that's far too much to write for a single question. Use Model Builder if you want this to be repeatable and save into a toolbox.

    – Michael Stimson
    2 days ago
















To select multiple instances of R_no: summary statistics with a summary field of FID/OBJECTID case field of R_no to create a table with counts, optionally use table select where count_FID > 1 to create a new table with just R_no values that have a count of more than 1 instance then join by attributes R_no to R_no in the summary table extract and then finally select where count_FID > 1, right click on the layer and choose create layer from selected features and then remove the join on the selection layer - this will leave you with a layer where all the rows have a instance of R_no more than 1.

– Michael Stimson
2 days ago






To select multiple instances of R_no: summary statistics with a summary field of FID/OBJECTID case field of R_no to create a table with counts, optionally use table select where count_FID > 1 to create a new table with just R_no values that have a count of more than 1 instance then join by attributes R_no to R_no in the summary table extract and then finally select where count_FID > 1, right click on the layer and choose create layer from selected features and then remove the join on the selection layer - this will leave you with a layer where all the rows have a instance of R_no more than 1.

– Michael Stimson
2 days ago














thanks sir, but it is to lengthy. And what about Angle select starting three letters same attributes if more than three values.

– Rakesh Reddy Posham
2 days ago






thanks sir, but it is to lengthy. And what about Angle select starting three letters same attributes if more than three values.

– Rakesh Reddy Posham
2 days ago














Again, you can use the same technique to select from the selected layer but this could be simplified with python and dictionaries using a search cursor then iterating the first dictionary by key to select the matching R_no, ANGLE and DIST; the two-from-three duplication match can be evaluated and selection added to an existing selection (starting from no selection) of a layer. This is fairly advanced python, do you have reasonable python ability?

– Michael Stimson
2 days ago





Again, you can use the same technique to select from the selected layer but this could be simplified with python and dictionaries using a search cursor then iterating the first dictionary by key to select the matching R_no, ANGLE and DIST; the two-from-three duplication match can be evaluated and selection added to an existing selection (starting from no selection) of a layer. This is fairly advanced python, do you have reasonable python ability?

– Michael Stimson
2 days ago













i don't have knowledge about python so could u please give VB Script querry for above.

– Rakesh Reddy Posham
2 days ago






i don't have knowledge about python so could u please give VB Script querry for above.

– Rakesh Reddy Posham
2 days ago














I don't know VB Script, VB.net with ArcObjects I do know but that's far too much to write for a single question. Use Model Builder if you want this to be repeatable and save into a toolbox.

– Michael Stimson
2 days ago





I don't know VB Script, VB.net with ArcObjects I do know but that's far too much to write for a single question. Use Model Builder if you want this to be repeatable and save into a toolbox.

– Michael Stimson
2 days ago










1 Answer
1






active

oldest

votes


















1














Your question is a bit unclear. If you want to select first three rows if number of features in each R_no group is larger than two, code below should work. Execute in python window with the table/feature class added to the map. Im using collections.defaultdict to Group.



import arcpy
from collections import defaultdict

layer = 'somelayeraddedtoArcMap' #Change
group_field = 'R_no' #Change

oid_field = arcpy.Describe(layer).OIDFieldName
d = defaultdict(list)

#Group oids together by Group_field
with arcpy.da.SearchCursor(layer,[group_field, oid_field]) as cursor:
for group, oids in cursor:
d[group].append(oids)

oids_to_select = []
for group, oids in d.iteritems(): #d.items() in python3/ArcGIS Pro
if len(oids)>2: #if more than 2 in group
oids_to_select.extend(oids[:3]) #:3 add first Three oids to list

sql = "0 IN1".format(arcpy.AddFieldDelimiters(layer, oid_field), tuple(oids_to_select))
arcpy.SelectLayerByAttribute_management(in_layer_or_view=layer,
where_clause=sql)





share|improve this answer































    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Your question is a bit unclear. If you want to select first three rows if number of features in each R_no group is larger than two, code below should work. Execute in python window with the table/feature class added to the map. Im using collections.defaultdict to Group.



    import arcpy
    from collections import defaultdict

    layer = 'somelayeraddedtoArcMap' #Change
    group_field = 'R_no' #Change

    oid_field = arcpy.Describe(layer).OIDFieldName
    d = defaultdict(list)

    #Group oids together by Group_field
    with arcpy.da.SearchCursor(layer,[group_field, oid_field]) as cursor:
    for group, oids in cursor:
    d[group].append(oids)

    oids_to_select = []
    for group, oids in d.iteritems(): #d.items() in python3/ArcGIS Pro
    if len(oids)>2: #if more than 2 in group
    oids_to_select.extend(oids[:3]) #:3 add first Three oids to list

    sql = "0 IN1".format(arcpy.AddFieldDelimiters(layer, oid_field), tuple(oids_to_select))
    arcpy.SelectLayerByAttribute_management(in_layer_or_view=layer,
    where_clause=sql)





    share|improve this answer





























      1














      Your question is a bit unclear. If you want to select first three rows if number of features in each R_no group is larger than two, code below should work. Execute in python window with the table/feature class added to the map. Im using collections.defaultdict to Group.



      import arcpy
      from collections import defaultdict

      layer = 'somelayeraddedtoArcMap' #Change
      group_field = 'R_no' #Change

      oid_field = arcpy.Describe(layer).OIDFieldName
      d = defaultdict(list)

      #Group oids together by Group_field
      with arcpy.da.SearchCursor(layer,[group_field, oid_field]) as cursor:
      for group, oids in cursor:
      d[group].append(oids)

      oids_to_select = []
      for group, oids in d.iteritems(): #d.items() in python3/ArcGIS Pro
      if len(oids)>2: #if more than 2 in group
      oids_to_select.extend(oids[:3]) #:3 add first Three oids to list

      sql = "0 IN1".format(arcpy.AddFieldDelimiters(layer, oid_field), tuple(oids_to_select))
      arcpy.SelectLayerByAttribute_management(in_layer_or_view=layer,
      where_clause=sql)





      share|improve this answer



























        1












        1








        1







        Your question is a bit unclear. If you want to select first three rows if number of features in each R_no group is larger than two, code below should work. Execute in python window with the table/feature class added to the map. Im using collections.defaultdict to Group.



        import arcpy
        from collections import defaultdict

        layer = 'somelayeraddedtoArcMap' #Change
        group_field = 'R_no' #Change

        oid_field = arcpy.Describe(layer).OIDFieldName
        d = defaultdict(list)

        #Group oids together by Group_field
        with arcpy.da.SearchCursor(layer,[group_field, oid_field]) as cursor:
        for group, oids in cursor:
        d[group].append(oids)

        oids_to_select = []
        for group, oids in d.iteritems(): #d.items() in python3/ArcGIS Pro
        if len(oids)>2: #if more than 2 in group
        oids_to_select.extend(oids[:3]) #:3 add first Three oids to list

        sql = "0 IN1".format(arcpy.AddFieldDelimiters(layer, oid_field), tuple(oids_to_select))
        arcpy.SelectLayerByAttribute_management(in_layer_or_view=layer,
        where_clause=sql)





        share|improve this answer















        Your question is a bit unclear. If you want to select first three rows if number of features in each R_no group is larger than two, code below should work. Execute in python window with the table/feature class added to the map. Im using collections.defaultdict to Group.



        import arcpy
        from collections import defaultdict

        layer = 'somelayeraddedtoArcMap' #Change
        group_field = 'R_no' #Change

        oid_field = arcpy.Describe(layer).OIDFieldName
        d = defaultdict(list)

        #Group oids together by Group_field
        with arcpy.da.SearchCursor(layer,[group_field, oid_field]) as cursor:
        for group, oids in cursor:
        d[group].append(oids)

        oids_to_select = []
        for group, oids in d.iteritems(): #d.items() in python3/ArcGIS Pro
        if len(oids)>2: #if more than 2 in group
        oids_to_select.extend(oids[:3]) #:3 add first Three oids to list

        sql = "0 IN1".format(arcpy.AddFieldDelimiters(layer, oid_field), tuple(oids_to_select))
        arcpy.SelectLayerByAttribute_management(in_layer_or_view=layer,
        where_clause=sql)






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 2 days ago

























        answered 2 days ago









        BERABERA

        16.9k62044




        16.9k62044













            Popular posts from this blog

            Romeo and Juliet ContentsCharactersSynopsisSourcesDate and textThemes and motifsCriticism and interpretationLegacyScene by sceneSee alsoNotes and referencesSourcesExternal linksNavigation menu"Consumer Price Index (estimate) 1800–"10.2307/28710160037-3222287101610.1093/res/II.5.31910.2307/45967845967810.2307/2869925286992510.1525/jams.1982.35.3.03a00050"Dada Masilo: South African dancer who breaks the rules"10.1093/res/os-XV.57.1610.2307/28680942868094"Sweet Sorrow: Mann-Korman's Romeo and Juliet Closes Sept. 5 at MN's Ordway"the original10.2307/45957745957710.1017/CCOL0521570476.009"Ram Leela box office collections hit massive Rs 100 crore, pulverises prediction"Archived"Broadway Revival of Romeo and Juliet, Starring Orlando Bloom and Condola Rashad, Will Close Dec. 8"Archived10.1075/jhp.7.1.04hon"Wherefore art thou, Romeo? To make us laugh at Navy Pier"the original10.1093/gmo/9781561592630.article.O006772"Ram-leela Review Roundup: Critics Hail Film as Best Adaptation of Romeo and Juliet"Archived10.2307/31946310047-77293194631"Romeo and Juliet get Twitter treatment""Juliet's Nurse by Lois Leveen""Romeo and Juliet: Orlando Bloom's Broadway Debut Released in Theaters for Valentine's Day"Archived"Romeo and Juliet Has No Balcony"10.1093/gmo/9781561592630.article.O00778110.2307/2867423286742310.1076/enst.82.2.115.959510.1080/00138380601042675"A plague o' both your houses: error in GCSE exam paper forces apology""Juliet of the Five O'Clock Shadow, and Other Wonders"10.2307/33912430027-4321339124310.2307/28487440038-7134284874410.2307/29123140149-661129123144728341M"Weekender Guide: Shakespeare on The Drive""balcony"UK public library membership"romeo"UK public library membership10.1017/CCOL9780521844291"Post-Zionist Critique on Israel and the Palestinians Part III: Popular Culture"10.2307/25379071533-86140377-919X2537907"Capulets and Montagues: UK exam board admit mixing names up in Romeo and Juliet paper"Istoria Novellamente Ritrovata di Due Nobili Amanti2027/mdp.390150822329610820-750X"GCSE exam error: Board accidentally rewrites Shakespeare"10.2307/29176390149-66112917639"Exam board apologises after error in English GCSE paper which confused characters in Shakespeare's Romeo and Juliet""From Mariotto and Ganozza to Romeo and Guilietta: Metamorphoses of a Renaissance Tale"10.2307/37323537323510.2307/2867455286745510.2307/28678912867891"10 Questions for Taylor Swift"10.2307/28680922868092"Haymarket Theatre""The Zeffirelli Way: Revealing Talk by Florentine Director""Michael Smuin: 1938-2007 / Prolific dance director had showy career"The Life and Art of Edwin BoothRomeo and JulietRomeo and JulietRomeo and JulietRomeo and JulietEasy Read Romeo and JulietRomeo and Julieteeecb12003684p(data)4099369-3n8211610759dbe00d-a9e2-41a3-b2c1-977dd692899302814385X313670221313670221

            Creating closest line along the point''s azimuth using PostgreSQL Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Drawing line between points at specific distance in PostGIS?How to efficiently find the closest point over the dateline?How to find the nearest point by using PostGIS function?PostGIS nearest point with LATERAL JOIN in PostgreSQL 9.3+Creating a table and inserting selected streets using plpgsql functionsCreating a table that stores Distances and other columnSaving select query results (year wise) from PostgreSQL/PostGIS to text filesWhat is the information behind this geometry?How to give start and end vertex ids dynamically in pgr_dijkstra?Point to Polygon nearest distance DS_distance is not using geography index & knn <-> or <#> does not give result in orderLine to point conversion with start point and end point detection?

            Crop image to path created in TikZ? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Crop an inserted image?TikZ pictures does not appear in posterImage behind and beyond crop marks?Tikz picture as large as possible on A4 PageTransparency vs image compression dilemmaHow to crop background from image automatically?Image does not cropTikzexternal capturing crop marks when externalizing pgfplots?How to include image path that contains a dollar signCrop image with left size given