Home
Designing Analytics Reports
Select only the numeric values before - in string
Migrateduser
<div>I have a string which has numeric characters or string characters at the begining followed by -.</div>
<div> </div>
<div>I want to select data based on following rules</div>
<div> </div>
<div>A. only the numeric value </div>
<div> </div>
<div>B.If any string value present before - then show null\blank</div>
<div> </div>
<div>C.if no numeric value found and no - found at the beginning then show null</div>
<div> </div>
<div><strong>Example A</strong></div>
<div>1. </div>
<div> </div>
<div>Current I/P</div>
<div>
</div>
<div> </div>
<div>2 - hello world</div>
<div> </div>
<div>Desired o/p</div>
<div>
</div>
<div> </div>
<div>2</div>
<div> </div>
<div><strong>ExampleB</strong></div>
<div> </div>
<div>Current I/P</div>
<div>
</div>
<div> </div>
<div>ab -hello world</div>
<div> </div>
<div> </div>
<div>Desired o/p</div>
<div>
</div>
<div> </div>
<div>
<div><strong>ExampleC</strong></div>
<div> </div>
<div>Current I/P</div>
<div>
</div>
<div> </div>
<div>hello world</div>
<div> </div>
<div> </div>
<div>Desired o/p</div>
<div>
</div>
<div> </div>
</div>
Find more posts tagged with
Comments
There are no comments yet