The SQL command feature allows you to enter any valid SQL command, as long as the last thing it does is SELECT some reports from table(s).
So, yes, you can use DELETE, INSERT, and UPDATE as long as your DB login includes write permissions to the DB.
For so long Cr was a "Read Only" tool. With CR9 (and above) that is no longer the case. ALthough it's not something likely to be used by accident. You have to know what you are doing to make it work properly.
Thanks for all your posts. The database I am querying is missing some records and I happened to be connected at the time they were deleted. I wanted to make sure I hadn't accidently done it in CR. I definitley have a select and not a delete! Thanks again to everyone.
FYI - I've used Crystal to create "DELETE...WHERE" strings where I needed to Delete records at the DETAIL level based on linked values within the database.
I use a text string with embedded data values extracted by Crystal.
DELETE Table WHERE {Field1} = "X" AND {Field2} = "Y"
This creates a report with multiple DELETE command lines that I can export as TEXT and run in MS-SQL.
MJRBIM: You can do the same thing within SQL by creating dynamic SQL, I do it fairly often, and it's faster. more flexible and easier than using CR (for me).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.