|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
I have a program that uses a "Select" statement. The "Where" condition has a field Empid of length 2 char.
The variable that stores the field value is $eid. I write the statement as Where Empid = rtrim($eid, ' '). only then the statement returns the value. but the same statement with spaces is executed in the quest central works fine! Is there a way i can do away without using that RTrim? Is there a way I can make "Where EmpID = $eid" work from the frontend? Can i solve that updating the drivers? Thanks in advance for the help! -K |
|
#2
|
|||
|
|||
|
is there no one to answer this???
![]() |
|
#3
|
|||
|
|||
|
in PHP:
sqlstring = "select a,b,c...etc" . "From blah " . "where EmpId = '" . trim($empid) . "'" fv
__________________
...because that is the way we have always done it. We've been doing it like that for 80 Years! (How do we change that mindset?) |
|
#4
|
|||
|
|||
|
What is the source of this data?
It can be done, it just depends on where your data source is coming from and its type (i.e. flat file, another table etc) and what langauge/platform your using to manipulate the data?
Answere these and a solution will be delivered to you in this thread. Aj Intrepid Developments |
|
#5
|
|||
|
|||
|
hmm! not that! i m using a language called SQR to do that!
Earlier I was using Infomix DB and there was no preoblem triming the variables that the DB rerurns coz Infomix takes care of triming the trailing spaces in a DB field. DB2 does'nt! If there is some setting or a driver that i can use that can do away with this, i need not be modifying my programs. but now it looks that I need to be rewriting the logics most of the times! |
|
#6
|
||||
|
||||
|
Yes, it will require either using rtrim() on the fields in the actual sql statement or using a specific language's trim function to do it once it is returned.
|
![]() |
| Viewing: Dev Shed Forums > Databases > DB2 Development > Rtrim at source |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|