Viewing 9 posts - 1 through 9 (of 9 total)
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...
January 24, 2007 at 10:26 am
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...
January 22, 2007 at 4:44 pm
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....
January 21, 2007 at 3:44 am
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!
January 21, 2007 at 3:35 am
Hi again! - thanks once again for the assistance.
No joy I'm afraid! - brings in results.. but no nulls..
January 19, 2007 at 7:26 am
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, ' ',...
January 19, 2007 at 6:21 am
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...
January 19, 2007 at 6:18 am
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...
January 19, 2007 at 4:36 am
colin,
pushed for time - just need an answer...
January 19, 2007 at 3:15 am
Viewing 9 posts - 1 through 9 (of 9 total)