romeiovasu
asked on
sql 2005 category number
i have a get a result where it shows the top category like
cellularaccessories motorola faceplate ki krzr
i am looking only for cellular accessories how can i get that.
my data structure is like this
cellularaccessories motorola faceplate ki krzr
i am looking only for cellular accessories how can i get that.
my data structure is like this
CategoryNumber CategoryName
101010 CellularAccessories
10101010 FacePlates
1010101010 FaceplatesAM
101020 cellcards
10102010 cellcards1
1010201010 cellcardsam
gpid pidentifier categorynumber description
3013 CAFPMI000054 1010101010 MOTOROLA FACEPLATE K1 KRZR
3171 CAFPTM000063 1010201010 productcellcaram1
3172 CAFPTM000066 1010201020 productcellcaram2
3173 CAFPTM000067 1010201020 productcellcaram3
Assuming that the upper table is A and the lower is B
select description fro B where categorynumber = 101010
select description fro B where categorynumber = 101010
ASKER
sorry i got the query by myself the query is
SELECT * FROM arjayiqm.arjaytelecom.dbo. iQclerk_Gl obalProduc ts WHERE LEFT(categorynumber,6) = '101010'
so i am not allocating any points for anybody.
SELECT * FROM arjayiqm.arjaytelecom.dbo.
so i am not allocating any points for anybody.
ASKER
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
sorry , paste mistake , it should be :
SELECT * FROM arjayiqm.arjaytelecom.dbo.iQclerk_GlobalProducts WHERE categorynumber like '101010%'
ASKER
thank you
where categorynumber = 101010