By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,397 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,397 IT Pros & Developers. It's quick & easy.

Access database table... very urgent plz.

P: 38
i have a "roads" geodatabase in access. there is a table "nodes" which has fields ID(auto number), Shape(OLE Object) , Position_X(number) Position_Y(number) and node_number(number). Field node_number has duplicated values. i want to make a new table so that my field node_number do not have duplicate values. when i do it does not allow me. here is query.

SELECT distinct node_number, POINT_X, POINT_Y, Shape FROM nodes;

error message is that i can't have shape with unique value. when i remove distinct it does. i.e following query works.
SELECT node_number, POINT_X, POINT_Y, Shape FROM nodes;

how to solve this problem.....
regards
@rtist
Nov 21 '06 #1
Share this Question
Share on Google+
2 Replies


NeoPa
Expert Mod 15k+
P: 31,661
I'm not sure you can get around it - that's what the err msg is trying to say.
Grouping on all those fields may work - just an idea.
Nov 21 '06 #2

MMcCarthy
Expert Mod 10K+
P: 14,534
i have a "roads" geodatabase in access. there is a table "nodes" which has fields ID(auto number), Shape(OLE Object) , Position_X(number) Position_Y(number) and node_number(number). Field node_number has duplicated values. i want to make a new table so that my field node_number do not have duplicate values. when i do it does not allow me. here is query.

SELECT distinct node_number, POINT_X, POINT_Y, Shape FROM nodes;

error message is that i can't have shape with unique value. when i remove distinct it does. i.e following query works.
SELECT node_number, POINT_X, POINT_Y, Shape FROM nodes;

how to solve this problem.....
regards
@rtist
Because Shape is an OLE Object it is probably causing problems.

As NeoPa says try a GROUP BY first including shape in the group by then excluding it.

Expand|Select|Wrap|Line Numbers
  1.  
  2. SELECT node_number, POINT_X, POINT_Y, Shape FROM nodes
  3. GROUP BY node_number, POINT_X, POINT_Y, Shape;
  4.  
or

Expand|Select|Wrap|Line Numbers
  1.  
  2. SELECT node_number, POINT_X, POINT_Y, Shape FROM nodes
  3. GROUP BY node_number, POINT_X, POINT_Y;
  4.  
Nov 21 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.