I made a join with two tables - one to many.  territories and roads. Meaning, one territory have many roads.   territories -> 98 territories/features roads -> 529 roads/features  So, in the territories, properties, made a join:    But in the attribute table I still see only 98 territories. Shouldn't see more than 98? Shouldn't see another rows for the related roads...?
50143
I'm trying to create a join/relate in QGIS where I have a shapefile of buildings and to that I would like to join a non-spatial table (.csv-file) containing people who work in each building. So I have multiple records in my table that I would like to be able to join to my single features in my shapefile. I can only run a join in QGIS where the first record is joined to the shapefile feature (ie building) but subsequent records get removed. Could someone let me know how to complete this join/relate in QGIS?
105696
I have two layers with points, call them A and B, each with different attributes.  For each point in A I want to join all the attributes from the nearest point in B.    Ideally this would also include a field measuring the distance between both points.  I know how to so this in ArcGIS: right click layer A>joins and relates>joins, then join data based on spatial location and choose to join attributes from nearest point.  I could not find similar functionality in QGIS.  Any pointers?
121744
I am trying to make a map using US census data showing vacant housing to total housing on the same map.   I came across the "multiple attributes" feature under the symbology tab and wondered if this is the way to go and, if so, how to use it?   I have only been able to get one type of symbol, the gradient feature to appear.   I'm using ArcGIS Desktop 10.
8596
I need to do a LINQ2DataSet query that does a join on more than one field (as  var result = from x in entity join y in entity2         on x.field1 = y.field1  and            x.field2 = y.field2   I have yet found a suitable solution (I can add the extra constraints to a where clause, but this is far from a suitable solution, or use  solution, but that assumes an equijoin).  Is it possible in LINQ to join on multiple fields in a single join?  EDIT  var result = from x in entity              join y in entity2              on new { x.field1, x.field2 } equals new { y.field1, y.field2 }   is the solution I referenced as assuming an equijoin above.  Further EDIT  To answer criticism that my original example was an equijoin, I do acknowledge that, My current requirement is for an equijoin and I have already employed the solution I referenced above.  I am, however, trying to understand what possibilities and best practices I have / should employ with LINQ. I am going to need to do a Date range query join with a table ID soon, and was just pre-empting that issue, It looks like I shall have to add the date range in the where clause.  Thanks, as always, for all suggestions and comments given
32134
I'm using a SOQL to query the lookup relationships.  Primary Object: Opportunity  Secondary Object: Purchase__c.  From purchase__c we have a lookup to opportunity.  Field Name: Opportunity__c  Child Relationship Name: Purchases2  SOQL query:  for (Opportunity opp : [select Id, Name, (select id from Purchases2__r where Count__c&gt;0) from Opportunity where Id IN :oppIds])    whats wrong with my query? getting error below:     If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name.
41713
I have two layers, one (A) has point features and the other (B) has polygons.  How do I produce a new table with some (the ID) or all the fields from the A table and some (the area code) or all from the B table where the B polygon contains the A point?  I am using QGIS.
38285
Both these joins will give me the same results:  SELECT * FROM table JOIN otherTable ON table.ID = otherTable.FK   vs  SELECT * FROM table INNER JOIN otherTable ON table.ID = otherTable.FK   Is there any difference between the statements in performance or otherwise?   Does it differ between different SQL implementations?
123118
I want to get user and user's territory information. After i search, i found that user information in user Table. territory information in Territory Table. but, the relationship in UserTerritory Table. But, from the apex guide,i found that UserTerritory Don’t Support DML Operations. So, i can not get the information. So, Does anyone knows that how to write this soql or would you please give some idea to address this issue.   Many thanks
93054
I have a person table. I also have a car table and books table.  The car and book tables both have a foreign key back to person.  I am trying to count the number of books and cars each person has. I tried:  SELECT      Person.Name,      COUNT(BooK.bookid) books,      COUNT(Car.CarId) cars  FROM Person, Book, Car  WHERE Person.ID = Book.PersonID = Car.PersonID    but I get:  Incorrect syntax near '='
25040
I have to create a report on some student completions. The students each belong to one client. Here are the tables (simplified for this question).  CREATE TABLE  `clients` (   `clientId` int(10) unsigned NOT NULL auto_increment,   `clientName` varchar(100) NOT NULL default '',   `courseNames` varchar(255) NOT NULL default '' )   The courseNames field holds a comma-delimited string of course names, eg "AB01,AB02,AB03"  CREATE TABLE  `clientenrols` (   `clientEnrolId` int(10) unsigned NOT NULL auto_increment,   `studentId` int(10) unsigned NOT NULL default '0',   `courseId` tinyint(3) unsigned NOT NULL default '0' )   The courseId field here is the index of the course name in the clients.courseNames field. So, if the client's courseNames are "AB01,AB02,AB03", and the courseId of the enrolment is 2, then the student is in AB03.  Is there a way that I can do a single select on these tables that includes the course name? Keep in mind that there will be students from different clients (and hence have different course names, not all of which are sequential,eg: "NW01,NW03")  Basically, if I could split that field and return a single element from the resulting array, that would be what I'm looking for. Here's what I mean in magical pseudocode:  SELECT e.`studentId`, SPLIT(",", c.`courseNames`)[e.`courseId`] FROM ...
47554
I'm working with population data, and I have an issue when it comes to knowing the sum of a population inside the attribute table.  In my attribute table, I'd like to add all the numbers in the red box, i.e. all the numbers together from the column &quot;UN_2015_E&quot;. Is there a way to do so?
27082
Is there a way to create attribute subdomains in ArcGIS with clauses?  For example, if I'm editing a line feature class of pipes, I create a domain for the pipe type to be either plastic or metal. I want to setup another domain field "Rusted" with a yes/no value. When editing the data in ArcMap, if the pipe is metal, I should get a yes/no coded value option on the "Rusted" field. If it is plastic, I want the "Rusted" field to calculate N/A or perhaps give me other options.
112237
I am making a DB for storing reports that have following fields:  Ad_system, Ad_Campaing, Ad_Group, Keyword, Date, Impressions, Clicks, Conversions   Logic is that, Ad_system can have multiple Ad_Campaings, Ad_Campaing can have multiple Ad_Groups and Ad_Groups can have multiple Keywords, and for every Keyword there is a report. Should It be like this? Because it kind of makes sense to me, but it doesn't look correct. Primary key can also be:  ad.system.name for first table  ad.system.name ad.campaing.name for second table  ad.system.name ad.campaing.name ad.group.name for third table  ad.system.name ad.campaing.name ad.group.name keyword for fourth table  They will always be unique, but then Report will always have all DB columns in it, so it's kind of redundant.  Is the approach that I have in the diagram below correct? Or is a better one what I just described? If I am not mistaken both should satisfy 3rd NF.
58985
I am creating a map series that has many polygons per sheet. There is annotation for the polygons however some polygons are very small with no annotation for them (annotation would completely hide a polygon). Thus, I have an attribute table where labels are stored for those specific polygons.   How can I have that table displayed on the map, with only the attribute values per sheet, rather than all 2000+ values?   I am looking for a simple, dynamic solution.
4248
We process a routine data feed from a client who just refactored their database from a form that seems familiar (one row per entity, one column per attribute) to one that seems unfamiliar to me (one row per entity per attribute):  Before: one column per attribute  ID   Ht_cm   wt_kg   Age_yr  ...  1      190      82     43    ... 2      170      60     22    ... 3      205      90     51    ...   After: one column for all attributes  ID    Metric   Value  1     Ht_cm     190  1     Wt_kg     82  1     Age_yr    43  1      ...  2     Ht_cm     170  2     Wt_kg     60  2     Age_yr    22  2     ...  3     Ht_cm     205  3     Wt_kg     90  3     Age_yr    51  3     ...   Is there a name for this database structure?  What are the relative advantages?  The old way seems easier to place validity constraints on specific attributes (non-null, non-negative, etc.) and easier to calculate averages.  But I can see how it might be easier to add new attributes without refactoring the database.  Is this a standard/preferred way of structuring data?
82068
Can anyone help me with selecting multiple values from the attribute table?   I tried "Classes"='14'AND'07' but it doesn't work.
108409
When I write a query like this...  select * from table1 t1 join table2 t2 on t1.id = t2.id   Does the SQL optimizer, not sure if that is the correct term, translate that to...  select * from table1 t1, table2 t2 where t1.id = t2.id   Essentially, is the Join statement in SQL Server just an easier way to write sql? Or is it actually used at run-time?  Edit: I almost always, and will almost always, use the Join syntax. I am just curious what happens.