I'm writting a script that needs to deterimine the length of a char
value...its easy enough to put length ('my data value') which
evalulates to 13, but when I concatonate it, it says...
SQL0440N No authorized routine named "||" of "FUNCTION" having
compatible arguments was found....
How can I get this to work?
select (space (1) || repeat('0',7) || length ('Some Data String')) 2 5549
|| and its twin CONCATENATE expect a string argument. Just wrap, e.g.,
CHAR around your call to LENGTH (i.e., CHAR(LENGTH('Some Data
String'))) and you should be good-to-go.
--Jeff
BP wrote:
I'm writting a script that needs to deterimine the length of a char
value...its easy enough to put length ('my data value') which
evalulates to 13, but when I concatonate it, it says...
SQL0440N No authorized routine named "||" of "FUNCTION" having
compatible arguments was found....
How can I get this to work?
select (space (1) || repeat('0',7) || length ('Some Data String'))
Note also that when using CHAR, some RTRIMing may be in order, e.g.,
VALUES RTRIM(CHAR(LENGTH('SOME DATA STRING')))||' HELLO, WORLD'
1
------------------------
16 HELLO, WORLD
vs.
VALUES CHAR(LENGTH('SOME DATA STRING'))||'HELLO, WORLD'
1
-----------------------
16 HELLO, WORLD
HTH,
--Jeff
jefftyzzer wrote:
|| and its twin CONCATENATE expect a string argument. Just wrap, e.g.,
CHAR around your call to LENGTH (i.e., CHAR(LENGTH('Some Data
String'))) and you should be good-to-go.
--Jeff
BP wrote:
I'm writting a script that needs to deterimine the length of a char
value...its easy enough to put length ('my data value') which
evalulates to 13, but when I concatonate it, it says...
SQL0440N No authorized routine named "||" of "FUNCTION" having
compatible arguments was found....
How can I get this to work?
select (space (1) || repeat('0',7) || length ('Some Data String'))
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: wing |
last post by:
Hi all,
I find a JavaScript that limits the field length in a textarea, but it
is not completed.
The script does not handle the copy and paste case. For example, says
the textarea field...
|
by: Shawn Modersohn |
last post by:
I've got
<form name="form1>
<select name="select1">
<option value="null" selected>Select A Team</option>
<option value="Cougars">Cougars</option>
<option value="Mavericks">Mavericks</option>...
|
by: torbs |
last post by:
I have a problem when I use javascript to get the length and position
of a movie I recieve from a rtsp stream. The length and position is
extremely high and not the actual length and position of...
|
by: moondaddy |
last post by:
Is there a asp.net validator control that validates the length of the text
being entered or does everyone just write jscript for this?
--
moondaddy@nospam.com
|
by: stealth_spoof |
last post by:
Hi People wondering if anyone can help me with a problem I'm having
I'm trying to create an array with an unspecified length, the length is
based on the result i get from another task in the code...
|
by: dan |
last post by:
I am a bit of a java newbie so please forgive me.
I am trying to do a simple check-all / un-check-all checkbox system.
All of the solutions I have seen use "this.form.elements.length" or a...
|
by: sneddo |
last post by:
Ok I am trying to do the above, I have got a script that will restrict the length but it requires the user to enter the field and hit a key, before it will work.
This would normaly be find, but...
|
by: Bob Murdoch |
last post by:
I'm using the following to send a binary file to a user:
Response.AddHeader('Content-Disposition','attachment;filename=' +
Request('FileName') + ';');
var vType = 'application/octetstream';...
|
by: =?ISO-8859-1?Q?=22=C1lvaro_G=2E_Vicario=22?= |
last post by:
I need to emulate the missing "maxlegth" attribute in "textarea" fields
but all my Google searches either lead to obsolete scripts that
overwrite the "value" property (thus losing caret position)...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |