[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Updating a table
Just some thoughts:
Since you use the underscore in [$_temptable] it must be
a local procedure, I wonder if #count should not be #_count?
Same for [$building]?
And what is in $building? Why use the [ ] around it? This is
usually just used for pieces of sql (so if it contains a subquery
it would make sense).
Are the zero's in col3 put in by the update (i.e. is there 'null'
without the update?)?
Are the insert and update both in local procedures? Have you tried the
-C option in the 'begin-sql' statement?
Something else, why do you insert chars in the float columns?
Maybe some of this will help.... or the answers will give 'us' more
information
Arjan
--- Philippe Godin <philippe.godin@VIDEOTRON.CA> wrote:
> Good day,
>
> Does any of you out there have ever tried to update an SQL SERVER
> 7.0
> temporary table using variables?
> This is my problem, I'm trying to update a table that I've
> created
> likewise:
>
> CREATE TABLE [$temptable] (col1SQL varchar(30),col2 int,col3
> float,col4
> float,col5 float,col6 float,col7 float,col8 float,col9 float,col10
> float,col11 float,col12 float,col13 float);
>
> $temptable is a timestamp.
>
> I succeed in doing inserts such as:
>
> insert into [$_temptable] values
> ($building,#count,'','','','','','','','','','','')
>
> But can't get this to work:
>
> update [$_temptable] set col3 = #count where col1SQL = [$building]
>
> Sqr isn't giving any errors on this but put 0 everywhere in the table
> instead of putting 52...
>
> I've tried different ways of using the varaibles such as putting them
> within
> [] etc. but can't get this to work
>
> It seems that the more strange it looks the best it's work.
>
> TIA
> Philippe Godin
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/