Surendra Sharma

Surendra Sharma

Search This Blog

Thursday, August 14, 2014

Sybase IQ error Syntax error near 'SET' on line

Many times you may get Sybase IQ error like Syntax error near 'SET'. Suppose if I am trying to execute below statements

SET TEMPORARY OPTION Temp_Extract_Column_Delimiter =',';
SET TEMPORARY OPTION Temp_Extract_Row_Delimiter = '';
SET TEMPORARY OPTION Temp_Extract_Name1='\\\\XYZServer\\Backup\\test.txt';
SELECT column1, column2, column3 FROM tblTest
SET TEMPORARY OPTION Temp_Extract_Name1='';
commit;

Then Sybase IQ display below error

ERROR[42000][Sybase][ODBC Driver][Sybase IQ]Syntax error near 'SET' on line 5

Solution:

It simply means end SELECT query with semicolon “;”.
Every statement in Sybase IQ should be end with semicolon.

SELECT column1, column2, column3 FROM tblTest;
SET TEMPORARY OPTION Temp_Extract_Name1='';


Please leave your comments or share this tip if it’s useful for you.

Wednesday, August 6, 2014

How to show multiple messages in alert box in JavaScript?

An alert box is used to pop up the information where user has to click “OK”.

alert("This is single line message.");

Generally we are showing single line message in alert box. But do you know how to show multiple message in single alert box?

Trick is to use “\n” after every message to separate one message with other like

alert('-1. Tajmahal in India. \n\n-2. Pyramids in Egypt. \n\n-3. Great wall of China.');

Here I want separation of two lines between each message, so I used “\n\n”.

So finally it should look like this




Please leave your comments or share this tip if it’s useful for you.