on 01-26-2022 2:55 AM
I have a Crystal Report with a Command that pulls the data from MS SQL server. I need to update a field if the value is 0. Can I put my update sql statement in a formula field to update the database?
Database: MS SQL Server
Update statement:
UPDATE TEST.dbo.TRACK
SET @maxtrack = @maxtrack+1 , TrackingNumber = @maxtrack
where JobNumber = '40734C'
and TrackingNumber = '0'
To use a formula for SQL Update, there's a 3rd-party Crystal Reports UFL (User Function Library) that includes a function for this.
Ken Hamady maintains a list of 3rd-party UFLs here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No but you may be able to use a SQLExpression, just be careful where you put it so it only gets triggered once.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.