CodeSmith Community
Your Code. Your Way. Faster!

trouble with custom sproc

Latest post 04-27-2007 11:35 AM by ecathell. 1 replies.
  • 04-27-2007 11:25 AM

    • ecathell
    • Top 50 Contributor
    • Joined on 06-07-2005
    • Delaware
    • Posts 104
    • Points 2,270

    trouble with custom sproc

    First as I understand it, if my return values on my custom sproc are ordered right, it should return my object?

    here is my sql code for the sproc I am trying to write.

     SELECT     City, State, ZipCode, AreaCode, TimeZone, MAX(CacheTime) AS CacheTime
    FROM         dbo.USZipCache
    GROUP BY City, State, ZipCode, AreaCode, TimeZone

    However it is returning a dataset.

    here is the table def.

     

    CREATE TABLE [dbo].[USZipCache](

    [City] [varchar](50) COLLATE Latin1_General_CI_AI NULL,

    [State] [varchar](2) COLLATE Latin1_General_CI_AI NULL,

    [ZipCode] [varchar](10) COLLATE Latin1_General_CI_AI NOT NULL,

    [AreaCode] [varchar](5) COLLATE Latin1_General_CI_AI NULL,

    [TimeZone] [char](1) COLLATE Latin1_General_CI_AI NULL,

    [CacheTime] [smalldatetime] NOT NULL,

    CONSTRAINT [PK_USZipCache] PRIMARY KEY CLUSTERED

    (

    [ZipCode] ASC

    )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

    ) ON [PRIMARY]

    GO

    I am thinking either the MAX is messing things up, or the group by...but it all boils down to the same thing.

     

    thanks

    • Post Points: 5
  • 04-27-2007 11:35 AM In reply to

    • ecathell
    • Top 50 Contributor
    • Joined on 06-07-2005
    • Delaware
    • Posts 104
    • Points 2,270

    Re: trouble with custom sproc

    I dont know what I did but i got it working finally. The only thing I can think of was that I was building only the servicelayer project, this last time I rebuilt the entire solution...

     

    <shrug>

    • Post Points: 5
Page 1 of 1 (2 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems