Author |
Topic |
doco
Yak Posting Veteran
77 Posts |
Posted - 2012-02-17 : 12:45:23
|
[code]SELECT am.AsmtYear AS tax_year, am.AcctNmbr AS id, ( cast( right( Twnshp + 100, 2 ) as varchar(2) ) + TwnshpDir + rtrim( Range ) + RangDir + cast( right( Sctn + 100, 2 ) as varchar(2) ) + right( QtrSctn + 100, 2 ) + '-' + cast( right( Prcl + 100000, 5 ) as varchar(5) ) ) AS map_lot, MntnAreaCode AS area, PropClassCode AS pclas, OwnerName AS owner, AcctAcresMkt AS acres, Rmv AS rmv , Sav AS sav , MaxSpecAssessedValue AS msav , TaxableAssessedValue AS tavFROM AwbreyWheelerAsrdta..AB_AccountMaster am JOIN AwbreyWheelerAsrdta..AB_AccountSummary sm ON am.AcctNmbr = sm.AcctNmbr and am.AsmtYear = sm.AsmtYearwhere am.AcctNmbr = 2813 and am.AsmtYear between 2002 and 2006UNIONSELECT distinct pvt.tax_year , pvt.id, left( p.tax_bill_id, 16 ) as map_lot, p.routing_number as area, property_class as pclas, p.owner1 as owner, p.legal_acreage as acres, ( MKLND + SAMKL + MKIMP ) AS rmv , ( MKLND + M5SAV + MKIMP ) AS sav , ( SAVL + BMAV + EAV ) AS msav, TVR AS tavFROM ProvalWheelerCommon..parcel_base p JOIN ManatronWheelerCustom..udtValComponentPivot pvt ON p.lrsn = pvt.idwhere p.parcel_id = 2813 and pvt.tax_year >= 2007ORDER BY 1 desc;[/code]I created this script a couple years ago and has worked fine until of late. I am gettingquote: Msg 207, Level 16, State 1, Line 37Invalid column name 'id'.Msg 207, Level 16, State 1, Line 24Invalid column name 'id'.
I can assure you [id] is indeed a valid column name.quote: SELECT [id] ,[parcel_id] ,[tax_year] ,[AVO] ,[AVR] ,[BMAV] ,[BMKT] ,[BSAMK] ,[EAR] ,[EAV] ,[EAVO] ,[EBV] ,[M5SAV] ,[MAVIM] ,[MAVLN] ,[MAVMK] ,[MAVMO] ,[MKAV] ,[MKAVO] ,[MKIMP] ,[MKITL] ,[MKLND] ,[MKLTL] ,[MKTTL] ,[MSAV] ,[NCEV] ,[NCYRO] ,[NCYRS] ,[NEWCN] ,[OEV] ,[PNCEO] ,[PNCEV] ,[PNCO] ,[PNCOO] ,[PPROP] ,[SAMKI] ,[SAMKL] ,[SAV] ,[SAVI] ,[SAVL] ,[TVR] FROM [ManatronWheelerCustom].[dbo].[udtValComponentPivot]
As can be seen here.So, what is really going on here? TIAEducation is what you have after you've forgotten everything you learned in school |
|
X002548
Not Just a Number
15586 Posts |
|
doco
Yak Posting Veteran
77 Posts |
Posted - 2012-02-17 : 13:09:07
|
[code]USE [ManatronWheelerCustom]GO/****** Object: Table [dbo].[udtValComponentPivot] Script Date: 02/17/2012 10:07:55 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [dbo].[udtValComponentPivot]( [id] [int] NOT NULL, [parcel_id] [varchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [tax_year] [varchar](4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [AVO] [decimal](38, 0) NULL, [AVR] [decimal](38, 0) NULL, [BMAV] [decimal](38, 0) NULL, [BMKT] [decimal](38, 0) NULL, [BSAMK] [decimal](38, 0) NULL, [EAR] [decimal](38, 0) NULL, [EAV] [decimal](38, 0) NULL, [EAVO] [decimal](38, 0) NULL, [EBV] [decimal](38, 0) NULL, [M5SAV] [decimal](38, 0) NULL, [MAVIM] [decimal](38, 0) NULL, [MAVLN] [decimal](38, 0) NULL, [MAVMK] [decimal](38, 0) NULL, [MAVMO] [decimal](38, 0) NULL, [MKAV] [decimal](38, 0) NULL, [MKAVO] [decimal](38, 0) NULL, [MKIMP] [decimal](38, 0) NULL, [MKITL] [decimal](38, 0) NULL, [MKLND] [decimal](38, 0) NULL, [MKLTL] [decimal](38, 0) NULL, [MKTTL] [decimal](38, 0) NULL, [MSAV] [decimal](38, 0) NULL, [NCEV] [decimal](38, 0) NULL, [NCYRO] [decimal](38, 0) NULL, [NCYRS] [decimal](38, 0) NULL, [NEWCN] [decimal](38, 0) NULL, [OEV] [decimal](38, 0) NULL, [PNCEO] [decimal](38, 0) NULL, [PNCEV] [decimal](38, 0) NULL, [PNCO] [decimal](38, 0) NULL, [PNCOO] [decimal](38, 0) NULL, [PPROP] [decimal](38, 0) NULL, [SAMKI] [decimal](38, 0) NULL, [SAMKL] [decimal](38, 0) NULL, [SAV] [decimal](38, 0) NULL, [SAVI] [decimal](38, 0) NULL, [SAVL] [decimal](38, 0) NULL, [TVR] [decimal](38, 0) NULL) ON [PRIMARY]GOSET ANSI_PADDING OFF[/code]BTW. All fields in that table come back as invalid column name... Education is what you have after you've forgotten everything you learned in school |
 |
|
doco
Yak Posting Veteran
77 Posts |
Posted - 2012-02-17 : 13:30:15
|
I reran the SP that created the table and all is well now. Nothing changed in the table structure - just recreated it.Bizarre Education is what you have after you've forgotten everything you learned in school |
 |
|
doco
Yak Posting Veteran
77 Posts |
Posted - 2012-02-17 : 13:30:15
|
I reran the SP that created the table and all is well now. Nothing changed in the table structure - just recreated it.Bizarre Education is what you have after you've forgotten everything you learned in school |
 |
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|