SQL only row mapping record fetching

Posted by Prasanna on Stack Overflow See other posts from Stack Overflow or by Prasanna
Published on 2010-04-20T11:30:49Z Indexed on 2010/04/20 11:33 UTC
Read the original article Hit count: 215

Filed under:

I have a customer call detail table in which call details of all customer stored. I have to find out the distinct aparty (means our customer ) who only calls our customers (means bparty also be our numbers) . There is no other domestic call , International calls made by A party (our customer) in this case.

could you people please help me to find the same data.

FILE INPUT oF SAMPLE CDR TABLE

ROW NAME VALUES ANUMBER :->any mobile number(Domestic+International); for our customer it must like 70,070,0070,9370) BNUMBER :->any mobile number(Domestic+International); for our customer it must like 70,070,0070,9370 CALLTRANSACTION :->eg: 91,92,93 etc CALLTRANSACTIONTYPEC :->eg: MOC,MTC FILENAME :->MCS_01 etc TIME:-> any time value

Required Output

DISTINCT ANUMBER :->for our customer it mobile number must start with 70 or 070 or 0070 or 9370 BNUMBER :-> for our customer it mobile number must start with 70 or 070 or 0070 or 9370

means our customer only calls to our network customer ( No other doestic call or international calls made by our operator)

© Stack Overflow or respective owner

Related posts about tsql