To answer your direct question, yes, to declare a variable you must do so within a stored procedure or a stored trigger.
A broader answer is that SQL Data Manager provides a great deal of capability. For Pervasive.SQL V8, the documentation for SQL Data Manager was substantially enhanced. In it, you will find sections on the Query Pane and the Query Builder, as well as extensive tasks on how to use the utility.
Refer to the chapter SQL Data Manager in the Pervasive.SQL User's Guide.
Originally posted by frasse7
Is it impossible to write anything but simple select statements? How do I test my scripts without having to write a complete stored procedure?
I understand your frustrations when comparing QA to SQL DM.
I really only have experience with 2000i, although I am beginning to experiment with V85.
What I've found helpful is to have your DROP, CREATE, and "CALL storedproc()" test calls all in the same SQL script (separated by #'s or whatever you use) for debugging.
It's not quite as intuitive as QA but it gets the job done.
Hmm, perhaps I should create a better SQL DM for Pervasive that creates a temporary Stored Proc behind the scenes for you and runs it if it detects variables, and one that doesn't freeze the entire window when running a query (i.e. the bottom pane's results are populated by a separate thread like QA), one that runs when you press 'F5'...If only I had the time. Maybe all of this has improved in V85.