Getting Started with Adobe After Effects - Part 6: Motion Blur
First Time? You can support us by signing up. It takes only 5 seconds. Click here to sign up. If you already have an account, click here to login.

TSQL Challenge 54 - Find the longest matching area code from phone numbers

25   Comments   

Unsubscribe from Notifications
  • Hi, I have two questions:

    1. Is it possible to have two records with the same phone number in TC54_CallLog? If yes, then what is expected in result set: one or two rows? Basically, should we have in result distinct numbers or for each row we should have one result row?
    2. Format of phone numbers - will be always the same (13 digits with double zero at the begining)?
    commented on Apr 18 2011 6:28AM  .  Report Abuse This post is not formatted correctly
    Maciej Chrzanowski
    92 · 2% · 594
  • mjc,

    1. you can assume a number to appear only once

    2. the numbers always start with 00 but can be shorter or longer that 13 digits in their overall legnth; this is because telephone numbers from all over the world vary in length

    commented on Apr 18 2011 7:35AM  .  Report Abuse This post is not formatted correctly
    dishdy
    17 · 10% · 3262
  • thanks dishdy for precizing those details

    commented on Apr 18 2011 7:50AM  .  Report Abuse This post is not formatted correctly
    Maciej Chrzanowski
    92 · 2% · 594
  • We can create a function to do it. Is it OK?

    commented on Apr 18 2011 10:23AM  .  Report Abuse This post is not formatted correctly
    KevinSun
    989 · 0% · 26
  • kevinSun,

    No functions allowed!

    See Note 1 on the challenge home page.

    commented on Apr 18 2011 10:50AM  .  Report Abuse This post is not formatted correctly
    dishdy
    17 · 10% · 3262
  • What if there are two equal-length matches i.e. a dialed number such as 0012049179 in the sample data? Do we report both or report first match only?

    Rgds, phh

    commented on Apr 19 2011 2:44AM  .  Report Abuse This post is not formatted correctly
    PHHatWork
    741 · 0% · 42
  • phh,

    Unless I misunderstood your question, in my opinion it should be obvious that in the data you will get two different local numbers for the same area code.

    The only odd case you'll need to deal with is when there is no matching area code. And in that case you should not display the number in your result.

    commented on Apr 19 2011 6:37AM  .  Report Abuse This post is not formatted correctly
    dishdy
    17 · 10% · 3262
  • Hi Dishdy,

    So my sample number of 0012049179 would report as:

    Dialed Number  PFX 
    ---------------------  --------
    0012049179      1204   Canada-Manitoba
    0012049179      9179   Ahmedabad-India
    

    i.e. two lines in the output?

    commented on Apr 19 2011 7:02AM  .  Report Abuse This post is not formatted correctly
    PHHatWork
    741 · 0% · 42
  • pph,

    You need to distinguish between the prefix and the local number. In your example 0012049179, 1204 is the prefix and 9179 is the local number. Why are you also interpreting 9179 as if it were a prefix?

    commented on Apr 19 2011 7:43AM  .  Report Abuse This post is not formatted correctly
    dishdy
    17 · 10% · 3262
  • I would like say show "0012049179 1204 Canada-Manitoba" only, Remember the area code always starts from beginning.

    commented on Apr 19 2011 7:46AM  .  Report Abuse This post is not formatted correctly
    KevinSun
    989 · 0% · 26
Previous 1 | 2 | 3 Next

Your Comment


Sign Up or Login to post a comment.

Managed Windows Shared Hosting by OrcsWeb

Copyright © Rivera Informatic Private Ltd.