Jason Yousef
asked on
'invalid object name' , 'multi-part identifier could not be bound'
can you post your entire query in code snippet instead of snapshot to help you out.
ASKER
here it is...
SELECT
[PXCMAT].[PT_No]
,[PXCMAT].[PT_Name]
,[PXCMAT].[Adm_Date]
,[PXCMAT].[Dsch_Date]
,[PXCMAT].[LOS]
,[PXCMAT].[ICD9]
,[PXCMAT].[ICD9_Desc]
,[PXCMAT].[ICD9_Prio]
,[PXCMAT].[ICD9_Type]
,[PXCMAT].[Nurse_Station]
,[PXCMAT].[Service]
,[PXCMAT].[FC] AS [PXCMAT-FC]
,[PXCMAT].[Group]
,[PXCMAT].[DC_YYMM]
,[CDM_TYPE].[CDM_NO]
,[CDM_TYPE].[DESC]
,[CDM_TYPE].[CDM_Type]
,[2010].[POST_DATE]
, [2010].[PATIENT_NO]
, [2010].[TOTAL_AMOUNT]
, [2010].[SERVICE_CODE]
, [2010].[SERVICE_DATE]
, [2010].[SVC]
, [2010].[PT]
, [2010].[FC] AS [TranAud-FC]
, [2010].[CD TY DESC]
from [PXCMAT], [2010],[CDM_TYPE]
where [PXCMAT].[PT_No] = [2010].[PATIENT_NO]
and [2010].[SERVICE_CODE] = [CDM_TYPE].[CDM_NO]
and [CDM_TYPE].[CDM_Type] in ('3','4')
and [CDM_TYPE].[DESC] like '%DENI%'
and [PXCMAT].[icd9_type] in ('DF','DFM') and [PXCMAT].[ICD9_Prio] = 1
and [PXCMAT].[Nurse_Station] != '' and [PXCMAT].[Nurse_Station] is not null
Please make sure of the following at *compile time*:
> Each object referenced exists
> Each object referenced is in the proper schema
> Each column referenced exists
> Each object referenced exists
> Each object referenced is in the proper schema
> Each column referenced exists
Query seems fine..
And make sure that you are connected to the correct database in your query window..
And make sure that you are connected to the correct database in your query window..
please post the 3 table create structure scripts...
ASKER
RRJEGAN17: yes connected to the right DB at top and also used "use DBNAME' at top of statement too.
Racimo: can you explain more about each object is referenced?
here are the 3 tables
Racimo: can you explain more about each object is referenced?
here are the 3 tables
CREATE TABLE [dbo].[PXCMAT](
[Id] [int] IDENTITY(1,1) NOT NULL,
[PT_No] [int] NOT NULL,
[PT_Name] [varchar](100) NULL,
[Adm_Date] [date] NULL,
[Dsch_Date] [date] NULL,
[LOS] [float] NULL,
[ICD9] [varchar](10) NULL,
[ICD9_Desc] [varchar](30) NULL,
[ICD9_Prio] [smallint] NULL,
[ICD9_Type] [varchar](10) NULL,
[Nurse_Station] [varchar](13) NULL,
[Service] [varchar](10) NULL,
[FC] [varchar](5) NULL,
[Group] [varchar](10) NULL,
[DC_YYMM] [varchar](7) NULL,
[Date_Insterted] [date] NOT NULL
) ON [PRIMARY]
CREATE TABLE [dbo].[CDM_TYPE](
[CDM_NO] [int] NULL,
[DESC] [nvarchar](30) NULL,
[CDM_Type] [nvarchar](2) NULL
) ON [PRIMARY]
CREATE TABLE [dbo].[2010](
[Id] [int] IDENTITY(1,1) NOT NULL,
[POST_DATE] [date] NOT NULL,
[FI] [varchar](4) NULL,
[PATIENT_NO] [int] NOT NULL,
[TOTAL_AMOUNT] [money] NULL,
[PATIENT_NAME] [varchar](50) NULL,
[SERVICE_CODE] [int] NULL,
[QTY] [int] NULL,
[SERVICE_DATE] [date] NOT NULL,
[SVC] [varchar](5) NULL,
[CD_TY] [varchar](8) NULL,
[GL_KEY] [smallint] NULL,
[PT] [varchar](6) NULL,
[FC] [varchar](5) NULL,
[CD TY DESC] [varchar](50) NULL,
[Date_Insterted] [date] default getdate() NOT NULL
) ON [2010]
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I suggest you are doing this on you own pc which has not got 2008 sql server installed. Just the management studio.
If you remote onto the box you might find you get no squiggly lines.
As a test try to right click on the table [PXCMAT] and create table in query window.
You'll probably get an error complaining about the column adm_date which is in format "date" which isn't supported on 2005.
It's just a slight compatability issue i think
If you remote onto the box you might find you get no squiggly lines.
As a test try to right click on the table [PXCMAT] and create table in query window.
You'll probably get an error complaining about the column adm_date which is in format "date" which isn't supported on 2005.
It's just a slight compatability issue i think