[Sql] Check All Char Items By Charname

05/05/2013 18:03 Alexiuns#1
Hello Ebx7
Today i will release Query To check All Char Items By CharName
i hope you like it

Code:
Select INV.CharID, CH.CharName16, INV.ItemID, IT.OptLevel, IT.RefItemID, INV.Slot, REF.ReqGender, REFC.AssocFileICon128, REF.Dur_L, REF.Dur_U, REF.PD_L, REF.PD_U, REF.MD_L, REF.MD_U, REF.ER_L, REF.ER_U, REF.PDStr_L, REF.PDStr_U, REF.MDInt_L, REF.MDInt_U, REF.MaxMagicOptCount, REF.PAttackMin_L, REF.PAttackMin_U, REF.PAttackMax_L, REF.PAttackMin_U, REF.MAttackMin_L, REF.MAttackMin_U, REF.MAttackMax_L, REF.MAttackMin_U, REF.Range, REF.HR_L, REF.HR_U, REF.CHR_L, REF.CHR_U, REF.PAStrMin_L, REF.PAStrMin_U, REF.PAStrMax_L, REF.PAStrMax_U, REF.MAInt_Min_L, REF.MAInt_Min_U, REF.MAInt_Max_L, REF.MAInt_Max_U, REF.PAR_L, REF.PAR_U, REF.MAR_L, REF.MAR_U, REFC.ReqLevel1, REFC.CodeName128 From _Inventory As INV
Right Join _Items As IT On INV.ItemID = IT.ID64
Right Join _RefObjItem As REF On IT.RefItemID = REF.ID
Right Join _RefObjCommon As REFC On REFC.ID = REF.ID
Right Join _Char As CH On CH.CharID = INV.CharID
Where CH.CharName16 = 'Mr.KingDollar'
Order By Slot Asc
Credits : Select ID,CreaterName From _Credit
Result
ID=1
CreaterName=Mr.KingDollar
xD :P
05/08/2013 18:55 PortalDark#2
#approved
05/08/2013 19:01 Schickl#3
That's not worth a thread lol
Everyone with knowledge of SQL can do that in one minute
05/08/2013 19:10 gigola123#4
Why approved? And it's not his query :
[Only registered and activated users can see links. Click Here To Register...]
100% similary.
I don't know why I hate special-magician :(

Quote:
Hello Ebx7
[Only registered and activated users can see links. Click Here To Register...]
05/08/2013 19:12 IceAmStiel#5
Quote:
Originally Posted by Special-Magician View Post
Hello Ebx7
Today i will release Query To check All Char Items By CharName
i hope you like it

Code:
Select INV.CharID, CH.CharName16, INV.ItemID, IT.OptLevel, IT.RefItemID, INV.Slot, REF.ReqGender, REFC.AssocFileICon128, REF.Dur_L, REF.Dur_U, REF.PD_L, REF.PD_U, REF.MD_L, REF.MD_U, REF.ER_L, REF.ER_U, REF.PDStr_L, REF.PDStr_U, REF.MDInt_L, REF.MDInt_U, REF.MaxMagicOptCount, REF.PAttackMin_L, REF.PAttackMin_U, REF.PAttackMax_L, REF.PAttackMin_U, REF.MAttackMin_L, REF.MAttackMin_U, REF.MAttackMax_L, REF.MAttackMin_U, REF.Range, REF.HR_L, REF.HR_U, REF.CHR_L, REF.CHR_U, REF.PAStrMin_L, REF.PAStrMin_U, REF.PAStrMax_L, REF.PAStrMax_U, REF.MAInt_Min_L, REF.MAInt_Min_U, REF.MAInt_Max_L, REF.MAInt_Max_U, REF.PAR_L, REF.PAR_U, REF.MAR_L, REF.MAR_U, REFC.ReqLevel1, REFC.CodeName128 From _Inventory As INV
Right Join _Items As IT On INV.ItemID = IT.ID64
Right Join _RefObjItem As REF On IT.RefItemID = REF.ID
Right Join _RefObjCommon As REFC On REFC.ID = REF.ID
Right Join _Char As CH On CH.CharID = INV.CharID
Where CH.CharName16 = 'Mr.KingDollar'
Order By Slot Asc
Credits : Select ID,CreaterName From _Credit
Result
ID=1
CreaterName=Mr.KingDollar
xD :P
Applause for the bold part..

It's wrong, your query is wrong.. _Items.RefItemID = _RefObjCommon.ID not _RefObjItem.ID..

And why wouldn't you use an inner join, but a right join? You're releasing something that is apparently not even tested, despite the fact that it's not worth a release anyway.
05/09/2013 01:24 Alexiuns#6
Quote:
Originally Posted by gigola123 View Post
Why approved? And it's not his query :
[Only registered and activated users can see links. Click Here To Register...]
100% similary.
I don't know why I hate special-magician :(


[Only registered and activated users can see links. Click Here To Register...]
Thanks You My Love :$

and btw i do it and release it before know if its released before or no

Quote:
Originally Posted by Schickl View Post
That's not worth a thread lol
Everyone with knowledge of SQL can do that in one minute
So What xD ?

Quote:
Originally Posted by IceAmStiel View Post
Applause for the bold part..

It's wrong, your query is wrong.. _Items.RefItemID = _RefObjCommon.ID not _RefObjItem.ID..

And why wouldn't you use an inner join, but a right join? You're releasing something that is apparently not even tested, despite the fact that it's not worth a release anyway.
i tested it before release and working 100%
05/09/2013 01:41 gigola123#7
Quote:
Originally Posted by Special-Magician View Post
Thanks You My Love :$

and btw i do it and release it before know if its released before or no
By whyt3boi there is the link [Only registered and activated users can see links. Click Here To Register...]
Quote:
Code:
Use SRO_VT_SHARD_INIT 
Select CH.CharName16, INV.CharID, INV.ItemID, IT.OptLevel, IT.RefItemID, INV.Slot, REF.ReqGender, REFC.ReqLevel1, REFC.CodeName128 From _Inventory As INV  
Right Join _Items As IT On INV.ItemID = IT.ID64
Right Join _RefObjItem As REF On IT.RefItemID = REF.ID
Right Join _RefObjCommon As REFC On REFC.ID = REF.ID
Right Join _Char As CH On CH.CharID = INV.CharID
Where CH.CharName16 = 'Pal2aDoX' And INV.Slot <= '12'
Order By Slot Asc
05/09/2013 01:51 Alexiuns#8
Quote:
Originally Posted by gigola123 View Post
By whyt3boi there is the link [Only registered and activated users can see links. Click Here To Register...]
yes i see it now
but really i never saw it before
i just do it to help some people not more
05/09/2013 14:01 IceAmStiel#9
Quote:
Originally Posted by Special-Magician View Post
i tested it before release and working 100%
It might seem to be working, but only because the _RefObjItem.ID often equals to the _RefObjCommon.ID in the first segment of items. But the _RefObjItem.ID is actually the _RefObjCommon.Link value.

Add a new item and try to find it with your query in an inventory, it might output even monsters on slots..

Code:
SELECT c.CharID, c.CharName16, i.*, r.CodeName128, ri.MaxStack
FROM dbo._Inventory i 
JOIN dbo._Items it on i.ItemID = it.ID64 
JOIN dbo._RefObjCommon r on it.RefItemID = r.ID 
LEFT JOIN dbo._RefObjItem ri on r.Link = ri.ID 
JOIN dbo._Char c on i.CharID = c.CharID
WHERE c.CharName16 = 'Blablubb'
ORDER BY Slot asc
05/09/2013 14:49 PortalDark#10
it is true
That other thread existed before
this releases, since they are so "random", are hard to remember if other exist
#closed