473,465 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Attribute 'rtrim' is repeated


In trying to trim some data while selecting and loading from 2 tables
into 1 I get the following:

SELECT TRIM(TRAILING ' ' FROM s.strk_sym_cmplt), TRIM(TRAILING ' ' FROM
s.stk_sym), s.c_p, o.dta_date, o.dta_date_num, o.dta_date_dys, o.strk_sym,
o.strk_yr, s.strk_num, s.exp_sym, s.exp_mo, s.exp_mo_num, s.exp_yr,
s.exp_yr_num, s.exp_date, s.exp_date_dys, o.opn, o.hi, o.lw, o.cls, o.vol,
o.opn_intrst, o.bd, o.ak
INTO TABLE optn_calls_tbl
FROM option_data_oprtnl o, strk_data_oprtnl s
WHERE TRIM(TRAILING ' ' FROM o.strk_sym_ful) = TRIM(TRAILING ' ' FROM
s.strk_sym_cmplt) AND s.c_p = 'C';
ERROR: Attribute 'rtrim' is repeated

I understand that rtrim is an underlying function to trim. Is this a BUG???
How do I fix this problem?

Thanks for your help!
Lynn Tilby

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #1
1 1583
On Tue, 28 Oct 2003 Ly********@asu.edu wrote:

In trying to trim some data while selecting and loading from 2 tables
into 1 I get the following:

SELECT TRIM(TRAILING ' ' FROM s.strk_sym_cmplt), TRIM(TRAILING ' ' FROM
s.stk_sym), s.c_p, o.dta_date, o.dta_date_num, o.dta_date_dys, o.strk_sym,
o.strk_yr, s.strk_num, s.exp_sym, s.exp_mo, s.exp_mo_num, s.exp_yr,
s.exp_yr_num, s.exp_date, s.exp_date_dys, o.opn, o.hi, o.lw, o.cls, o.vol,
o.opn_intrst, o.bd, o.ak
INTO TABLE optn_calls_tbl
FROM option_data_oprtnl o, strk_data_oprtnl s
WHERE TRIM(TRAILING ' ' FROM o.strk_sym_ful) = TRIM(TRAILING ' ' FROM
s.strk_sym_cmplt) AND s.c_p = 'C';
ERROR: Attribute 'rtrim' is repeated

I understand that rtrim is an underlying function to trim. Is this a BUG???
How do I fix this problem?


You probably want to give your columns names,
SELECT TRIM(...) AS strk_sym_cmplt, TRIM(...) AS stk_sym, ...

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: svilen | last post by:
hello again. i'm now into using python instead of another language(s) for describing structures of data, including names, structure, type-checks, conversions, value-validations, metadata etc....
0
by: pathisunil | last post by:
Dear All I have an xmldocument which is as formed below. It is a bit of loopy in nature. can anyone kindly let me know how can i write a xslt which would take a parameter which is an attribute...
52
by: Markus Elfring | last post by:
How much are you interested that the attribute "style" will offer the same or similar capabilities like they are provided by the element "style" in the element "head"? Do you want that the...
2
by: jose luis fernandez diaz | last post by:
Hi, This is my rtrim version: inline void rtrim(string *ptr_s) { string::reverse_iterator rit= ptr_s->rbegin(); while(rit != ptr_s->rend() && *rit==' ') ptr_s->erase((++rit).base()); }
0
by: Rashmi Dixit | last post by:
Hi, My application accesses DB2 over DB2 CLI and we use the calls SQLTables, SQLTablePrivileges, SQLColoumns to retrieve the schema information from the system catalog tables. When we call...
4
by: rajdb2 | last post by:
Hi, I am using the following sql statement SELECT rtrim(rtrim(coalesce(substr(char(v.creationdate),1,4) || '-' || substr(char(v.creationdate),6,2) || '-' || substr(char(v.creationdate),9,2) ||...
2
by: David Teran | last post by:
Hi, i am using Postgres 7.4.2 with jdbc. Every time i try to select a varchar the SQL generated by the jdbc driver uses RTRIM(t0.columnname) which breaks an existing application. Is this normal,...
4
by: Mintyman | last post by:
Hi, I have erronous white space at the end of my 'description' field within my 'product' table. I tried using the RTRIM function but it won't let me because it is a TEXTBLOB (text) field. Can...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
Oralloy
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.