Viewing 15 posts - 751 through 765 (of 1,248 total)
bugg (1/30/2015)
Mark Cowne (5/3/2012)
SELECT s.ORDER_NUMBER, s.PRODUCT_ID, 1 AS QTY, s.VALUE/s.QTY AS VALUE
FROM @SPLITROW s
INNER JOIN master.dbo.spt_values t ON t.type='P'
AND...
January 30, 2015 at 6:05 am
TomThomson (1/26/2015)
Half the people who have replied so far think they can use a column filter to select rows, which is a bit startling; and more than four...
January 26, 2015 at 6:47 am
You're welcome. I've done some tinkering with postcodes myself in the past so I recognised what you were trying to do 🙂
January 26, 2015 at 5:33 am
SELECT
left(Postcode,patindex('%[0-9]%',postcode)-1)
FROM YourTable
where patindex('%[0-9]%',postcode) > 0
order by 3
That should do the trick for all the...
January 26, 2015 at 5:29 am
Have all your postcodes definitely got numbers in them? I know they should have but it might be worth checking.
January 26, 2015 at 5:05 am
c.simpson (1/26/2015)
I would like to extract the first part of the post code.for example I have
AA1 2BB
A1 2B
A4 2BB
I would like my field to ready
AA
A
A
Thanks
left(Postcode,patindex('%[0-9]%',postcode)-1)
Does that do what you...
January 26, 2015 at 4:44 am
That definitely sounds like a good idea. We've got some tables that are 300-ish columns wide and I'd said at least at third of those are all nulls (don't...
January 23, 2015 at 2:02 am
Ed Wagner (1/20/2015)
djj (1/20/2015)
DiagnosticTune-Up
Flat
January 22, 2015 at 4:49 am
Richard Warr (1/20/2015)
I thought it was 10^38 - 1 which works for a DECIMAL(38,0) type. That's a much bigger number than the BIGINT type gives you.
That's what I thought too....
January 20, 2015 at 2:41 am
Stuart Davies (1/16/2015)
Ed Wagner (1/15/2015)
djj (1/15/2015)
Ed Wagner (1/15/2015)
SQLRNNR (1/15/2015)
Ed Wagner (1/15/2015)
Taxes@$!%#$!^#
Gouge
Excess
Spend
Thrift
Store
January 16, 2015 at 3:44 am
Ed Wagner (1/15/2015)
ChrisM@Work (1/15/2015)
Ed Wagner (1/15/2015)
ChrisM@Work (1/15/2015)
BWFC (1/15/2015)
richxs (1/15/2015)
Giraffe DBA (1/14/2015)
SQLRNNR (1/14/2015)
Ed Wagner (1/14/2015)
djj (1/14/2015)
BWFC (1/14/2015)
Ed Wagner (1/14/2015)
Stuart Davies (1/14/2015)
TomThomson (1/13/2015)
Ed Wagner (1/13/2015)
SQLRNNR (1/13/2015)
regexPattern
Match
Point
Edge
Bono
Sonny
Cher
Babe (i've got you ...)
Ruth
Sultan
Swing
Swap
Meet
Potato
Gravy
Train
January 15, 2015 at 5:44 am
richxs (1/15/2015)
Giraffe DBA (1/14/2015)
SQLRNNR (1/14/2015)
Ed Wagner (1/14/2015)
djj (1/14/2015)
BWFC (1/14/2015)
Ed Wagner (1/14/2015)
Stuart Davies (1/14/2015)
TomThomson (1/13/2015)
Ed Wagner (1/13/2015)
SQLRNNR (1/13/2015)
regexPattern
Match
Point
Edge
Bono
Sonny
Cher
Babe (i've got you ...)
Ruth
Sultan
Swing
January 15, 2015 at 2:25 am
Ed Wagner (1/14/2015)
Stuart Davies (1/14/2015)
TomThomson (1/13/2015)
Ed Wagner (1/13/2015)
SQLRNNR (1/13/2015)
regexPattern
Match
Point
Edge
Bono
January 14, 2015 at 5:56 am
I did think your question was over-thinking things with CASE statements in there. You're right, MIN() won't work. Can you post some sample data please? This...
January 9, 2015 at 5:12 am
Viewing 15 posts - 751 through 765 (of 1,248 total)