January 28, 2013 at 1:43 am
Can anybody help me to return the actcode where last three digit don't contain 000 (three zero)
SELECT COMCOD, ACTCODE, ACTDESC
FROM ACINF
WHERE (ACTCODE NOT IN
(SELECT ACTCODE FROM ACTRNA)) AND (COMCOD = 3309)
Returns :--
COMCOD ACTCODE ACTDESC
3309 10000000000 DIRECT MATRIALS
3309 10100000000 DIRECT MATERIALS
3309 10200000000 M.S. ROD
3309 10200100000 M.S.ROD X-TREAM
3309 10200101000 M.S.ROD X-TREAM 500
3309 10200200000 M.S.ROD 60 GRADE D/BAR
3309 10200201000 M.S.ROD 60 GRADE D/BAR
3309 10200201003 M.S.ROD 60 GRADE 12MM
3309 10200201004 M.S.ROD 60 GRADE 16MM
3309 10200201005 M.S.ROD 60 GRADE 20MM
3309 10200202000 M.S. ROD 40 GRADE
3309 10300000000 CEMENT
3309 10300100000 CEMENT
3309 10300101000 CEMENT (GREY)
3309 10300102000 CEMENT (WHITE)
3309 10300102001 CEMENT (WHITE)
3309 10400000000 SAND
3309 10400100000 SAND
3309 10400101000 FILLING SAND
3309 10400102000 MEDIUM SAND
3309 10400102001 MEDIUM SAND FM-1.2
January 28, 2013 at 1:45 am
What datatype is actcode?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 28, 2013 at 4:22 am
nchar
January 28, 2013 at 5:20 am
zahid_7777 (1/28/2013)
nchar
Thanks.
WHERE RIGHT(ACTCODE,3) <> '000'
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 28, 2013 at 8:39 pm
Thank you very much I will try.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply