INSERT Statment -- math or concantenation problem

# Thread: INSERT Statment -- math or concantenation problem

1. Senior Member
Join Date
Dec 1969
Posts
228

## INSERT Statment -- math or concantenation problem

How can I calclulate this price (price-(price*20/100)) in my INSERT query?<BR><BR>"INSERT INTO ORDERED (sessionid, price) "_<BR> & " SELECT ORDERS.ordernumber, (ORDERS.price - ORDERS.price * &#039;"& session("disc")/100&") from ORDERS " _<BR> & " WHERE ...

2. Senior Member
Join Date
Dec 1969
Posts
1,175

## RE: INSERT Statment -- math or concantenation prob

yes<BR>whats the problem?<BR><BR>

3. Senior Member
Join Date
Dec 1969
Posts
228

## It's inserting the price, not 20% of the pric

Do I have the concantenation correct? The price is being inserted without any modification. That&#039;s the problem

4. Senior Member
Join Date
Dec 1969
Posts
1,175

## RE: It's inserting the price, not 20% of the

well<BR><BR>(ORDERS.price - <BR> (ORDERS.price * ("& session("disc") &"/100))) <BR><BR>give this a whirl, if no go.<BR>do a response.write sql<BR>so I can see the rendered sql.

5. Senior Member
Join Date
Dec 1969
Posts
228

## THE SQL

INSERT INTO ORDERED (sessionid, price) SELECT ORDERS.ordernumber, (ORDERS.price - ORDERS.price * 0) from ORDERS WHERE buyerid=&#039;1&#039;

6. Senior Member
Join Date
Dec 1969
Posts
1,175

## something - 0 is something?

do you see what i see?

7. Senior Member
Join Date
Dec 1969
Posts
228

## Session Variable was from DOTNET to ASP page

I was passing the session variable form a dot net page to a "classic" ASP page. I forgot they drop off.<BR><BR>So I put in a querystring and fixed the problem

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•