Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2009
    Posts
    20

    Unanswered: geocoder problem

    Hey guys,

    I am new to spatial databases. I am using sql server 2008 and trying to do something like following:


    DECLARE @addr nvarchar(256) = '2650 college place, Fullerton, CA, 92831';
    DECLARE @addr_as_xy nvarchar(30);
    DECLARE @g geography;
    SET @addr_as_xy = dbo.geocoder(@addr)
    SET @g = geography:: STPointFromText(@addr_as_xy, 4326)



    This code basically converts a simple text address into ( X,Y) coordinates system.

    Now, It gives me following error:

    Msg 4121, Level 16, State 1, Line 4
    Cannot find either column "dbo" or the user-defined function or aggregate "dbo.geocoder", or the name is ambiguous.


    I really don't know why I just copied and pasted the caode from the microsoft tutorial.

    Can anybody help please?

    Kunal


  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Do you have a stored procedure called dbo.geocoder in your database?
    George
    Home | Blog

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    dbo.geocoder will need to be defined as a function for that syntax to work.
    If it is a stored procedure, you will need to use output parameters rather than variable assignment.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I meant function - slip of the keyboard
    George
    Home | Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •