Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with concatenation of BIG integers

Status
Not open for further replies.

tekpr00

IS-IT--Management
Jan 22, 2008
186
CA
Hello All
Can you help me with concatenation of BIG INT

<select distinct
CASE when pl.firstname IS NULL then '' else pl.firstname END as 'First Name',
CASE when pl.lastname IS NULL then '' else pl.lastname END as 'Last Name',
CASE when pl.playerId IS NULL then '' else pl.playerId END as 'Players ID',

CASE when pc.Cardid IS NULL then '' else max(cast(right('3000000000', 10) as BIGINT))+ convert(nvarchar(9), pc.Cardid) END as'Card ID'
from tPlyr pl
LEFT join tPlEvaluationHistory pcs on pl.playerid = pcs.playerid
left join tPlayerCard pc on pcs.playerid = pc.PlayerId
--WHERE pc.Cardid <> ' '
--WHERE NULLIF(pc.Cardid, '') IS NOT NULL
Group by pl.firstname,pl.lastname,pl.playerId,pc.Cardid >

However, the Cardid field is given me 0 though it should be giving me 3000000000 + 9 digits that is, '3000000000123456789'

fname lstname Playrid Cardid
ZE lastman 999999 0
DAN Redman 999999 0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top