Is there a way to run an insert into statement with a valid "?" in it? - special-characters

I am trying to build an insert into statement that will include a URL string which has a valid "?" in it. I am using Teradata SQL Assistant (Windows XP) and it is trying to translate this into a parameter.
Is there any way to override this and treat it as a character value?
Example URL:
https://www.location.com/livelink.exe?func=ll

Go to the Query tab on the Tools -> Options... page and uncheck the box labeled "Allow use of Named Parameters in queries". Here are the settings I use:
That will prevent question mark from being treated as prompts and process an insert statement like this:
insert into yourdb.yourtable
(url)
values ('https://www.location.com/livelink.exe?func=ll')

Related

VSCode - Is there any option to replace any form of text within single quotes in vs code?

I have a very long sql query
update emplyee_table SET name = 'abc',age='25',address='stackoverflow' WHERE id = 10
I want the above query to get replaced like this by any vscode operation.
update emplyee_table SET name = ?,age=?,address=? WHERE id = 10
You could use find and replace in VSCode along with an appropriate RegEx.
This Regex should work out: '[^';]*'
Ctrl+H will bring up the replace menu - after enabling regex replace (the button looks like .*), replace the pattern '[^';]*' with ?. Ctrl+Alt+Enter will replace all of the matches in the open editor.

Find and replace using wildcard in netbeans

How would one go about using replace in netbeans to modify a PHP script with lots of $_POST[].
For better security it would be a good idea to replace all these $_POST[]
with sanitize($_POST[]) where sanitize is a function that sanitizes user input.
So I could use Replace and search for $_POST[''] and replace with sanitize($_POST['']).
But how do you keep the variable name within each $_POST[''] while adding the closing parenthesis?
For example $_POST['name'] and $_POST['action'] need to become sanitize($_POST['name']) and santize($_POST['action']) respectively.
I am not a PHP programmer or a Regex master but in my very limited test this seemed to work.
Select the project and then choose Edit -> Replace. Choose "Regular Expression" in the drop down list, set containing text to \$_POST\[(.*)\]and replace with to sanitize(\$_POST[$1])

Why are values copied from returned grid marked with quotes?

In PgAdmin III, when I copy value from returned grid and paste it into the query text, it appears there in double quotes. But to use it in query, in where clause for example, it has to be marked with apostrophe. So I have to replace quotes with apostrophe. It is rather weird for me that I always have to do so. Why it is designed in such strange way?
This is a kind of stupid theoretical question, I do not expect any practical answers :)
You can customize the quoting character, by following the following steps.
On the PgAdmin-III main window, click on File and then Options
Click on the Query Tool Tab
Change the field called "Result copy quote character" to apostrophe (')
It should work, you may need to close and open PgAdmin-III
EDIT: For Mac OS X the option could be found in pgAdmin3 > Preferences > Query tool > Results grid
For pgAdmin 4 go to File> Preferences> SQL Editor> Results Grid. You can change the Quotation mark to single quote or none.

eclipse method names with parenthesises

Content assist insert method names with parenthesises after pressing enter. Can I disable such inserting. I'd like that method name is inserted without brackets.
No. the Java content assist preferences have an option to turn off the arguments, but you still get the parenthesis.
There's a simple solution:
Just define a variable such as
String setVisible; !
Now you can use the Eclipse content assist to insert
the full Variable (Method) without brackets.
When you finish editing just comment the variable out or delete it.
Maybe you can find a table with all jFrame Methods or assemble one for your own

sql server 2000: Short cut for getting stored proc text

what is the short cut to get entire text of the stored proc in query analyzer. I know that I could highlight table name and hit alt + F1 and get the entire table structure.
It seems to not exist a shorcut with your exact request. If you want to see the complete list of query analyzer shorcuts visit the folowing link:
http://msdn.microsoft.com/en-us/library/aa216992(SQL.80).aspx
Anyway you can modify, customize or create your own shorcuts.
For examle ALT+F1 just executes the "sp_help" stored procedure.
Check the documentation at:
http://msdn.microsoft.com/en-us/library/aa216956(SQL.80).aspx
You should be able to add a shortcut that uses sp_helptext, rather then sp_help