1.

Solve : How to prompt for a string and upshift the input.?

Answer» <html><body><p>Anyone know how to prompt for a value and upshift the <a href="https://interviewquestions.tuteehub.com/tag/input-11237" style="font-weight:bold;" target="_blank" title="Click to know more about INPUT">INPUT</a>?<br/><br/>I need a table name before calling SQL Plus and it has to be in upper case.<br/><br/>ThanksFound this in the snippet closet. <a href="https://interviewquestions.tuteehub.com/tag/knew-2148414" style="font-weight:bold;" target="_blank" title="Click to know more about KNEW">KNEW</a> it would be needed someday. You'll need to tweak this for your needs, but this will convert a string entered at the prompt to UPPERCASE:<br/><br/> Code: <a>[Select]</a>echo off<br/><br/>setlocal enabledelayedexpansion<br/><br/>set /p <a href="https://interviewquestions.tuteehub.com/tag/db-344411" style="font-weight:bold;" target="_blank" title="Click to know more about DB">DB</a>=Enter Database Name: <br/><br/>set u=ABCDEFGHIJKLMNOPQRSTUVWXYZ<br/>set <a href="https://interviewquestions.tuteehub.com/tag/l-236827" style="font-weight:bold;" target="_blank" title="Click to know more about L">L</a>=abcdefghijklmnopqrstuvwxyz <br/><br/>set database=%db%<br/>for /l %%b in (0,1,25) do call :u !l:~%%b,1! !u:~%%b,1!<br/>echo "%db%" has been converted to "!database!"<br/><a href="https://interviewquestions.tuteehub.com/tag/goto-1009988" style="font-weight:bold;" target="_blank" title="Click to know more about GOTO">GOTO</a> :eof<br/><br/>:u<br/>  set "database=!database:%1=%2!"<br/>  goto :eof<br/><br/>Good luck.</p></body></html>


Discussion

No Comment Found