Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)

  • RE: why not showing the nulls?

    Hi everyone - got this working for my needs with the following:

     

    SET QUOTED_IDENTIFIER ON

    GO

    SET ANSI_NULLS ON

    GO

     

     

     

    ALTER        PROCEDURE dbo.spTradePostcodeWorker

    @Master_Account nvarchar(50)

    AS SELECT     ISNULL(COUNT(CASE LEN(REPLACE(dbo.Customers_Trade.PostCode, ' ', '')) WHEN 5 THEN...

  • RE: speed up this query?

    Hi John.

    I am able to alter the tbl structure as required.

    The query I posted at the beginning is actually only have of it.. I also need to have a WHERE...

  • RE: why not showing the nulls?

    Hi (again!)

    Looking at that query - I don't think that would get me my results.

     

    I know I need to list all of the UK postcode districts from the UKPOstcodes TBl....

  • RE: why not showing the nulls?

    Hi, Thanks for the reply.

    When I use that query I get an error about dbo. Customers_Trade not matching with a table name or alias used in the query!

  • RE: why not showing the nulls?

    Hi again! - thanks once again for the assistance.

     

    No joy I'm afraid! - brings in results.. but no nulls..

  • RE: why not showing the nulls?

    Here's the statement which gives the error:

    SELECT     ISNULL(COUNT(dbo.Customers_Trade.TradeCustomerID), 0) AS PCCount, dbo.UkPostcodes.Postcode, dbo.UkPostcodes.Town,

                          dbo.UkPostcodes.County, dbo.UkPostcodes.Area, dbo.UkPostcodes.Country, dbo.UkPostcodes.Master_Account

    FROM         dbo.UkPostcodes LEFT OUTER JOIN

                          dbo.Customers_Trade ON dbo.UkPostcodes.Postcode = CASE LEN(REPLACE(dbo.Customers_Trade.PostCode, ' ',...

  • RE: why not showing the nulls?

    Hi  - thanks for the reply!

    ok first things first.. when I put that modified where statement into the query  I get an Error:

    "INcorrect Syntax near the word AND"

    I'm guessing it's...

  • RE: why not showing the nulls?

    Thanks for the reply, but I'm not sure that is correct :

    My query now looks like:

    SELECT     ISNULL(COUNT(dbo.Customers_Trade.TradeCustomerID), 0) AS PCCount, dbo.UkPostcodes.Postcode, dbo.UkPostcodes.Town,

                          dbo.UkPostcodes.County, dbo.UkPostcodes.Area, dbo.UkPostcodes.Country, dbo.UkPostcodes.Master_Account

    FROM         dbo.UkPostcodes LEFT OUTER...

  • RE: why not showing the nulls?

    colin,

    pushed for time - just need an answer...

Viewing 9 posts - 1 through 9 (of 9 total)