sybase

outputing select statement result into file

懵懂的女人 提交于 2019-12-11 04:19:54
问题 I have an sql file that contains below script that is ran via isql. May I ask whats wrong with my output syntax? I am getting "Incorrect syntax near the keyword 'output'" Sybase ASE version is 15.7 select * from tempdb..M3_STI_extracts_checking output to employee.txt format ASCII GO 回答1: isql offers the possibility to write the output into a file, if you set the option -o (Utility Commands Reference). input.sql select * from tempdb..M3_STI_extracts_checking go isql -i input.sql -o employee

How can I do paging in Sybase without making temp table? (oracle rownum issue)

…衆ロ難τιáo~ 提交于 2019-12-11 04:07:22
问题 In Oracle, usually query like this for paging. SELECT * FROM (SELECT *, rownum rid FROM TABLEA WHERE rownum <= #pageend#) WHERE rid > #pagestart# However, there is no "rownum" function in Sybase DBMS. How can I do that query exactlly same in Sybase? I found some ways. use "rowcount" set rowcount 10 select * from TABLEA use identity (make temp table) SELECT *, ROWNUM=IDENTITY(8) INTO #TEMP FROM TABLEA SELECT * FROM #TEMP WHERE ROWNUM < #pageend# AND ROWNUM >= #pagestart# DROP TABLE #TEMP these

How to hide the symbol number on PowerDesigner?

守給你的承諾、 提交于 2019-12-11 03:21:26
问题 In Sybase PowerDesigner, when designing an UML diagram that takes 2 copies/instances of the same XXXX object (ie. objects), the application adds a number identifier like "XXXX : 2" to that symbol. Is it possible to remove it? Thanks in advance! 回答1: It does not seem to be directly doable. However, (somewhat tested with 16.0), you can add an Extension to your model, define a computed attribute (type String) on your object type, returning the object name: %Get% = obj.name and use Tools >

Sybase ASE 15.5 : a successful insert which has no effect

ⅰ亾dé卋堺 提交于 2019-12-11 01:46:44
问题 I'm trying to insert a row into a table which is quite big (400 million rows). The table has 3 columns (integer, varchar(128),varchar(255)), primary key and clustered index on columns (1,2) and nonclustered index on columns (2,1) and nonclustered index on column 3. No foreign keys, no triggers. When I do : insert into mytable values (0,'test_name','test_val') It executes successfully but it has no effect, nothing is inserted and I can re-execute it as many times as I want successfully whereas

sybase alternative way for @@error to catch error

夙愿已清 提交于 2019-12-11 00:43:22
问题 Useally I am catching error like this EXECUTE (@STATEMENT) SELECT @ERR_CODE = @@ERROR its working on simple errors , like below query .. @@ERROR return value insert into tab1 values(1) -- error attempt to insert unique constraint however the below query also give unique constraint error however the @ERROR dont catch it it return null value insert into tab1 select id from tab2 so the above statement give unique constraint but @ERROR doesnt catch it another example I have the below error sybase

c3p0.SQLWarnings Server user id 29 is not a valid user in database 'defaultdb'

人盡茶涼 提交于 2019-12-10 23:55:47
问题 I'm using Sybase ASE with Hibernate-core 4.2.8.Final, hiberante-c3po 4.2.8.Final, hibernate-search 4.4.2.Final My hibernate.cfg.xml file looks like so <property name="hibernate.connection.driver_class">com.sybase.jdbc4.jdbc.SybDataSource</property> <property name="hibernate.dialect">org.hibernate.dialect.SybaseDialect</property> <property name="hibernate.connection.url">jdbc:sybase:Tds:server:5000/dev</property> <property name="hibernate.connection.username">user</property> <property name=

Does Nhibernate support Sybase?

我的梦境 提交于 2019-12-10 20:59:09
问题 I'm about to start on a new WPF application with a Sybase datastore. The team has experience with Nhibernate, but we are not really sure how well it supports Sybase and if there are some major pitfalls we should look out for. If yes, how about Fluent nhibernate? If not, do you know any other ORM products that we could use for Sybase in this scenario? Thanks. 回答1: According to this link, I would say that it does. There seems to have known issues, though. But depending on what you need, it

Can I use MS SQL syntax in Sybase?

人走茶凉 提交于 2019-12-10 19:31:21
问题 I have worked on SQL Server database. Now I have to work on a Sybase database (using a Squirrel client). This query is not working : DECLARE @tableName VARCHAR(500); DECLARE my_cursor CURSOR FOR SELECT name FROM sysobjects WHERE type = 'U'; OPEN my_cursor; FETCH NEXT FROM my_cursor INTO @tableName; WHILE @@FETCH_STATUS = 0 BEGIN //Do something here FETCH NEXT FROM my_cursor; END CLOSE my_cursor; DEALLOCATE CURSOR my_cursor; It gives an error - Incorrect syntax near the keyword 'FROM'.

Alter table set Identity column

大城市里の小女人 提交于 2019-12-10 18:38:36
问题 I have a sybase table ("Test") having the following columns: MyIdentity numberic(9,0) Name User The table is filled with lots of records. I want to alter MyIdentity column to be an identity. There are currently no duplicate values for MyIdentity in the table. How can i alter the table and set MyIdentity as identity? 回答1: Apparently you can't, something like Create a new Table called test2 with the identity set up Then Set Identity_Insert Test2 On Insert Test2 Select * From Test Set Identity

JDBC connection for Sybase with authentication query

余生长醉 提交于 2019-12-10 17:45:29
问题 I have a datasource that connects to Sybase database. I need to execute the authentication statement (SET TEMPORARY OPTION CONNECTION_AUTHENTICATION='Company....) after I connect to the database. Is there any way of executing this statement as part of the validationQuery in the JDBC connection param so that the connection is automatically authenticated? ANSWER: I have managed to get answer for this !!! This can be done by setting it in the connection url with the below parameter SQLINITSTRING