why am I not able to do anything after this? - mysql

when using mysql command line, I forgot to put a ' in the varchar input and this is the result. No matter how many times I try to enter some other things nothing is happening. Can anyone tell me why this happening?

The mysql command line program is waiting for you to complete an incomplete quoted string; it shows > continuation line prompts.
Either finish the string with a closing ', or better, use <ctrl>-c to abandon your input and try again.

Related

Underscore at the beginning of a variable name in ms access VBA?

I am trying to add an initial underscore to a variable name like _user in VBA in ms access, but it is showing error as soon as the cursor is leaving that line. Please look at the error :
Can anybody tell me the reason and help me to do so?
As mentioned by #Wayne in the comments, it is not allowed to start the naming with an underscore: https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/visual-basic-naming-rules
I guess that the reason for this is that the _ is a special sign, that is used for initialization of Events in VBA. Thus, it is already taken.
A better guess - in VBA the underscore is used for line separator as well. https://stackoverflow.com/a/8515496/5448626

enter key produces " '> " in MYSQL Console

In the MYSQL Console, I was attempting to add multiple values to a table and in an effort to start a new line, I selected shift+enter which produced '>. Now, every time I hit enter, I get '> rather than inserting my values or really being able to do anything now. How do I stop this?
It means you have opened a quote ' and did not closed it. Add another quote ' to close the opened one, add a semicolon ; to end the command and hit enter to execute it (you maybe get a syntax error, it the opened quote must be closed earlier).

what does it mean when "> is returned on command line? [duplicate]

I'm new to sql and for some reason, the arrow symbol ( -> ) that I am used to seeing in teh command line, which mean it is ready for input, is now displayed as ( '> ) and it does not accept commands. What does it mean and how do I get back to ( -> ) ?
Thanks
It means that it is treating any input which follows as part of a string literal, until it encounters a(n unescaped) string termination quote ' character.
This will have happened because you previously began the string literal with such a string termination quote character. For example:
mysql> SELECT foo
-> FROM tbl
-> WHERE bar LIKE 'somestring
'> this is still part of somestring'
-> ;
find the attached image
use '/ command and press enter then it will go on next line starting with ->
then use ; and press enter.
it happens if there is unbalanced '(single quote) in query.
It means you have an incomplete query. Most likely it's something related to a missing quotation, semi-colon at the end, or parentheses aren't closed.
You can exit the query with: '\c
Not sure what happens to the query but it gets you back to the mysql> prompt.
enter image description here
As you can see, I encountered the same issue, the solution is :
type '> in the command line, then insert some command as I did(please refer to the picture attached), and then the new line starts.

When adding to MYSQL database, apostrophes change to ' and are backslashed

I recently switched to a new server and now when I add new topics to my forum, apostrophes become ' as they enter the database, while the apostrophes get backslashed.
For example:
Mike's website becomes: Mike\'s website. While in the database it becomes: Mike\' website.
I have checked to see if magic_quotes is on via php.ini -- it is off.
I have spent days troubleshooting, with no available reason why.
Strangely, when I use ' which creating the topic in my forum, it returns an apostrophe! I am assuming there is somewhat of a language problem. My forum is programmed to use UTF-8, and so is the database.
I checked database entries before the switch, and oddly, they would get recorded as apostrophes ' and not as ' ... Like it should. I know I could use striplashes(), but I don't want to since it worked properly without them before!
What apache/mysql settings are causing this to occur?
Furthermore, the characters < > also become html code characters.

SQL Server 2008/SSIS: Guid has brackets after being written to a text file

SELECT
Id AS VEHICLE_GUID
FROM
Vehicles WITH(NOLOCK)
Result should be: 2343-GUID-EX-AMPLE
But instead is: [2343-GUID-EX-AMPLE]
This is a truly simple query, I am using sql-server-2008 and BIDS (SSIS). When I preview the result, there is no brackets.
However, when I execute the task that runs the query and writes the results to the text file, when i go to open the text file i see brackets around the GUIDS. I am frustrated because I do not see a property on the text file destination that would cause this....Or maybe I am overlooking something? Maybe this can be solved from query?
Any thought would be greatly appreciated and attempted. I have no more hair to pull out.
Thanks,
Bill
I believe that is a function of the datatype you are using. You should be able to cast/convert it as varchar and avoid the problem, or at least then run functions against it to strip out the brackets.