Hi Javier,

This statement is probably not correct

SET VAR v_date TEXT = (.vmonth + ', ' + CTXT(IYR(.vinc_date)))

It should be:

SET VAR v_date TEXT = (.vmonth + ', ' + (CTXT(IYR(.vinc_date))))

Secondly, If you replace the second + by &, you can leave out the space
after the , 
R:base will add a space automatically
Then, It looks like this:

SET VAR v_date TEXT = (.vmonth + ',' & (CTXT(IYR(.vinc_date))))

Succes

Tony

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Javier
Valencia
Sent: vrijdag 18 juni 2010 8:27
To: RBASE-L Mailing List
Subject: [RBASE-L] - What is wrong with this code...

The following code runs correctly on 7.5
====================
SET ERROR MESSAGE 2038 OFF
drop table Temp_graph1
SET ERROR MESSAGE 2038 ON
CREATE TEMP TABLE `Temp_graph1`  +
(`labor_sort` INTEGER    ,  +
 `labor_date` TEXT 15     ,  +
 `labor_hr_reg` REAL   ,  +
 `labor_hr_ot` REAL   ,  +
 `labor_hr_2times` REAL   ,  +
 `labor_hr_all` REAL   )

SET VAR vhr_reg_t REAL = 100.0
SET VAR vhr_ot_t REAL = 100.0
SET VAR vhr_2times_t REAL = 100.0
SET VAR vhr_all_t REAL = 300.0
SET VAR vinc_date DATE = '10/05/2007'
SET VAR vmonth = (TMON(.vinc_date))
SET VAR v_date TEXT = (.vmonth + ', ' + CTXT(IYR(.vinc_date)))

INSERT INTO temp_graph1 +
(labor_sort, +
labor_date, +
labor_hr_reg, +
labor_hr_ot, +
labor_hr_2times, +
labor_hr_all) +
VALUES +
(1,.v_date,.vhr_reg_t, .vhr_ot_t, .vhr_2times_t, .vhr_all_t)

RETURN
====================

The code simply creates a table, defines a few variables and loads them into
the table.

When I run the same code on Extreme64 I get the message:

ERROR - Column labor_date must be a valid TEXT. (122)

Obviously the variables are the correct type as they are freshly defined and
verified while tracing. The code has been R:Styled and does not show any
errors.
Can anyone duplicate this issue?
I am running the latest R:Base Extreme 9.0(64) Version 9.0.1.10604

Any help will be greatly appreciated.

Javier,

Javier Valencia, PE
913-829-0888 Office
913-915-3137 Cell
913-649-2904 Fax
[email protected]


Reply via email to