sqlanywhere

Sybase: Stored Procedure called from within another Stored Procedure is too slow

亡梦爱人 提交于 2020-01-25 08:10:10
问题 I'm writing a stored procedure for a Sybase database. I'm using Sybase Central 16.0 as my development environment. The machine I'm using runs Microsoft Windows Server 2012 R2 Standard and has 16GB RAM running on a 2.8GHz CPU. My stored procedure uses a cursor to iterate over the records in a table with about 400,000 reecords. Each record is written incrementally into a LONG VARCHAR variable and every Nth record the proc will run an MD5 hash value on the variable and store the value in a

Cannot open Interactive sql from command prompt

余生长醉 提交于 2020-01-15 11:23:48
问题 I have added my own procedure to run as soon as user logs, using SET OPTION PUBLIC.post_login_procedure = 'xxx.Myprocedure'; I need to set custom message on pop up this provides when user logs in. The pop up is working, when I manually login in from Sybase central. however, when I run dbisql -c "DSN=myDSN" from command prompt Interactive sql opens and I get the popup that stays on forever! I cannot post images yet but I can send u one, it says "Connecting to database.." I get this pop up only

Cannot open Interactive sql from command prompt

て烟熏妆下的殇ゞ 提交于 2020-01-15 11:23:29
问题 I have added my own procedure to run as soon as user logs, using SET OPTION PUBLIC.post_login_procedure = 'xxx.Myprocedure'; I need to set custom message on pop up this provides when user logs in. The pop up is working, when I manually login in from Sybase central. however, when I run dbisql -c "DSN=myDSN" from command prompt Interactive sql opens and I get the popup that stays on forever! I cannot post images yet but I can send u one, it says "Connecting to database.." I get this pop up only

Cannot open Interactive sql from command prompt

孤者浪人 提交于 2020-01-15 11:23:11
问题 I have added my own procedure to run as soon as user logs, using SET OPTION PUBLIC.post_login_procedure = 'xxx.Myprocedure'; I need to set custom message on pop up this provides when user logs in. The pop up is working, when I manually login in from Sybase central. however, when I run dbisql -c "DSN=myDSN" from command prompt Interactive sql opens and I get the popup that stays on forever! I cannot post images yet but I can send u one, it says "Connecting to database.." I get this pop up only

SQL Anywhere v10 Syntax error near OUTPUT

岁酱吖の 提交于 2020-01-15 09:48:13
问题 I'm attempting to output a table to an outside file. I've found a few questions regarding this and followed the answers from there without any luck. SELECT * FROM transactions; OUTPUT TO 'C:\Users\administrator\Desktop\Test.txt' Is the statement I've been using, I've attempted different variations with formatting and file types such as .csv with no change. Which produces: ErrorCode : 102 SQLState : 42W04 Message : SQL Anywhere Error -131: Syntax error near 'OUTPUT' on line 1 SQL = OUTPUT TO

How to delete duplicate rows in sybase, when you have no unique key?

僤鯓⒐⒋嵵緔 提交于 2020-01-15 03:35:06
问题 Yes, you can find similar questions numerous times, but: the most elegant solutions posted here, work for SQL Server, but not for Sybase (in my case Sybase Anywhere 11). I have even found some Sybase-related questions marked as duplicates for SQL Server questions, which doesn't help. One example for solutions I liked, but didn't work, is the WITH ... DELETE ... construct. I have found working solutions using cursors or while-loops, but I hope it is possible without loops. I hope for a nice,

How to delete duplicate rows in sybase, when you have no unique key?

主宰稳场 提交于 2020-01-15 03:35:06
问题 Yes, you can find similar questions numerous times, but: the most elegant solutions posted here, work for SQL Server, but not for Sybase (in my case Sybase Anywhere 11). I have even found some Sybase-related questions marked as duplicates for SQL Server questions, which doesn't help. One example for solutions I liked, but didn't work, is the WITH ... DELETE ... construct. I have found working solutions using cursors or while-loops, but I hope it is possible without loops. I hope for a nice,

correlation name not found on SQL Anywhere

 ̄綄美尐妖づ 提交于 2020-01-11 13:14:08
问题 I have two tables called Employees and Salarygroup . PersonalID is the primary key of Employees and SalaryID is the primary key of Salarygroup. Inside the Employees table there is one more row called StartDat , which has date data type and tracks down the date when the employee started working at the company. Moreover, AmountInEuros is the salary that an employee gets every month and it has a numeric data type I need to make a function, which count the total amount of money, that the employee

Sybase database password “recovery”

穿精又带淫゛_ 提交于 2020-01-04 17:29:27
问题 I have DBA authority to a sybase database on Windows. I have a another user that I don't know the password for. I regularly use an application that does know the password, and it uses the password to automatically login to the application. However, I can't find a way to find that password anywhere in the application or its dlls/files/registry/etc. I obviously don't want to just change the password of the user, as the password in the application can't be updated (that i know of). I want to be

Python list of ints in prepared sql statement

妖精的绣舞 提交于 2019-12-30 22:52:34
问题 My question is somewhat the same as Python list of String to SQL IN parameter but I have a list of integers. The python code I use is: ids = [1000032, 1000048] sql = 'SELECT CompNo, CompName, CompType FROM Component WHERE DeptID IN (?)' cursor.execute(sql, [','.join(ids)]) And the Sybase database engine responds with: pyodbc.Error: ('07006', "[07006] [Sybase][ODBC Driver][SQL Anywhere]Cannot convert '1000032','1000048' to a numeric (-157) (SQLExecDirectW)") What is the correct way to do this?