Re: Strange Error
- From: Henk van den Berg <hvandenberg@xxxxxxxxx>
- Date: Mon, 04 Apr 2011 22:34:16 +0200
Nest thing I would try is creating a different database, create the tables in that database, create the sproc, fill the tables with some sample data and see what happens.
Best,
Henk
On 04-04-2011 20:37, NumbLock wrote:
Hank, Yep I did paste it into a blank query window exactly as it
appeared in the proc. My coalation is not case sensitive so I don't
think that is a problem. I am really scratching my head on this one...
NumbLock
-----Original Message-----
From: Henk van den Berg [mailto:hvandenberg@xxxxxxxxx]
Posted At: Monday, April 04, 2011 12:38 PM
Posted To: microsoft.public.sqlserver.programming
Conversation: Strange Error
Subject: Re: Strange Error
Hi Numblock,
If your collation sequence is case sensitive, SELECT ipinfo.ResolvesTo
is something else than Ipinfo.ResolvesTo (just as an example) You're
most likely aware of that, but I'm just checking all the possible bases
(including the ones where you might slap your forehead, you don't wanna
know how many times that happened to me... ;-) )
Did you copy/paste the SELECT statement from the sproc into a blank
query window?
I just attempted your scripts in SQL 2008 (not R2) and that executes
just fine (albeit that it returns 0 rows, but that's to be expected)
Best,
Henk
On 04-04-2011 19:15, NumbLock wrote:
Hello Hank. Thanks for the reply. Here is the create script for
internetlog:
USE [IISLogs]
GO
/****** Object: Table [dbo].[Internetlog] Script Date: 04/04/2011
12:08:42 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Internetlog](
[ClientHost] [varchar](255) NULL,
[username] [varchar](255) NULL,
[LogTime] [datetime] NULL,
[service] [varchar](255) NULL,
[machine] [varchar](255) NULL,
[serverip] [varchar](50) NULL,
[processingtime] [int] NULL,
[bytesrecvd] [int] NULL,
[bytessent] [int] NULL,
[servicestatus] [int] NULL,
[win32status] [int] NULL,
[operation] [varchar](255) NULL,
[target] [varchar](255) NULL,
[parameters] [varchar](255) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
And For IpInfo:
USE [IISLogs]
GO
/****** Object: Table [dbo].[ipinfo] Script Date: 04/04/2011
12:14:23 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ipinfo](
[IpAddress] [varchar](50) NOT NULL,
[ResolvesTo] [varchar](100) NULL,
CONSTRAINT [PK_ipinfo] PRIMARY KEY CLUSTERED (
[IpAddress] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
Hopefully this will help. I wasn't aware of any case sensitivity
issues. Can you enlighten me on this?
Thanks,
NumbLock
-----Original Message-----
From: Henk van den Berg [mailto:hvandenberg@xxxxxxxxx] Posted At:
Monday, April 04, 2011 11:54 AM Posted To:
microsoft.public.sqlserver.programming
Conversation: Strange Error
Subject: Re: Strange Error
Can you post the create table scripts as well? That way we can
recreate the scenario.
Did you check case sensitivity?
Best,
Henk
On 04-04-2011 17:42, NumbLock wrote:Hello. I have the following proc:
USE [IISLogs]
GO
/****** Object: StoredProcedure [dbo].[ShowInetLogs] Script Date:
04/04/2011 10:14:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[ShowInetLogs]
AS
BEGIN
SET NOCOUNT ON;
/****** Script for SelectTopNRows command from SSMS ******/ SELECT
[ClientHost]
,[ipinfo].[ResolvesTo]
,[username]
,[LogTime]
,[service]
,[machine]
,[serverip]
,[processingtime]
,[bytesrecvd]
,[bytessent]
,[servicestatus]
,[win32status]
,[operation]
,[target]
,[parameters]
FROM [IISLogs].[dbo].[InterNetLog]
INNER JOIN ipinfo ON ipinfo.IPAddress = internetlog.ClientHost
ORDER BY LogTime ASC
END
It gets created successfully but when I try to execute it I get the
following:
Msg 4104, Level 16, State 1, Line 3
The multi-part identifier "ipinfo.ResolvesTo" could not be bound.
Anyone have any ideas? This is SS 2008R2 I am working with. When I
execute the query in the sql editor, it works correctly.
Thanks,
NumbLock
.
- References:
- Strange Error
- From: NumbLock
- Re: Strange Error
- From: Henk van den Berg
- Re: Strange Error
- From: NumbLock
- Re: Strange Error
- From: Henk van den Berg
- Re: Strange Error
- From: NumbLock
- Strange Error
- Prev by Date: Re: Strange Error
- Next by Date: Re: Strange Error
- Previous by thread: Re: Strange Error
- Next by thread: Re: Strange Error
- Index(es):
Relevant Pages
|