Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Syntax Error on Coding
Message
From
16/12/2019 08:18:00
 
 
To
16/12/2019 08:08:53
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01672255
Message ID:
01672266
Views:
48
Thank you.


>Howdy all,
>
>I have a temp table that has most of teh data imported from a txt delimited file. Therefore all the data (records) are in character format. I am wanting to upload the file to a table for a cursor I have created on teh fly (crsDailyRecs). The view I am attempting to input into is called (lv_daily).
>
>I'm receiving an error message on the VAL (crsDailyRecs...) ) portion of the code.
>
>
> INSERT INTO lv_daily (symbol, trade_date, trade_time, ;
> stock_open, stk_high, stk_low, stk_close, stock_vol, hh_calc, ll_calc, days_calc, conv_date, full_daydate) ;
> VALUES (crsDailyRecs.symbol, crsDailyRecs.trade_date, crsDailyRecs.trade_time, ;
> crsDailyRecs.stock_open, crsDailyRecs.stk_high, crsDailyRecs.stk_low, crsDailyRecs.stk_close, crsDailyRecs.stock_vol, ;
> (VAL(crsDailyRecs.stk_high) - VAL(crsdailyrecs.stock_open)) as crsDailyRecs.value1)

What Nadia said, about the AS clause - I think the parser doesn't allow it outside of a Select, and the alias for an expression has to be a single name anyway, can't be alias.name, and it's useless here as the name is not used anywhere else, and it can't be used anyway, it's just a value expression.
If removing it doesn't work or produces a different error (type mismatch perhaps)... is full_daydate a datetime? Then val()-val() would be a numeric and impossible to store into a datetime field.
Thanks in Advance.

J. Turner
Previous
Reply
Map
View

Click here to load this message in the networking platform