View previous topic :: View next topic
|
Author |
Message |
BAJJI
New User
Joined: 15 Jul 2005 Posts: 47
|
|
|
|
hi,
In a table, one field is declared string, which contains more than one space between two words, eg,
ABC DEF FEGLH
the requirement is to remove all the spaces between the words and insert only a single space like this ....
ABC DEF FEGLH
I want a query or Stored Procedure, as its a table.........
In program we can do this by breaking the strings, but not getting how to do this in a query or Stored Proc
Please answer this ASAP
thanks,
Kiran. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
there is no difference between
and
you should use the UB code - code /code to show examples.
and
if that is what you mean. |
|
Back to top |
|
|
BAJJI
New User
Joined: 15 Jul 2005 Posts: 47
|
|
|
|
yes this is what i mean...
now, some one help me out in handling this requirement.
thanks,
Kiran. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
I will assume that english is not your native tongue, thus the very rude usage of ASAP and 'now, someone do my work for me'.
how are you determining that the COLUMN
(fields are in records and working-storage definitions, DB2 Rows do not have fields)
contains more than one space between non-space characters?
This appears to be a 'repair the data' function and suggest that you do it programatically as apposed to SQL.
Though someone could probably generate the necessary sql to determine if the column requires 'repair' and then 'repair' the column, this kind of SQL would require a lot of resources. Would not advise a mass-update. Since you would/should use a cursor, that would mean your data is in the program, so repair it with the programming language you are using.
Before you 'repair' the data, suggest you modify the original INSERT logic to assure that this does not occur, then 'repair' your data. |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
what's the meaning of Warnings : 1? how many warnings or different types of warning exists? does it mean a user is banned?.... |
|
Back to top |
|
|
PascalQ
New User
Joined: 12 May 2006 Posts: 20
|
|
|
|
acevedo wrote: |
what's the meaning of Warnings : 1? how many warnings or different types of warning exists? does it mean a user is banned?.... |
as the mod said, read the rules
they say you're not banned with just 1 warning. |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
fwiw:
Edit or Remove
The moderating, support and other teams reserve the right to edit or remove any post at any time. The determination of what is construed as indecent, vulgar, spam, etc. as noted in these points is up to Team Members and not users
Warning
Users abusing these rules will be given One(1) warning only. If the offence is repeated, they will face a possible ban. If you received one or more warning then you are not eligible to participate in the 'MEMBER OF THE MONTH' Contest.
Ban
Users will be warned a maximum of three times for any and all offences in a three month period. If the need arises for a fourth warning a temporary ban will be put in place of between 1 to 3 days. Arguing with team members after having received a warning will lead to an immediate additional warning. Should this exceed three strikes a temporary ban will be put in place as above.
Termination
OUR GOAL IS NOT POPULATION, BUT PERFECTION. So we have the rights to terminate the membership without any notice, if the user is not active for a long period. |
|
Back to top |
|
|
BAJJI
New User
Joined: 15 Jul 2005 Posts: 47
|
|
|
|
Hi dbzTHEdinosauer,
Yes, English is not my native language.
But I sincerely apologize if my wordings spelt rude which i never intended.
Thanks,
Kiran. |
|
Back to top |
|
|
|