Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Am I Crazy ? Update a record without form input

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-03-18 : 06:21:35
Mark writes "I want to retreive a set of records from a table
then turn around and assign those records to a rep
for processing.
all in one script.

Here's what I got

dim getsql
getsql = "SELECT * FROM washington WHERE company = 'mcdonalds'"
rs.open getsql, conn

dim coid
coid = rs("Company")

dim assignsql
assignsql = "UPDATE Washington set Rep = 'Demonstration' WHERE company = '" & coid & "'"
assignsql, conn

when I run this I get the error
"type mismatch"
It hurts when I go Like that."

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-03-18 : 07:21:07
Why don't you do this in a stored procedure?

What is the datatype of coid? Your update statement thinks its a character string ...

Jay White
{0}
Go to Top of Page
   

- Advertisement -