Questions tagged [sap-ase]

SAP Adaptive Server Enterprise (ASE), formerly known as Sybase ASE, is an enterprise-grade RDBMS that uses the T-SQL variant of the SQL language.

SAP Adaptive Server Enterprise (ASE) is an enterprise-grade RDBMS that uses the T-SQL variant of the SQL language. Until version 15 it was known as Sybase ASE, but as of version 16, SAP has retired the Sybase name.

SAP ASE is an enterprise RDBMS which has been developed by Sybase Inc (now an SAP company). SAP ASE is available for various platforms like Unix, Linux and Windows.

1291 questions
4
votes
1 answer

Sybase BIT Datatype Filtering

We are using Sybase ASE for an application we are developing from scratch. We have tables which have Bit columns. In Sybase, Bit datatypes cannot be null. This is fine for the records we are storing in the tables, but we have a design issue for our…
rro
  • 619
  • 5
  • 22
4
votes
3 answers

How read returned value from stored procedure in Spring Jdbc (without out parameters in procedure)

How can I read returned value from stored procedure in Spring Jdbc (without out parameters) ? I am use Sybase ASE database. Procedure Example: CREATE PROCEDURE dbo.procedureA ( @a int ) as begin IF EXISTS (SELECT 1 FROM dbo.T WHERE a = @a) …
Malahov
  • 392
  • 2
  • 5
  • 13
4
votes
2 answers

remove spaces in the columns in ASE

I have columns that contain empty spaces with the data: example:| fish | how can I update the column so my result will be : |Fish| ? in oracle I can trim the column: update Example set column1 = trim(column1) I google it and i notice that ASE…
Moudiz
  • 7,211
  • 22
  • 78
  • 156
4
votes
3 answers

A way to check if the temporary table exists or not

I have this following query : IF NOT EXISTS (SELECT 1 FROM sysobjects WHERE id = Object_id('tempdb..TEMP_THETH_DETAILS')) EXECUTE ( 'CREATE TABLE tempdb..TEMP_THETH_DETAILS( THETH_ID NUMERIC(5) NOT NULL, LANGUAGE…
Moudiz
  • 7,211
  • 22
  • 78
  • 156
4
votes
2 answers

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

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:…
balteo
  • 23,602
  • 63
  • 219
  • 412
4
votes
2 answers

how to set row number in sybase query

I have a select statemnt which will return results say 1000 using join with some 3 to 4 tables. My requirement is to have identity column in the resultset . Can anyone help me on this. ex : Result : id name -- ---- 001 xxx 002 yyy 003 …
antosnowin
  • 221
  • 2
  • 6
  • 13
4
votes
2 answers

Select TOP 1 * from Table Fails in Sybase Procedure

Am trying to Fetch Only one record from the Sybase Table without using the RowCount Function, even though "WHERE Condition" returns multiple results. SELECT TOP 1 EMPLOYEE_NAME FROM EMPLOYEES WHERE EMPLOYEEID > 50 Runs Successfully with one Record…
user2104391
  • 413
  • 4
  • 9
  • 18
4
votes
2 answers

I need Sybase datatype to save string of indefinite Length.

My requirement is to declare a datatype which accepts xml value with maximum size. Question: Do we have text, xml or varchar(max) datatype in Sybase?
antosnowin
  • 221
  • 2
  • 6
  • 13
4
votes
4 answers

Is there a good way to do this in SQL?

I am trying to solve the following problem entirely in SQL (ANSI or TSQL, in Sybase ASE 12), without relying on cursors or loop-based row-by-row processing. NOTE: I already created a solution that accomplishes the same goal in application layer…
DVK
  • 126,886
  • 32
  • 213
  • 327
4
votes
2 answers

Database transaction only partially committing

I've got a T-SQL stored procedure running on a Sybase ASE database server that is sometimes failing to commit all of its operations, even though it completes without exception. Here's a rough example of what it does. BEGIN TRANSACTION UPDATE…
John M Gant
  • 18,970
  • 18
  • 64
  • 82
4
votes
5 answers

Difference between left join and *= in Sybase ASE 15

I need help to understand this matter, what's the difference between the 2 queries below, all I know that they don't return the same result. Query 1: SELECT a.col1, b.c1 FROM A a LEFT JOIN B b ON a.col1 = b.c1 WHERE b.status = 'Y' Query…
R Vive L OL
  • 177
  • 3
  • 3
  • 10
4
votes
2 answers

Sybase locking strategy

Adaptive Server provides these locking schemes: Allpages locking, which locks data pages and index pages Datapages locking, which locks only data pages Datarows locking, which locks only data rows My question is that if the number of locks depends…
Tian Na
  • 846
  • 2
  • 15
  • 30
4
votes
1 answer

PDO Prepared Statement over ODBC Sybase "PARAM datastream" error

I am trying to convert some old PHP ODBC queries over to PDO Prepared statements and am getting an error I cannot find too much information on. The Error is: "[DataDirect][ODBC Sybase Wire Protocol driver][SQL Server]There is no host variable…
Barbs
  • 1,115
  • 2
  • 16
  • 30
4
votes
1 answer

How to get a list of user defined data types on Sybase ASE?

I use the following query to get the list of user defined data types (UDDTs): SELECT USER_NAME(S.uid) as owner, S.name as Name, T.name as datatypename, OBJECT_NAME(S.domain), OBJECT_NAME(S.tdefault) FROM systypes S,systypes T WHERE…
AngryHacker
  • 59,598
  • 102
  • 325
  • 594
4
votes
3 answers

Sybase - Subquery in FROM clause

I'm using Sybase ASE 12.5.0.3 and I'm unable to do subqueries like: select * from (select '1' union select '2' ) X I've been looking around and as far as I know it should be possible after Sybase ASE 12, am I doing something wrong, or is it not…
DarkAjax
  • 15,955
  • 11
  • 53
  • 65