Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Location
    California
    Posts
    502

    Unanswered: Circular Referrence caused by alias . . .

    When I test this the error is Circular referrence caused by alias county in query definition's SELECT list.

    Code:
    INSERT INTO year_month_city_counts
    SELECT YEAR(COE) AS closing_year, MONTH(COE) AS closing_month, county AS county, city AS city, 0 AS ResiStyles, SoldPrice AS SoldPrice, COUNT(*) AS occurs, AVG(SqFt) AS avg_size
    FROM tblSandicorData
    
    WHERE COE>=DATESERIAL([Enter Year],[Enter Month],1) And COE<DATEADD("m",1,DATESERIAL([Enter Year],[Enter Month],1)) And SoldPrice>0 And SqFt>0 And ResiStyles Like "0"
    GROUP BY YEAR(COE), MONTH(COE), county, city, SoldPrice;
    I can't see the error. Field Name is COUNTY. (Field data is SANDIEGO)

    Thanks . . . Rick

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Why do you use:
    Code:
    county AS county
    Although this is syntactically correct in T-SQL (SQL Server) I'm not sure that Access accepts it.
    Have a nice day!

  3. #3
    Join Date
    Mar 2004
    Location
    California
    Posts
    502

    County AS County . . .

    I'm not sure either,

    Rudy is the one that helped me with this a few years ago.

    I can't remember most of it.

    Rick

  4. #4
    Join Date
    Mar 2004
    Location
    California
    Posts
    502

    Removed all incidents of county

    Then I get the same circular error on city ? ? ?

    Rick

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    So examine your sql
    if you have cleared the problem on country, move on to the next problem.
    Looking at your sql for any reference to the city columm, think about the error message for the problem youve just hit.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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