添加链接
注册
登录
link管理
链接快照平台
输入网页链接,自动生成快照
标签化管理网页链接
相关文章推荐
正直的棒棒糖
·
数据类型 | Apache Flink
·
6 月前
·
魁梧的咖啡豆
·
Python爬虫--- 1.5 ...
·
1 年前
·
爱玩的跑步鞋
·
焦作一医院遇“呼死你”骚扰:警方坦言难查,网 ...
·
1 年前
·
火爆的沙滩裤
·
从零搭建React企业级项目 - 掘金
·
1 年前
·
任性的野马
·
Kafka实践之Consumer | ...
·
1 年前
·
link管理
›
Solved: Invalid length parameter passed to the LEFT or SUBSTRING function | Experts Exchange
https://www.experts-exchange.com/questions/27308726/Invalid-length-parameter-passed-to-the-LEFT-or-SUBSTRING-function.html
月球上的小摩托
1 年前
About
Pricing
Community
Teams
Start Free Trial
Log in
</div><div class="contentWrapper__CenterContent-sc-1fp29y7-5 hXBTnV"><div class="questionWrapper__QuestionSection-ir5t2q-0 eGMjXE"><div class="questionHeader__HeaderSection-sc-18y0a3b-0 IVqWl"><div class="questionHeader__MetaSection-sc-18y0a3b-2 bQOgkd"><div class="questionHeader__MetaLeft-sc-18y0a3b-3 hFLAY"><img src="https://filedb.experts-exchange.com/files/public/2013/11/18/93aa03c6-eccd-432b-a245-9713593ceb1b.png" alt="Avatar of Denis Orozco"/></div><div class="questionHeader__MetaRight-sc-18y0a3b-4 engfSe"><style data-emotion="css g9cw6v">.css-g9cw6v{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}.css-g9cw6v>*:not(style)~*:not(style){margin-top:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-bottom:0px;-webkit-margin-start:var(--chakra-space-2);margin-inline-start:var(--chakra-space-2);}</style><div class="chakra-stack css-g9cw6v"><div class="author">Denis Orozco</div><img alt="Flag for United States of America" title="United States of America" src="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.4.3/flags/4x3/us.svg" style="display:inline-block;width:1em;height:1em;vertical-align:middle"/><p class="chakra-text css-0">asked on <time datetime="2011-09-14T21:21:48Z">9/14/2011</time></p></div><h1 class="questionHeader__Title-sc-18y0a3b-1 jLLeIg">Invalid length parameter passed to the LEFT or SUBSTRING function</h1></div></div></div><div class="questionBodyWrapper__QuestionBodyWrapper-sc-57cwyz-0 jucnGB"><div id="q27308726" class="questionBody__BodyContent-q874ge-0 csPTmo wysiwyg-content"><div> hi there, <br/> This SQL stament is giving me an error and i haven't been able to resolved it. any ideas?<br/> Error: <br/> Msg 537, Level 16, State 2, Line 18<br/> Invalid length parameter passed to the LEFT or SUBSTRING function.<br/> Drainage_District_Assessme<wbr/>nt data type Float<br/> Thanks, <br/> COHFL<br/> <pre><code class="code-1 nolinks" id="code-8207049"><span>SELECT </span> <span> Case when </span> <span> CAST(LEFT((Drainage_District_Assessment* 100),CHARINDEX('.',(Drainage_District_Assessment * 100))-1)as varchar(5)) = '0' </span> <span> then '' else </span> <span> 'something'</span> <span> FROM TAX_ROLL</span> </code></pre><p class="buttons csButton"><button name="codeSnippetId" type="button" class="button"><span>Select all</span></button><a href="/viewCodeSnippet.jsp?codeSnippetId=8207049" target="_blank" rel="noreferrer" class="button" title="Open in new window"><span>Open in new window</span></a></p> </div><div class="topicTags__TagsSection-sc-1axydhw-0 eOhgMg"><style data-emotion="css xllg9a">.css-xllg9a{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:top;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;max-width:100%;font-weight:var(--chakra-fontWeights-medium);line-height:1.2;outline:0;min-height:1.5rem;min-width:1.5rem;font-size:var(--chakra-fontSizes-sm);border-radius:var(--chakra-radii-md);-webkit-padding-start:var(--chakra-space-2);padding-inline-start:var(--chakra-space-2);-webkit-padding-end:var(--chakra-space-2);padding-inline-end:var(--chakra-space-2);background:var(--chakra-colors-gray-100);color:var(--chakra-colors-gray-800);}.css-xllg9a:focus,.css-xllg9a[data-focus]{box-shadow:var(--chakra-shadows-outline);}</style><span class="css-xllg9a">Microsoft SQL Server</span></div></div><div class="questionFooter__FooterSection-wcye1y-0 dQkQxi"><style data-emotion="css vy21t6">.css-vy21t6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}.css-vy21t6>*:not(style)~*:not(style){margin-top:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-bottom:0px;-webkit-margin-start:5px;margin-inline-start:5px;}</style><div class="chakra-stack css-vy21t6"><style data-emotion="css 1vmjtia">.css-1vmjtia{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-transition:all 250ms;transition:all 250ms;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;white-space:nowrap;vertical-align:middle;outline:none;width:auto;line-height:1.2;border-radius:var(--chakra-radii-md);font-weight:var(--chakra-fontWeights-semibold);height:var(--chakra-sizes-8);min-width:var(--chakra-sizes-8);font-size:12px;-webkit-padding-start:var(--chakra-space-3);padding-inline-start:var(--chakra-space-3);-webkit-padding-end:var(--chakra-space-3);padding-inline-end:var(--chakra-space-3);background:inherit;margin-top:3px;cursor:pointer;}.css-1vmjtia:focus,.css-1vmjtia[data-focus]{box-shadow:0;}.css-1vmjtia[disabled],.css-1vmjtia[aria-disabled=true],.css-1vmjtia[data-disabled]{opacity:0.4;cursor:not-allowed;box-shadow:var(--chakra-shadows-none);}.css-1vmjtia:hover,.css-1vmjtia[data-hover]{background:none;}@media screen and (min-width: 30em){.css-1vmjtia{font-size:17px;}}.css-1vmjtia:active,.css-1vmjtia[data-active]{background:none;}@media screen and (max-width: 1146px){.css-1vmjtia{-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;}}@media screen and (max-width: 1101px){.css-1vmjtia{-webkit-padding-start:inherit;padding-inline-start:inherit;-webkit-padding-end:inherit;padding-inline-end:inherit;}}</style><button type="button" class="chakra-button css-1vmjtia" title="Comments"><style data-emotion="css ktvjz1">.css-ktvjz1{-webkit-margin-end:0.5rem;margin-inline-end:0.5rem;}</style><span class="chakra-button__icon css-ktvjz1"><style data-emotion="css wfucoj">.css-wfucoj{width:var(--chakra-sizes-4);height:var(--chakra-sizes-4);display:inline-block;line-height:1em;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;color:700;vertical-align:middle;margin-top:-4px;margin-right:-6px;}@media screen and (min-width: 30em){.css-wfucoj{width:var(--chakra-sizes-5);height:var(--chakra-sizes-5);}}</style><svg viewbox="0 0 24 24" focusable="false" class="chakra-icon css-wfucoj" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24" fill="none"><path d="M12 20C16.9706 20 21 16.4183 21 12C21 7.58172 16.9706 4 12 4C7.02944 4 3 7.58172 3 12C3 13.5743 3.51156 15.0423 4.39499 16.28L3 20L7.74467 19.0511C9.01172 19.6565 10.4607 20 12 20Z" stroke="#777" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></svg></span>6</button><style data-emotion="css 15p9n5u">.css-15p9n5u{height:24px;}</style><div class="css-15p9n5u"><style data-emotion="css u5l6o5">.css-u5l6o5{opacity:0.6;border:0;border-color:#9b9fa9;border-style:solid;border-left-width:1px;height:100%;}</style><hr aria-orientation="vertical" class="chakra-divider css-u5l6o5"/></div><style data-emotion="css 16k8png">.css-16k8png{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-transition:all 250ms;transition:all 250ms;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;white-space:nowrap;vertical-align:middle;outline:none;width:auto;line-height:1.2;border-radius:var(--chakra-radii-md);font-weight:var(--chakra-fontWeights-semibold);height:var(--chakra-sizes-8);min-width:var(--chakra-sizes-8);font-size:12px;-webkit-padding-start:var(--chakra-space-3);padding-inline-start:var(--chakra-space-3);-webkit-padding-end:var(--chakra-space-3);padding-inline-end:var(--chakra-space-3);background:inherit;cursor:pointer;}.css-16k8png:focus,.css-16k8png[data-focus]{box-shadow:0;}.css-16k8png[disabled],.css-16k8png[aria-disabled=true],.css-16k8png[data-disabled]{opacity:0.4;cursor:not-allowed;box-shadow:var(--chakra-shadows-none);}.css-16k8png:hover,.css-16k8png[data-hover]{background:none;}@media screen and (min-width: 30em){.css-16k8png{font-size:17px;}}.css-16k8png:active,.css-16k8png[data-active]{background:none;}@media screen and (max-width: 1146px){.css-16k8png{-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;}}@media screen and (max-width: 1101px){.css-16k8png{-webkit-padding-start:inherit;padding-inline-start:inherit;-webkit-padding-end:inherit;padding-inline-end:inherit;}}</style><button type="button" class="chakra-button css-16k8png" title="Solutions"><span class="chakra-button__icon css-ktvjz1"><style data-emotion="css 8gliu5">.css-8gliu5{width:var(--chakra-sizes-4);height:var(--chakra-sizes-4);display:inline-block;line-height:1em;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;color:#1EA000;vertical-align:middle;margin-right:-6px;}@media screen and (min-width: 30em){.css-8gliu5{width:var(--chakra-sizes-5);height:var(--chakra-sizes-5);}}</style><svg viewbox="0 0 24 24" focusable="false" class="chakra-icon css-8gliu5" aria-hidden="true"><svg viewbox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.26701 1.45496C4.91008 1.40364 5.52057 1.15077 6.01158 0.732335C7.15738 -0.244112 8.84262 -0.244112 9.98842 0.732335C10.4794 1.15077 11.0899 1.40364 11.733 1.45496C13.2336 1.57471 14.4253 2.76636 14.545 4.26701C14.5964 4.91008 14.8492 5.52057 15.2677 6.01158C16.2441 7.15738 16.2441 8.84262 15.2677 9.98842C14.8492 10.4794 14.5964 11.0899 14.545 11.733C14.4253 13.2336 13.2336 14.4253 11.733 14.545C11.0899 14.5964 10.4794 14.8492 9.98842 15.2677C8.84262 16.2441 7.15738 16.2441 6.01158 15.2677C5.52057 14.8492 4.91008 14.5964 4.26701 14.545C2.76636 14.4253 1.57471 13.2336 1.45496 11.733C1.40364 11.0899 1.15077 10.4794 0.732335 9.98842C-0.244112 8.84262 -0.244112 7.15738 0.732335 6.01158C1.15077 5.52057 1.40364 4.91008 1.45496 4.26701C1.57471 2.76636 2.76636 1.57471 4.26701 1.45496ZM11.7071 6.70711C12.0976 6.31658 12.0976 5.68342 11.7071 5.29289C11.3166 4.90237 10.6834 4.90237 10.2929 5.29289L7 8.58579L5.70711 7.29289C5.31658 6.90237 4.68342 6.90237 4.29289 7.29289C3.90237 7.68342 3.90237 8.31658 4.29289 8.70711L6.29289 10.7071C6.68342 11.0976 7.31658 11.0976 7.70711 10.7071L11.7071 6.70711Z" fill="#078604"/></svg></svg></span>1</button><style data-emotion="css 17xejub">.css-17xejub{-webkit-flex:1;-ms-flex:1;flex:1;justify-self:stretch;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;}</style><div spacing="0" align="stretch" class="css-17xejub"/><style data-emotion="css 10jkc2x">.css-10jkc2x{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;height:45px;max-width:275px;padding-right:5px;}.css-10jkc2x>*:not(style)~*:not(style){margin-top:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-bottom:0px;-webkit-margin-start:0.5rem;margin-inline-start:0.5rem;}@media screen and (max-width: 1250px){.css-10jkc2x{padding-right:0px;}}</style><div class="chakra-stack css-10jkc2x"><div class="css-0"><img class="avatar" src="https://filedb.experts-exchange.com/files/public/2014/6/18/82496a83-0450-4dfe-a6d5-15a593cc49b7.png" alt="Avatar of undefined"/></div><style data-emotion="css tmdwry">.css-tmdwry{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:start;-webkit-box-align:start;-ms-flex-align:start;align-items:start;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;height:75%;}.css-tmdwry>*:not(style)~*:not(style){margin-top:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;}</style><div class="chakra-stack css-tmdwry"><style data-emotion="css 1b4l9yh">.css-1b4l9yh{height:20px;color:var(--chakra-colors-gray-700);font-size:11px;font-weight:600;}</style><div class="css-1b4l9yh">Last Comment</div><style data-emotion="css 1wjumf6">.css-1wjumf6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;font-size:11px;max-width:210px;height:10px;}.css-1wjumf6>*:not(style)~*:not(style){margin-top:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-bottom:0px;-webkit-margin-start:5px;margin-inline-start:5px;}@media screen and (max-width: 768px){.css-1wjumf6{max-width:175px;}}</style><div class="chakra-stack css-1wjumf6"><style data-emotion="css 1y32vh0">.css-1y32vh0{font-weight:600;color:var(--chakra-colors-blue-600);max-width:105px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}@media screen and (max-width: 1160px){.css-1y32vh0{max-width:80px;}}</style><div class="css-1y32vh0">Kevin Cross</div><style data-emotion="css 1kp9ddg">.css-1kp9ddg{opacity:0.6;border:0;border-color:var(--chakra-colors-gray-700);border-style:solid;border-left-width:1px;height:100%;}</style><hr aria-orientation="vertical" class="chakra-divider css-1kp9ddg"/><div class="questionFooter__TimeDisplayWrap-wcye1y-1 jKYDiG">8/22/2022 - Mon</div></div></div></div></div></div></div><div id="a36539681" class="commentCard__CardWrapper-urxmpo-0 mugGS commentCard"><div class="commentCard__AuthorWrapper-urxmpo-3 kUYDQw"><div class="commentCard__MetaSection-urxmpo-1 cDLsha"><div class="lazyload-wrapper "><div style="height:30px" class="lazyload-placeholder"/></div><div class="commentCard__MetaRight-urxmpo-2 haCfBO"><div class="css-0"><div class="metaSubWrap css-0"><div title="Kevin Cross" class="nameDisplay">Kevin Cross</div><div class="lazyload-wrapper "><div style="height:24px" class="lazyload-placeholder"/></div><style data-emotion="css 1b08fi0">.css-1b08fi0{height:12px;}</style><div class="metaDivider css-1b08fi0"><style data-emotion="css 1bdoq9b">.css-1bdoq9b{opacity:0.6;border:0;border-color:#2C2E31;border-style:solid;border-left-width:1px;height:100%;}</style><hr aria-orientation="vertical" class="chakra-divider css-1bdoq9b"/></div><time datetime="2011-09-14T22:16:29Z" class="submitDate">9/14/2011</time></div><style data-emotion="css 1fdnm9k">.css-1fdnm9k{cursor:default;margin-left:5px;}</style><button class="certifiedExpertBadge css-1fdnm9k" expertstatus="GOLD_STATUS_CERTIFIED_EXPERT"><svg width="59" height="18" viewbox="0 0 59 18" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1157_14946)"><path d="M3.6875 0.5H55.3125C57.065 0.5 58.5 1.94712 58.5 3.75V14.25C58.5 16.0529 57.065 17.5 55.3125 17.5H3.6875C1.93498 17.5 0.5 16.0529 0.5 14.25V3.75C0.5 1.94712 1.93498 0.5 3.6875 0.5Z" fill="url(#paint0_linear_1157_14946)" stroke="#D69E2E"/><path d="M18.6436 12.75V5.92505H23.0311V7.09505H19.9306V8.7233H22.7581V9.8933H19.9306V11.58H23.0896V12.75H18.6436Z" fill="#222222"/><path d="M23.6132 12.75L25.6119 9.3083L23.6327 5.92505H25.0952L26.4504 8.3918H26.6259L27.9812 5.92505H29.4437L27.4644 9.3083L29.4632 12.75H28.0007L26.6259 10.2248H26.4504L25.0757 12.75H23.6132Z" fill="#222222"/><path d="M30.3169 12.75V5.92505H33.1249C33.5539 5.92505 33.9308 6.0128 34.2559 6.1883C34.5874 6.3573 34.8441 6.5978 35.0261 6.9098C35.2146 7.2218 35.3089 7.5923 35.3089 8.0213V8.1578C35.3089 8.58027 35.2114 8.95077 35.0164 9.2693C34.8278 9.5813 34.5679 9.82505 34.2364 10.0005C33.9113 10.1695 33.5408 10.254 33.1249 10.254H31.6039V12.75H30.3169ZM31.6039 9.08405H32.9981C33.3036 9.08405 33.5506 8.99952 33.7391 8.83055C33.9276 8.66157 34.0219 8.4308 34.0219 8.1383V8.0408C34.0219 7.7483 33.9276 7.51752 33.7391 7.34855C33.5506 7.17955 33.3036 7.09505 32.9981 7.09505H31.6039V9.08405Z" fill="#222222"/><path d="M36.2012 12.75V5.92505H40.5887V7.09505H37.4882V8.7233H40.3157V9.8933H37.4882V11.58H40.6472V12.75H36.2012Z" fill="#222222"/><path d="M41.5999 12.75V5.92505H44.5639C44.9929 5.92505 45.3666 5.9998 45.6851 6.1493C46.0036 6.2988 46.2506 6.51005 46.4261 6.78305C46.6016 7.05605 46.6894 7.3778 46.6894 7.7483V7.8653C46.6894 8.2748 46.5919 8.6063 46.3969 8.8598C46.2019 9.1133 45.9613 9.29855 45.6754 9.41555V9.59105C45.9354 9.60402 46.1368 9.69507 46.2799 9.86405C46.4229 10.0266 46.4944 10.2443 46.4944 10.5173V12.75H45.2074V10.7025C45.2074 10.5465 45.1651 10.4198 45.0806 10.3223C45.0026 10.2248 44.8693 10.176 44.6809 10.176H42.8869V12.75H41.5999ZM42.8869 9.00605H44.4274C44.7328 9.00605 44.9701 8.92482 45.1391 8.7623C45.3146 8.59332 45.4024 8.3723 45.4024 8.0993V8.0018C45.4024 7.7288 45.3178 7.51107 45.1489 7.34855C44.9799 7.17955 44.7394 7.09505 44.4274 7.09505H42.8869V9.00605Z" fill="#222222"/><path d="M49.2255 12.75V7.09505H47.2365V5.92505H52.5015V7.09505H50.5125V12.75H49.2255Z" fill="#222222"/><path d="M10.8597 7.50769C10.8597 7.50769 11.6581 8.50571 10.9159 9.5894C10.5257 9.57308 8.52122 9.39768 8.52122 9.39768C8.52122 9.39768 7.79992 9.38068 7.70543 9.88785C7.61094 10.395 7 13.5087 7 13.5087C7 13.5087 7 14.0343 7.63113 13.9982C8.26227 13.9622 10.2855 13.7011 10.2855 13.7011C10.2855 13.7011 10.7666 13.5087 10.8236 13.1573C10.8806 12.8058 11.0833 10.2183 11.0833 10.2183C11.0833 10.2183 11.3429 9.85182 12.0851 9.81579C12.8274 9.77975 12.8649 10.0259 12.8649 10.0259C12.8649 10.0259 12.937 10.3236 12.9197 10.4814C12.9024 10.6391 12.8274 13.0532 12.8274 13.0532C12.8274 13.0532 12.9197 13.385 13.2544 13.3673C13.589 13.3497 14.7395 13.1926 14.7395 13.1926C14.8212 13.1585 14.8898 13.1017 14.9363 13.0297C14.9827 12.9578 15.0046 12.8742 14.9992 12.7901C14.9992 12.4747 14.9076 10.4453 14.9076 10.4453C14.9076 10.4453 14.8874 10.0959 14.5541 10.0442C14.2209 9.99255 13.6071 9.94088 13.6071 9.94088C13.6071 9.94088 13.3654 9.92456 13.3474 9.50441C13.3294 9.08427 13.4195 8.3677 13.4195 8.3677C13.4195 8.3677 13.5696 8.12296 13.8098 8.13927C14.05 8.15559 14.5534 8.33167 14.5534 8.33167C14.5534 8.33167 14.7568 8.33167 14.7763 8.1923C14.7958 8.05293 14.72 6.37302 14.72 6.37302C14.7051 6.28267 14.6668 6.19716 14.6086 6.12402C14.5504 6.05087 14.4739 5.99234 14.3861 5.95355C14.0882 5.8305 13.3647 5.56808 13.3647 5.56808C13.3647 5.56808 12.994 5.43211 12.994 5.70813C12.994 5.98415 12.9384 7.68445 12.9384 7.68445C12.9384 7.68445 12.9384 7.8245 12.5857 7.78983C12.5857 7.78983 11.7505 7.77283 11.3047 7.26498C11.3235 6.65312 11.472 5.09626 11.472 5.09626C11.472 5.09626 11.3235 4.76313 11.0263 4.65844C10.7291 4.55374 9.34061 4.02618 9.34061 4.02618C9.34061 4.02618 8.85878 3.88613 8.78449 4.25393C8.7102 4.62172 8.33873 6.59805 8.33873 6.59805C8.33873 6.59805 8.45053 6.96449 8.76574 7.03588C9.08094 7.10726 10.8597 7.50769 10.8597 7.50769Z" fill="#222222"/></g><defs><lineargradient id="paint0_linear_1157_14946" x1="-5.17667" y1="5.96779" x2="61.832" y2="5.27052" gradientunits="userSpaceOnUse"><stop stop-color="#C6964E"/><stop offset="0.438557" stop-color="#F9DBAE"/><stop offset="1" stop-color="#C6964E"/></lineargradient><clippath id="clip0_1157_14946"><rect width="59" height="18" fill="white"/></clippath></defs></svg></button></div></div></div></div><div class="commentBody__CommentBodyWrapper-qtsrh5-0 fhlaeB wysiwyg-content"><div class="content wysiwyg-content fr-view"><div> That typically means that a given string does not contain the character you are searching for in CHARINDEX() -- i.e., '.' -- so when you -1, it results in an invalid length. </div></div></div><div id="a36539698" class="commentCard__CardWrapper-urxmpo-0 mugGS commentCard"><div class="commentCard__AuthorWrapper-urxmpo-3 kUYDQw"><div class="commentCard__MetaSection-urxmpo-1 cDLsha"><div class="lazyload-wrapper "><div style="height:30px" class="lazyload-placeholder"/></div><div class="commentCard__MetaRight-urxmpo-2 haCfBO"><div class="css-0"><div class="metaSubWrap css-0"><div title="Kevin Cross" class="nameDisplay">Kevin Cross</div><div class="lazyload-wrapper "><div style="height:24px" class="lazyload-placeholder"/></div><style data-emotion="css 1b08fi0">.css-1b08fi0{height:12px;}</style><div class="metaDivider css-1b08fi0"><style data-emotion="css 1bdoq9b">.css-1bdoq9b{opacity:0.6;border:0;border-color:#2C2E31;border-style:solid;border-left-width:1px;height:100%;}</style><hr aria-orientation="vertical" class="chakra-divider css-1bdoq9b"/></div><time datetime="2011-09-14T22:18:46Z" class="submitDate">9/14/2011</time></div><style data-emotion="css 1fdnm9k">.css-1fdnm9k{cursor:default;margin-left:5px;}</style><button class="certifiedExpertBadge css-1fdnm9k" expertstatus="GOLD_STATUS_CERTIFIED_EXPERT"><svg width="59" height="18" viewbox="0 0 59 18" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1157_14946)"><path d="M3.6875 0.5H55.3125C57.065 0.5 58.5 1.94712 58.5 3.75V14.25C58.5 16.0529 57.065 17.5 55.3125 17.5H3.6875C1.93498 17.5 0.5 16.0529 0.5 14.25V3.75C0.5 1.94712 1.93498 0.5 3.6875 0.5Z" fill="url(#paint0_linear_1157_14946)" stroke="#D69E2E"/><path d="M18.6436 12.75V5.92505H23.0311V7.09505H19.9306V8.7233H22.7581V9.8933H19.9306V11.58H23.0896V12.75H18.6436Z" fill="#222222"/><path d="M23.6132 12.75L25.6119 9.3083L23.6327 5.92505H25.0952L26.4504 8.3918H26.6259L27.9812 5.92505H29.4437L27.4644 9.3083L29.4632 12.75H28.0007L26.6259 10.2248H26.4504L25.0757 12.75H23.6132Z" fill="#222222"/><path d="M30.3169 12.75V5.92505H33.1249C33.5539 5.92505 33.9308 6.0128 34.2559 6.1883C34.5874 6.3573 34.8441 6.5978 35.0261 6.9098C35.2146 7.2218 35.3089 7.5923 35.3089 8.0213V8.1578C35.3089 8.58027 35.2114 8.95077 35.0164 9.2693C34.8278 9.5813 34.5679 9.82505 34.2364 10.0005C33.9113 10.1695 33.5408 10.254 33.1249 10.254H31.6039V12.75H30.3169ZM31.6039 9.08405H32.9981C33.3036 9.08405 33.5506 8.99952 33.7391 8.83055C33.9276 8.66157 34.0219 8.4308 34.0219 8.1383V8.0408C34.0219 7.7483 33.9276 7.51752 33.7391 7.34855C33.5506 7.17955 33.3036 7.09505 32.9981 7.09505H31.6039V9.08405Z" fill="#222222"/><path d="M36.2012 12.75V5.92505H40.5887V7.09505H37.4882V8.7233H40.3157V9.8933H37.4882V11.58H40.6472V12.75H36.2012Z" fill="#222222"/><path d="M41.5999 12.75V5.92505H44.5639C44.9929 5.92505 45.3666 5.9998 45.6851 6.1493C46.0036 6.2988 46.2506 6.51005 46.4261 6.78305C46.6016 7.05605 46.6894 7.3778 46.6894 7.7483V7.8653C46.6894 8.2748 46.5919 8.6063 46.3969 8.8598C46.2019 9.1133 45.9613 9.29855 45.6754 9.41555V9.59105C45.9354 9.60402 46.1368 9.69507 46.2799 9.86405C46.4229 10.0266 46.4944 10.2443 46.4944 10.5173V12.75H45.2074V10.7025C45.2074 10.5465 45.1651 10.4198 45.0806 10.3223C45.0026 10.2248 44.8693 10.176 44.6809 10.176H42.8869V12.75H41.5999ZM42.8869 9.00605H44.4274C44.7328 9.00605 44.9701 8.92482 45.1391 8.7623C45.3146 8.59332 45.4024 8.3723 45.4024 8.0993V8.0018C45.4024 7.7288 45.3178 7.51107 45.1489 7.34855C44.9799 7.17955 44.7394 7.09505 44.4274 7.09505H42.8869V9.00605Z" fill="#222222"/><path d="M49.2255 12.75V7.09505H47.2365V5.92505H52.5015V7.09505H50.5125V12.75H49.2255Z" fill="#222222"/><path d="M10.8597 7.50769C10.8597 7.50769 11.6581 8.50571 10.9159 9.5894C10.5257 9.57308 8.52122 9.39768 8.52122 9.39768C8.52122 9.39768 7.79992 9.38068 7.70543 9.88785C7.61094 10.395 7 13.5087 7 13.5087C7 13.5087 7 14.0343 7.63113 13.9982C8.26227 13.9622 10.2855 13.7011 10.2855 13.7011C10.2855 13.7011 10.7666 13.5087 10.8236 13.1573C10.8806 12.8058 11.0833 10.2183 11.0833 10.2183C11.0833 10.2183 11.3429 9.85182 12.0851 9.81579C12.8274 9.77975 12.8649 10.0259 12.8649 10.0259C12.8649 10.0259 12.937 10.3236 12.9197 10.4814C12.9024 10.6391 12.8274 13.0532 12.8274 13.0532C12.8274 13.0532 12.9197 13.385 13.2544 13.3673C13.589 13.3497 14.7395 13.1926 14.7395 13.1926C14.8212 13.1585 14.8898 13.1017 14.9363 13.0297C14.9827 12.9578 15.0046 12.8742 14.9992 12.7901C14.9992 12.4747 14.9076 10.4453 14.9076 10.4453C14.9076 10.4453 14.8874 10.0959 14.5541 10.0442C14.2209 9.99255 13.6071 9.94088 13.6071 9.94088C13.6071 9.94088 13.3654 9.92456 13.3474 9.50441C13.3294 9.08427 13.4195 8.3677 13.4195 8.3677C13.4195 8.3677 13.5696 8.12296 13.8098 8.13927C14.05 8.15559 14.5534 8.33167 14.5534 8.33167C14.5534 8.33167 14.7568 8.33167 14.7763 8.1923C14.7958 8.05293 14.72 6.37302 14.72 6.37302C14.7051 6.28267 14.6668 6.19716 14.6086 6.12402C14.5504 6.05087 14.4739 5.99234 14.3861 5.95355C14.0882 5.8305 13.3647 5.56808 13.3647 5.56808C13.3647 5.56808 12.994 5.43211 12.994 5.70813C12.994 5.98415 12.9384 7.68445 12.9384 7.68445C12.9384 7.68445 12.9384 7.8245 12.5857 7.78983C12.5857 7.78983 11.7505 7.77283 11.3047 7.26498C11.3235 6.65312 11.472 5.09626 11.472 5.09626C11.472 5.09626 11.3235 4.76313 11.0263 4.65844C10.7291 4.55374 9.34061 4.02618 9.34061 4.02618C9.34061 4.02618 8.85878 3.88613 8.78449 4.25393C8.7102 4.62172 8.33873 6.59805 8.33873 6.59805C8.33873 6.59805 8.45053 6.96449 8.76574 7.03588C9.08094 7.10726 10.8597 7.50769 10.8597 7.50769Z" fill="#222222"/></g><defs><lineargradient id="paint0_linear_1157_14946" x1="-5.17667" y1="5.96779" x2="61.832" y2="5.27052" gradientunits="userSpaceOnUse"><stop stop-color="#C6964E"/><stop offset="0.438557" stop-color="#F9DBAE"/><stop offset="1" stop-color="#C6964E"/></lineargradient><clippath id="clip0_1157_14946"><rect width="59" height="18" fill="white"/></clippath></defs></svg></button></div></div></div></div><div class="commentBody__CommentBodyWrapper-qtsrh5-0 fhlaeB wysiwyg-content"><div class="content wysiwyg-content fr-view"><div> You can usually fix this by wrapping the statement with a CASE CHARINDEX(...) WHEN 0 ...; however, it looks like you are doing this to determine if a number less the digits after the decimal place is 0 after multiplying it by 100. Therefore, this may be easier:<br/> <pre><code class="code-1 nolinks" id="code-20-36539698-1"><span>SELECT </span> <span> CASE FLOOR(Drainage_District_Assessment * 100)</span> <span> WHEN 0 THEN ''</span> <span> ELSE 'something'</span> <span>FROM TAX_ROLL</span> </code></pre><p class="buttons csButton"><button name="codeSnippetId" type="button" class="button"><span>Select all</span></button><a href="/viewCodeSnippet.jsp?codeSnippetId=20-36539698-1" target="_blank" rel="noreferrer" class="button" title="Open in new window"><span>Open in new window</span></a></p> </div></div></div><div id="a36539699" class="commentCard__CardWrapper-urxmpo-0 mugGS commentCard"><div class="commentCard__AuthorWrapper-urxmpo-3 kUYDQw"><div class="commentCard__MetaSection-urxmpo-1 cDLsha"><div class="lazyload-wrapper "><div style="height:30px" class="lazyload-placeholder"/></div><div class="commentCard__MetaRight-urxmpo-2 haCfBO"><div class="css-0"><div class="metaSubWrap css-0"><div title="Member_2_861731" class="nameDisplay">Member_2_861731</div><div class="lazyload-wrapper "><div style="height:24px" class="lazyload-placeholder"/></div><style data-emotion="css 1b08fi0">.css-1b08fi0{height:12px;}</style><div class="metaDivider css-1b08fi0"><style data-emotion="css 1bdoq9b">.css-1bdoq9b{opacity:0.6;border:0;border-color:#2C2E31;border-style:solid;border-left-width:1px;height:100%;}</style><hr aria-orientation="vertical" class="chakra-divider css-1bdoq9b"/></div><time datetime="2011-09-14T22:18:51Z" class="submitDate">9/14/2011</time></div><style data-emotion="css 1fdnm9k">.css-1fdnm9k{cursor:default;margin-left:5px;}</style><button class="certifiedExpertBadge css-1fdnm9k" expertstatus="CERTIFIED_EXPERT"><svg width="59" height="18" viewbox="0 0 59 18" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1157_14944)"><path d="M3.6875 0.5H55.3125C57.065 0.5 58.5 1.94712 58.5 3.75V14.25C58.5 16.0529 57.065 17.5 55.3125 17.5H3.6875C1.93498 17.5 0.5 16.0529 0.5 14.25V3.75C0.5 1.94712 1.93498 0.5 3.6875 0.5Z" fill="url(#paint0_linear_1157_14944)" stroke="#65C7FF"/><path d="M18.6436 12.75V5.92505H23.0311V7.09505H19.9306V8.7233H22.7581V9.8933H19.9306V11.58H23.0896V12.75H18.6436Z" fill="#222222"/><path d="M23.6132 12.75L25.6119 9.3083L23.6327 5.92505H25.0952L26.4504 8.3918H26.6259L27.9812 5.92505H29.4437L27.4644 9.3083L29.4632 12.75H28.0007L26.6259 10.2248H26.4504L25.0757 12.75H23.6132Z" fill="#222222"/><path d="M30.3169 12.75V5.92505H33.1249C33.5539 5.92505 33.9308 6.0128 34.2559 6.1883C34.5874 6.3573 34.8441 6.5978 35.0261 6.9098C35.2146 7.2218 35.3089 7.5923 35.3089 8.0213V8.1578C35.3089 8.58027 35.2114 8.95077 35.0164 9.2693C34.8278 9.5813 34.5679 9.82505 34.2364 10.0005C33.9113 10.1695 33.5408 10.254 33.1249 10.254H31.6039V12.75H30.3169ZM31.6039 9.08405H32.9981C33.3036 9.08405 33.5506 8.99952 33.7391 8.83055C33.9276 8.66157 34.0219 8.4308 34.0219 8.1383V8.0408C34.0219 7.7483 33.9276 7.51752 33.7391 7.34855C33.5506 7.17955 33.3036 7.09505 32.9981 7.09505H31.6039V9.08405Z" fill="#222222"/><path d="M36.2012 12.75V5.92505H40.5887V7.09505H37.4882V8.7233H40.3157V9.8933H37.4882V11.58H40.6472V12.75H36.2012Z" fill="#222222"/><path d="M41.5999 12.75V5.92505H44.5639C44.9929 5.92505 45.3666 5.9998 45.6851 6.1493C46.0036 6.2988 46.2506 6.51005 46.4261 6.78305C46.6016 7.05605 46.6894 7.3778 46.6894 7.7483V7.8653C46.6894 8.2748 46.5919 8.6063 46.3969 8.8598C46.2019 9.1133 45.9613 9.29855 45.6754 9.41555V9.59105C45.9354 9.60402 46.1368 9.69507 46.2799 9.86405C46.4229 10.0266 46.4944 10.2443 46.4944 10.5173V12.75H45.2074V10.7025C45.2074 10.5465 45.1651 10.4198 45.0806 10.3223C45.0026 10.2248 44.8693 10.176 44.6809 10.176H42.8869V12.75H41.5999ZM42.8869 9.00605H44.4274C44.7328 9.00605 44.9701 8.92482 45.1391 8.7623C45.3146 8.59332 45.4024 8.3723 45.4024 8.0993V8.0018C45.4024 7.7288 45.3178 7.51107 45.1489 7.34855C44.9799 7.17955 44.7394 7.09505 44.4274 7.09505H42.8869V9.00605Z" fill="#222222"/><path d="M49.2255 12.75V7.09505H47.2365V5.92505H52.5015V7.09505H50.5125V12.75H49.2255Z" fill="#222222"/><path d="M10.8597 7.50769C10.8597 7.50769 11.6581 8.50571 10.9159 9.5894C10.5257 9.57308 8.52122 9.39768 8.52122 9.39768C8.52122 9.39768 7.79992 9.38068 7.70543 9.88785C7.61094 10.395 7 13.5087 7 13.5087C7 13.5087 7 14.0343 7.63113 13.9982C8.26227 13.9622 10.2855 13.7011 10.2855 13.7011C10.2855 13.7011 10.7666 13.5087 10.8236 13.1573C10.8806 12.8058 11.0833 10.2183 11.0833 10.2183C11.0833 10.2183 11.3429 9.85182 12.0851 9.81579C12.8274 9.77975 12.8649 10.0259 12.8649 10.0259C12.8649 10.0259 12.937 10.3236 12.9197 10.4814C12.9024 10.6391 12.8274 13.0532 12.8274 13.0532C12.8274 13.0532 12.9197 13.385 13.2544 13.3673C13.589 13.3497 14.7395 13.1926 14.7395 13.1926C14.8212 13.1585 14.8898 13.1017 14.9363 13.0297C14.9827 12.9578 15.0046 12.8742 14.9992 12.7901C14.9992 12.4747 14.9076 10.4453 14.9076 10.4453C14.9076 10.4453 14.8874 10.0959 14.5541 10.0442C14.2209 9.99255 13.6071 9.94088 13.6071 9.94088C13.6071 9.94088 13.3654 9.92456 13.3474 9.50441C13.3294 9.08427 13.4195 8.3677 13.4195 8.3677C13.4195 8.3677 13.5696 8.12296 13.8098 8.13927C14.05 8.15559 14.5534 8.33167 14.5534 8.33167C14.5534 8.33167 14.7568 8.33167 14.7763 8.1923C14.7958 8.05293 14.72 6.37302 14.72 6.37302C14.7051 6.28267 14.6668 6.19716 14.6086 6.12402C14.5504 6.05087 14.4739 5.99234 14.3861 5.95355C14.0882 5.8305 13.3647 5.56808 13.3647 5.56808C13.3647 5.56808 12.994 5.43211 12.994 5.70813C12.994 5.98415 12.9384 7.68445 12.9384 7.68445C12.9384 7.68445 12.9384 7.8245 12.5857 7.78983C12.5857 7.78983 11.7505 7.77283 11.3047 7.26498C11.3235 6.65312 11.472 5.09626 11.472 5.09626C11.472 5.09626 11.3235 4.76313 11.0263 4.65844C10.7291 4.55374 9.34061 4.02618 9.34061 4.02618C9.34061 4.02618 8.85878 3.88613 8.78449 4.25393C8.7102 4.62172 8.33873 6.59805 8.33873 6.59805C8.33873 6.59805 8.45053 6.96449 8.76574 7.03588C9.08094 7.10726 10.8597 7.50769 10.8597 7.50769Z" fill="#222222"/></g><defs><lineargradient id="paint0_linear_1157_14944" x1="1" y1="9.99999" x2="59" y2="10" gradientunits="userSpaceOnUse"><stop stop-color="#A3DCF9"/><stop offset="0.393355" stop-color="#DFF2FF"/><stop offset="1" stop-color="#A3DCF9"/></lineargradient><clippath id="clip0_1157_14944"><rect width="59" height="18" fill="white"/></clippath></defs></svg></button></div></div></div></div><div class="commentBody__CommentBodyWrapper-qtsrh5-0 fhlaeB wysiwyg-content"><div class="content wysiwyg-content fr-view"><div> Try selecting just the second parameter of your LEFT function and see if it returns any negative numbers. Something like:<br/> SELECT CHARINDEX('.',(Drainage_Di<wbr/>strict_Ass<wbr/>essment * 100))-1<br/> FROM TAX_ROLL<br/> If you get negatives, there's your error. <br/> Let us know. </div></div></div><div class="testionialBlock__VariantWrapper-xi2op-0 jINKXw"><style data-emotion="css mzxac4">.css-mzxac4{display:block;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-transition:all 250ms;transition:all 250ms;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;white-space:normal;vertical-align:middle;outline:none;width:auto;line-height:1.2;border-radius:4px;font-weight:var(--chakra-fontWeights-semibold);height:auto;min-width:var(--chakra-sizes-10);font-size:var(--chakra-fontSizes-md);-webkit-padding-start:var(--chakra-space-4);padding-inline-start:var(--chakra-space-4);-webkit-padding-end:var(--chakra-space-4);padding-inline-end:var(--chakra-space-4);background:#ffffff;padding:50px 72px;margin-top:30px;border:1px solid #dbdde2;}.css-mzxac4:focus,.css-mzxac4[data-focus]{box-shadow:var(--chakra-shadows-outline);}.css-mzxac4[disabled],.css-mzxac4[aria-disabled=true],.css-mzxac4[data-disabled]{opacity:0.4;cursor:not-allowed;box-shadow:var(--chakra-shadows-none);}.css-mzxac4:hover,.css-mzxac4[data-hover]{background:#f0f2f5;}.css-mzxac4:active,.css-mzxac4[data-active]{background:var(--chakra-colors-gray-300);}</style><a class="chakra-button insertCta testimonialBlock link-with-ref-id css-mzxac4" id="askQuestionCta" href="https://go.experts-exchange.com/pricing?mixedRegTrack=LO_Solution_Inline_Testimonial&refType=question&refId=27308726&redirect=https%3A%2F%2Fwww.experts-exchange.com%2Fquestions%2F27308726%2FInvalid-length-parameter-passed-to-the-LEFT-or-SUBSTRING-function.html&navigatedFrom=lo_question"><div class="testionialBlock__ContentWrapper-xi2op-1 jkIWjH"><style data-emotion="css 1i57tvb">.css-1i57tvb{font-weight:400;margin-bottom:20px;font-size:20px;line-height:30px;font-style:italic;}</style><div class="testimonialBody css-1i57tvb">I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst</div><style data-emotion="css ldxlt">.css-ldxlt{font-weight:600;font-size:20px;line-height:30px;}</style><div class="testimonialAuthor css-ldxlt">William Peck</div></div></a></div><div id="a36542609" class="commentCard__CardWrapper-urxmpo-0 mugGS commentCard"><div class="commentCard__AuthorWrapper-urxmpo-3 kUYDQw"><div class="commentCard__MetaSection-urxmpo-1 cDLsha"><div class="lazyload-wrapper "><div style="height:30px" class="lazyload-placeholder"/></div><div class="commentCard__MetaRight-urxmpo-2 haCfBO"><div class="css-0"><div class="metaSubWrap css-0"><div title="Alpesh Patel" class="nameDisplay">Alpesh Patel</div><div class="lazyload-wrapper "><div style="height:24px" class="lazyload-placeholder"/></div><style data-emotion="css 1b08fi0">.css-1b08fi0{height:12px;}</style><div class="metaDivider css-1b08fi0"><style data-emotion="css 1bdoq9b">.css-1bdoq9b{opacity:0.6;border:0;border-color:#2C2E31;border-style:solid;border-left-width:1px;height:100%;}</style><hr aria-orientation="vertical" class="chakra-divider css-1bdoq9b"/></div><time datetime="2011-09-15T12:50:38Z" class="submitDate">9/15/2011</time></div><style data-emotion="css 1fdnm9k">.css-1fdnm9k{cursor:default;margin-left:5px;}</style><button class="certifiedExpertBadge css-1fdnm9k" expertstatus="CERTIFIED_EXPERT"><svg width="59" height="18" viewbox="0 0 59 18" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1157_14944)"><path d="M3.6875 0.5H55.3125C57.065 0.5 58.5 1.94712 58.5 3.75V14.25C58.5 16.0529 57.065 17.5 55.3125 17.5H3.6875C1.93498 17.5 0.5 16.0529 0.5 14.25V3.75C0.5 1.94712 1.93498 0.5 3.6875 0.5Z" fill="url(#paint0_linear_1157_14944)" stroke="#65C7FF"/><path d="M18.6436 12.75V5.92505H23.0311V7.09505H19.9306V8.7233H22.7581V9.8933H19.9306V11.58H23.0896V12.75H18.6436Z" fill="#222222"/><path d="M23.6132 12.75L25.6119 9.3083L23.6327 5.92505H25.0952L26.4504 8.3918H26.6259L27.9812 5.92505H29.4437L27.4644 9.3083L29.4632 12.75H28.0007L26.6259 10.2248H26.4504L25.0757 12.75H23.6132Z" fill="#222222"/><path d="M30.3169 12.75V5.92505H33.1249C33.5539 5.92505 33.9308 6.0128 34.2559 6.1883C34.5874 6.3573 34.8441 6.5978 35.0261 6.9098C35.2146 7.2218 35.3089 7.5923 35.3089 8.0213V8.1578C35.3089 8.58027 35.2114 8.95077 35.0164 9.2693C34.8278 9.5813 34.5679 9.82505 34.2364 10.0005C33.9113 10.1695 33.5408 10.254 33.1249 10.254H31.6039V12.75H30.3169ZM31.6039 9.08405H32.9981C33.3036 9.08405 33.5506 8.99952 33.7391 8.83055C33.9276 8.66157 34.0219 8.4308 34.0219 8.1383V8.0408C34.0219 7.7483 33.9276 7.51752 33.7391 7.34855C33.5506 7.17955 33.3036 7.09505 32.9981 7.09505H31.6039V9.08405Z" fill="#222222"/><path d="M36.2012 12.75V5.92505H40.5887V7.09505H37.4882V8.7233H40.3157V9.8933H37.4882V11.58H40.6472V12.75H36.2012Z" fill="#222222"/><path d="M41.5999 12.75V5.92505H44.5639C44.9929 5.92505 45.3666 5.9998 45.6851 6.1493C46.0036 6.2988 46.2506 6.51005 46.4261 6.78305C46.6016 7.05605 46.6894 7.3778 46.6894 7.7483V7.8653C46.6894 8.2748 46.5919 8.6063 46.3969 8.8598C46.2019 9.1133 45.9613 9.29855 45.6754 9.41555V9.59105C45.9354 9.60402 46.1368 9.69507 46.2799 9.86405C46.4229 10.0266 46.4944 10.2443 46.4944 10.5173V12.75H45.2074V10.7025C45.2074 10.5465 45.1651 10.4198 45.0806 10.3223C45.0026 10.2248 44.8693 10.176 44.6809 10.176H42.8869V12.75H41.5999ZM42.8869 9.00605H44.4274C44.7328 9.00605 44.9701 8.92482 45.1391 8.7623C45.3146 8.59332 45.4024 8.3723 45.4024 8.0993V8.0018C45.4024 7.7288 45.3178 7.51107 45.1489 7.34855C44.9799 7.17955 44.7394 7.09505 44.4274 7.09505H42.8869V9.00605Z" fill="#222222"/><path d="M49.2255 12.75V7.09505H47.2365V5.92505H52.5015V7.09505H50.5125V12.75H49.2255Z" fill="#222222"/><path d="M10.8597 7.50769C10.8597 7.50769 11.6581 8.50571 10.9159 9.5894C10.5257 9.57308 8.52122 9.39768 8.52122 9.39768C8.52122 9.39768 7.79992 9.38068 7.70543 9.88785C7.61094 10.395 7 13.5087 7 13.5087C7 13.5087 7 14.0343 7.63113 13.9982C8.26227 13.9622 10.2855 13.7011 10.2855 13.7011C10.2855 13.7011 10.7666 13.5087 10.8236 13.1573C10.8806 12.8058 11.0833 10.2183 11.0833 10.2183C11.0833 10.2183 11.3429 9.85182 12.0851 9.81579C12.8274 9.77975 12.8649 10.0259 12.8649 10.0259C12.8649 10.0259 12.937 10.3236 12.9197 10.4814C12.9024 10.6391 12.8274 13.0532 12.8274 13.0532C12.8274 13.0532 12.9197 13.385 13.2544 13.3673C13.589 13.3497 14.7395 13.1926 14.7395 13.1926C14.8212 13.1585 14.8898 13.1017 14.9363 13.0297C14.9827 12.9578 15.0046 12.8742 14.9992 12.7901C14.9992 12.4747 14.9076 10.4453 14.9076 10.4453C14.9076 10.4453 14.8874 10.0959 14.5541 10.0442C14.2209 9.99255 13.6071 9.94088 13.6071 9.94088C13.6071 9.94088 13.3654 9.92456 13.3474 9.50441C13.3294 9.08427 13.4195 8.3677 13.4195 8.3677C13.4195 8.3677 13.5696 8.12296 13.8098 8.13927C14.05 8.15559 14.5534 8.33167 14.5534 8.33167C14.5534 8.33167 14.7568 8.33167 14.7763 8.1923C14.7958 8.05293 14.72 6.37302 14.72 6.37302C14.7051 6.28267 14.6668 6.19716 14.6086 6.12402C14.5504 6.05087 14.4739 5.99234 14.3861 5.95355C14.0882 5.8305 13.3647 5.56808 13.3647 5.56808C13.3647 5.56808 12.994 5.43211 12.994 5.70813C12.994 5.98415 12.9384 7.68445 12.9384 7.68445C12.9384 7.68445 12.9384 7.8245 12.5857 7.78983C12.5857 7.78983 11.7505 7.77283 11.3047 7.26498C11.3235 6.65312 11.472 5.09626 11.472 5.09626C11.472 5.09626 11.3235 4.76313 11.0263 4.65844C10.7291 4.55374 9.34061 4.02618 9.34061 4.02618C9.34061 4.02618 8.85878 3.88613 8.78449 4.25393C8.7102 4.62172 8.33873 6.59805 8.33873 6.59805C8.33873 6.59805 8.45053 6.96449 8.76574 7.03588C9.08094 7.10726 10.8597 7.50769 10.8597 7.50769Z" fill="#222222"/></g><defs><lineargradient id="paint0_linear_1157_14944" x1="1" y1="9.99999" x2="59" y2="10" gradientunits="userSpaceOnUse"><stop stop-color="#A3DCF9"/><stop offset="0.393355" stop-color="#DFF2FF"/><stop offset="1" stop-color="#A3DCF9"/></lineargradient><clippath id="clip0_1157_14944"><rect width="59" height="18" fill="white"/></clippath></defs></svg></button></div></div></div></div><div class="commentBody__CommentBodyWrapper-qtsrh5-0 fhlaeB wysiwyg-content"><div class="content wysiwyg-content fr-view"><div> First check length greater than minimum length and then after apply the logic.<br/> If fieldvalue length is less than the minimum length applied in sub string function then it will throw an error. </div></div></div><div id="a36542909" class="commentCard__CardWrapper-urxmpo-0 mugGS commentCard"><div class="commentCard__AuthorWrapper-urxmpo-3 kUYDQw"><div class="commentCard__MetaSection-urxmpo-1 cDLsha"><div class="lazyload-wrapper "><div style="height:30px" class="lazyload-placeholder"/></div><div class="commentCard__MetaRight-urxmpo-2 haCfBO"><div class="css-0"><div class="metaSubWrap css-0"><div title="Denis Orozco" class="nameDisplay">Denis Orozco</div><div class="lazyload-wrapper "><div style="height:24px" class="lazyload-placeholder"/></div><style data-emotion="css 1b08fi0">.css-1b08fi0{height:12px;}</style><div class="metaDivider css-1b08fi0"><style data-emotion="css 1bdoq9b">.css-1bdoq9b{opacity:0.6;border:0;border-color:#2C2E31;border-style:solid;border-left-width:1px;height:100%;}</style><hr aria-orientation="vertical" class="chakra-divider css-1bdoq9b"/></div><time datetime="2011-09-15T13:46:29Z" class="submitDate">9/15/2011</time></div><style data-emotion="css e4rzof">.css-e4rzof{display:inline-block;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;min-width:0px;margin-left:5px;}</style><div class="chakra-stack__item css-e4rzof"><style data-emotion="css 1lg3qf2">.css-1lg3qf2{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;cursor:default;border-radius:4px;height:18px;width:57px;line-height:16px;border:1px solid;color:var(--chakra-colors-blue-600);border-color:var(--chakra-colors-blue-300);font-size:10px;font-weight:600;background:#D2E7F8;padding-right:5px;}</style><div title="Question Asker" class="css-1lg3qf2"><style data-emotion="css 1jatiol">.css-1jatiol{width:auto;height:12px;display:inline-block;line-height:1em;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;color:currentColor;}</style><svg width="18" height="18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.4 7.11538C9.4 8.00754 8.66127 8.73077 7.75 8.73077C6.83873 8.73077 6.1 8.00754 6.1 7.11538C6.1 6.22323 6.83873 5.5 7.75 5.5C8.66127 5.5 9.4 6.22323 9.4 7.11538Z" fill="#0054A2"/><path d="M7.75 9.26923C9.26878 9.26923 10.5 10.4746 10.5 11.9615V12.5H5V11.9615C5 10.4746 6.23122 9.26923 7.75 9.26923Z" fill="#0054A2"/><path fill-rule="evenodd" clip-rule="evenodd" d="M13 7.5C13 8.32843 12.3548 9 11.5588 9C11.239 9 10.9435 8.89155 10.7044 8.70806C10.5447 8.58552 9.91176 8.57143 9.5 8.25C10.1176 7.92857 10.1177 7.77322 10.1177 7.5C10.1177 6.67157 10.7629 6 11.5588 6C12.3548 6 13 6.67157 13 7.5ZM11.5588 6.9375C11.4924 6.9375 11.4341 6.97485 11.4027 7.03139C11.3529 7.12102 11.2427 7.15165 11.1565 7.0998C11.0704 7.04795 11.041 6.93325 11.0908 6.84361C11.184 6.67597 11.3586 6.5625 11.5588 6.5625C11.8573 6.5625 12.0993 6.81434 12.0993 7.125C12.0993 7.36992 11.9489 7.57827 11.739 7.65549V7.6875C11.739 7.79105 11.6583 7.875 11.5588 7.875C11.4593 7.875 11.3787 7.79105 11.3787 7.6875V7.5C11.3787 7.39645 11.4593 7.3125 11.5588 7.3125C11.6583 7.3125 11.739 7.22855 11.739 7.125C11.739 7.02145 11.6583 6.9375 11.5588 6.9375ZM11.5588 8.4375C11.6583 8.4375 11.739 8.35355 11.739 8.25C11.739 8.14645 11.6583 8.0625 11.5588 8.0625C11.4593 8.0625 11.3787 8.14645 11.3787 8.25C11.3787 8.35355 11.4593 8.4375 11.5588 8.4375Z" fill="#0054A2"/></svg><p class="chakra-text css-0">ASKER</p></div></div></div></div></div></div><div class="commentBody__CommentBodyWrapper-qtsrh5-0 fhlaeB wysiwyg-content"><div class="content wysiwyg-content fr-view"><div> mwvisa1 your suggestion worked but on my else statement i notice the same code gets used once again how can i accommodate your solution to the statement now?<br/> here is the code: <br/> <pre><code class="code-1 nolinks" id="code-8207198"><span>SELECT </span> <span>CASE FLOOR(Drainage_District_Assessment * 100)</span> <span> WHEN 0 then '' </span> <span> else isnull(CAST(RIGHT('00000' + CAST(LEFT(Drainage_District_Assessment* 100,CHARINDEX('.',Drainage_District_Assessment* 100)-1) as char(5)), 5) as CHAR(5)), '00000') </span>
推荐文章
正直的棒棒糖
·
数据类型 | Apache Flink
6 月前
魁梧的咖啡豆
·
Python爬虫--- 1.5 爬虫实践: 获取百度贴吧内容-腾讯云开发者社区-腾讯云
1 年前
爱玩的跑步鞋
·
焦作一医院遇“呼死你”骚扰:警方坦言难查,网上有包年服务_绿政公署_澎湃新闻-The Paper
1 年前
火爆的沙滩裤
·
从零搭建React企业级项目 - 掘金
1 年前
任性的野马
·
Kafka实践之Consumer | 【永恒依然】的博客
1 年前