Question: This is my code:

```
public void playSound(String uri,int flag)
    {
        Uri uri1=Uri.parse(uri);
        ContestVoteFragment fragment = (ContestVoteFragment) fragments.get(0);
        if (fragment.playSound(flag))
        {
            if (mediaPlayer==null)
            {
                mediaPlayer=new MediaPlayer();
                mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
                try {
                    mediaPlayer.setDataSource(uri);
                    mediaPlayer.prepare();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                mediaPlayer.start();

            }else {
                mediaPlayer.stop();
                mediaPlayer.reset();
                mediaPlayer.release();
                mediaPlayer=new MediaPlayer();
            mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
                try {
                    mediaPlayer.setDataSource(uri);
                    mediaPlayer.prepare();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                mediaPlayer.start();
            }
        }else {
            if (mediaPlayer!=null)
            {
                if (mediaPlayer.isPlaying())
                {
                    mediaPlayer.stop();
                }
            }
        }
    }
}

```

But when i play a internet mp3 ,the error message is Couldn't open <http://p9snltngh.bkt.clouddn.com/Fs3M3Cq_Mkex9AsunJt57N22JQp2>: java.io.FileNotFoundException: No content provider
i can’t understand because “<http://p9snltngh.bkt.clouddn.com/FhEbUwGYcmQbXIVMVzd0GyPypDVC>”this uri can play

Answer: 
In your example it is impossible to find the discount for a value such as ***9.999***... it is greater than 9.99 and less than 10 and does not fit inside any of your ranges. I would start by changing your data to:

```
| From | To   | Discount |
|------|------|----------|
| 0    | 10   | 0.05     |
| 10   | 20   | 0.10     |
| 20   | 50   | 0.12     |
| 50   | NULL | 0.13     |

```

And then you could probe the table like so:

```sql
SELECT Discount 
FROM   Discounts
WHERE  (@Value >= [From])
AND    (@Value <  [To] OR [To] IS NULL)

```
We can try using `BETWEEN` here:

```
SELECT
    MAX(IIF(price BETWEEN FROM$ AND TO$, Discount, NULL)) AS Discount
FROM yourTable;

```

We might more typically expect that your table of discounts would store information for multiple groups, e.g. products. In that case, we could write:

```
SELECT
    product,
    MAX(IIF(price BETWEEN FROM$ AND TO$, Discount, NULL)) AS Discount
FROM yourTable
GROUP BY
    product;

```