Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS data driven query syntax problem

Status
Not open for further replies.

MdmGuil

Programmer
Dec 27, 2000
2
US
Anyone have a clue why this query is giving me errors in DTS? It totally crashes SQL Server:

INSERT INTO PriceList
(PriceList, Description, CreateDate, CreateUser,
MaintenanceDate, MaintenanceUser, UpMe)
VALUES (?,?,?,?,?,?,?)
if (select @@error) = 2627
UPDATE PriceList
SET Description =?, CreateDate =?, CreateUser =?, MaintenanceDate =?,
MaintenanceUser =?


Thanks for your help,

Cass
 
I assume the "?" are not really there in your code, but put in the sample for convenience.

A couple of things, though they probably don't make a difference:

I'd change:
[tt]if (select @@error) = 2627[/tt]
to
[tt]if @@error = 2627[/tt]

Also, your UPDATE statement at the end doesn't have a WHERE clause, so all the records would be updated.

Robert Bradley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top