sybase

Error connecting Java to SQL Anywhere database

穿精又带淫゛_ 提交于 2019-12-02 06:00:32
问题 I am trying to connect a java program to a database. I have sajdbc4.jar in the build path and it worked before, but now I keep getting this error when I try to make the connection: Exception in thread "main" java.lang.UnsatisfiedLinkError: no dbjdbc12 in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at sybase.jdbc4.sqlanywhere.IDriver.try_load(IDriver.java:455) at sybase

Sybase ASE 15 Aggregate Function for strings

蹲街弑〆低调 提交于 2019-12-02 05:41:56
问题 I'am findind a way to aggregate strings from differents rows into a single row in sybase ASE 15. Like this: id | Name Result: id | Names -- - ---- -- - ----- 1 | Matt 1 | Matt, Rocks 1 | Rocks 2 | Stylus 2 | Stylus Something like FOR XML PATH in T-SQL. Thanks! 回答1: Sybase ASE does not have any string aggregate functions like list() or group_concat() ; and while there is some support for FOR XML , it does not include support for the PATH option/feature. Assuming you could have an unknown

How Do I Generate Sybase BCP Fmt file?

我的未来我决定 提交于 2019-12-02 02:12:54
I have a huge database which I want to dump out using BCP and then load it up elsewhere. I have done quite a bit of research on the Sybase version of BCP (being more familiar with the MSSQL one) and I see how to USE an Import file but I can't figure out for the life of me how to create one. I am currently making my Sybase bcp out files of data like this: bcp mytester.dbo.XTABLE out XTABLE.bcp -U sa -P mypass -T -n and trying to import them back in like this: bcp mytester.dbo.XTABLE in XTABLE.bcp -E -n -S Sybase_157 -U sa -P SyAdmin Right now, the IN part gives me an error about IDENTITY_INSERT

NullPointerException thrown by Charset.availableCharsets due to our Sybase JDBC driver

和自甴很熟 提交于 2019-12-01 23:27:47
问题 I am running into a blocking issue with my install (JDK 1.7). Basically I have the following NPE: 10:19:17.548 [main] ERROR o.s.t.w.s.TestDispatcherServlet - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org

NullPointerException thrown by Charset.availableCharsets due to our Sybase JDBC driver

坚强是说给别人听的谎言 提交于 2019-12-01 20:55:53
I am running into a blocking issue with my install (JDK 1.7). Basically I have the following NPE: 10:19:17.548 [main] ERROR o.s.t.w.s.TestDispatcherServlet - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter]: Constructor threw

Inserting Multiple Rows in Sybase ASE

牧云@^-^@ 提交于 2019-12-01 17:39:42
问题 (Similar question related to SQL Server : SO Link) I know in Sql Server 2008 or above, you can insert multiple rows doing the following: INSERT INTO MyTable (Name, ID) VALUES ('First',1), ('Second',2), ('Third',3) However, it seems like this syntax DOES NOT work in Sybase Adaptive Server Enterprise, since this gives me an error.. Anyone know the syntax in Sybase that achieves the same thing? Sybase ASE is based on Transact SQL.. Thanks 回答1: Sybase doen't have insert syntax as SQL Server. What

Finding the n-th row in Sybase ASE?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 14:00:16
问题 I'm trying to find the n-th row in a sybase database. I'm more familiar with SQL server so I decided to use a with statement but for some reason that's not working in sybase. Could you guys please explain what's wrong with this code: With test AS ( select *, row_number() over (order by M_MAT) as 'row' from OM_MAT_DBF ) SELECT * FROM test WHERE row = 2 回答1: with and row_number() are not valid commands in Sybase ASE. One option is to select your data (or key data) into a temp table, then use

How to unlock table in sybase?

橙三吉。 提交于 2019-12-01 12:17:53
问题 im trying to change some types on my table in sybase, but when i change it, the output is this one. User 'DBA' has the row in 'table' locked How to unlock this? 回答1: I would: determine the connection_id using sa_locks (documentation here) issue the drop connection *connection_id* statement to the connection that is causing the lock to the table. Use it with care! 来源: https://stackoverflow.com/questions/21413676/how-to-unlock-table-in-sybase

Sybase: How do I concatenate rows in sybase column

▼魔方 西西 提交于 2019-12-01 12:13:04
I have a table with ID and Dept. Table is id dept salary date 1 30 2000 8/25/2015 12:06:54.870 PM 2 20 5500 7/12/2015 12:06:54.870 PM 3 30 6700 11/21/2013 12:06:54.870 PM 4 30 8900 4/16/2009 12:06:54.870 PM 5 30 9900 6/29/2014 12:06:54.870 PM 6 10 1120 7/3/2015 12:06:54.870 PM 7 20 8900 4/13/2013 12:06:54.870 PM 8 10 2400 7/23/2015 12:06:54.870 PM 9 30 2600 8/21/2015 12:06:54.870 PM 10 10 2999 8/3/2015 12:06:54.870 PM Just need the output like this Dept ID 30 1,3,4,5,9 This is the best way I know. Please do post if anyone knows a better solution: I have named your table sal DECLARE @id INT ,

Sybase: How do I concatenate rows in sybase column

你离开我真会死。 提交于 2019-12-01 08:33:40
问题 I have a table with ID and Dept. Table is id dept salary date 1 30 2000 8/25/2015 12:06:54.870 PM 2 20 5500 7/12/2015 12:06:54.870 PM 3 30 6700 11/21/2013 12:06:54.870 PM 4 30 8900 4/16/2009 12:06:54.870 PM 5 30 9900 6/29/2014 12:06:54.870 PM 6 10 1120 7/3/2015 12:06:54.870 PM 7 20 8900 4/13/2013 12:06:54.870 PM 8 10 2400 7/23/2015 12:06:54.870 PM 9 30 2600 8/21/2015 12:06:54.870 PM 10 10 2999 8/3/2015 12:06:54.870 PM Just need the output like this Dept ID 30 1,3,4,5,9 回答1: This is the best