In Oracle SQL Developer Version 4.1.3.20.78, there are two or three line breaks after each line in the Script Output; here’s what I mean:
In the previous version I used (I don’t remember the version number now, but it was 4.x), there was only one line break. How do I change the line breaks back to the previous setting to have more compact Script Output?
Related
I'm working with an existing framework of WinDbg scripts that go through a series of test scripts Test1.txt, Test2.txt, etc., which are generated by C++ code and which output results.
For example a chunk of one of the test scripts would be,
.if (($spat(#"${var}","18300.000000")==1))
{
.logappend C:\Tests\TestResults.txt
.printf "TestNumber=\t1\tExpected=\t18300.000000\tActual=\t%.6f\t******PASSED******\n",poi(poi(#$t2+#$t6)+0x10)
.logclose
}
I'm trying to add functionality that will create a file whose name displays the current # of the test being run, so that users can see their progress without needing to open a file.
My thought process was that I would set up the script generator, so that at the start of Test #N, it would add a line to the script to create a file 'currentlyRunningTestN.txt', and at the end of Test #N, it would add a line to the script to delete that file. However, I don't see any delete function in the WinDbg meta command glossary: https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/meta-commands, or in the list of supported C functions like printf. Am I just missing something, or is deleting files not supported by WinDbg (or equivalently renaming files, which would also serve my purpose?) If deleting/renaming don't work, is there another way to achieve the functionality I'm looking for?
With the .shell command, you can execute any DOS-like command. Although I never tried deleting a file, it should be possible.
As you may have noticed, WinDbg scripting does not always work on first attempt, please make sure your scripting will not result in a big data loss on your customer's PC whilst deleting files.
I'm trying to use the SQL script action. My statements are separated by ; and a new line. Simply using ; as the statement delimiter is the best luck I've had, but unfortunately some of my statements have ; in the values and it breaks on those. I've tried using
;$
;\n
\);
but it keeps trying to execute the whole script as a single statement. I can't figure out where i'm going wrong here.
I'm using version 8.0.3
This is indeed a bug that will be fixed in 8.0.5. Both ;$ and ;\n will work in 8.0.5. To get a build where this is already fixed, please contact support#ej-technologies.com.
UPDATE: in the workbench/J log file I am seeing this error:
ERROR Variable names may only contain characters (a-z, A-Z), numbers and underscores
I'm sure this is what is causing my process to fail, but I have no idea why because my variables are named appropriately. I've tried renaming them a few times just in case and the same thing happens.
ORIGINAL POST:
I am working on an automated process to dump the contents of a Postgres query to a text file and FTP it to someone. The process I have been using successfully is a windows batch script that runs SQL Workbench to run the query and write the entire contents of the table to a text file and FTP it.
Now I want to be able to use WBVarDef to load a variable from a text file and use it in my query. For reference, the variable is the unique id of the last record that was FTPed. This is the code i have:
WBVarDef -variable=id -contentFile=id.txt;
WBVardef today=#"select to_char(current_date,'mmddyyyy')";
WBExport -type=text
-file='c:/CLP/FTP/$[today]circ_trans.txt'
-delimiter='|'
-quoteAlways=true
-lineEnding=crlf
-encoding=utf8;
SELECT
*
FROM
transactions
WHERE
transactions.id > $[id]
ORDER BY
transactions.id;
The only thing new here is the reference to the text file that contains the id on the first line. This completely breaks the process but as far as I can tell, I am using this according to the SQL Workbench documentation.
Any help would be greatly appreciated.
I have figured this one out. I was running an older version of workbench that did not support this functionality. Now that I upgraded to build 119 this is working. I'm having other issues but that's a different story....
I am trying to build a redis 'stored procedure' in lua that will update a keyvalue store when one of the map fields changes, and will also extract a value from another key when said value changes. I have built this lua(redis) script and it works.
But I discovered that when I try to enter it into the redis-cli, it complains unless I concatenate all the lines of the script onto one long line. Surely there is a 'continuation character' recognized by the redis-cli (?) but I cannot find it.
Anybody know the continuation character for redis-cli?
One option would be to save the lua script to a file and then use the command line to execute the script in the file as shown here:
http://www.redisgreen.net/blog/2013/03/18/intro-to-lua-for-redis-programmers/
I realize this is not a direct answer to what the continuation character for redis-cli might be (or if it exists).
Today I created a new staging table and a BCP .fmt file. I created some test data and attempted to run the BCP utility from the command line:
I've got about 20 different format files and staging tables from previous work and this is the first time I have encountered this error.
How can I fix this error?
Please note, I have added my solution below, but if you have other answers, please add them in. The answer was so quirky/obscure that I think it may help others.
Basically, this one was really strange. In order for it to work, make sure there is an empty line after the last column defined in the format file. I added an extra empty line, resaved the file, and then the BCP utility ran the file successfully. I've indicated the extra line with a red rectangle.