Questions tagged [sybase-asa]

Sybase Adaptive Server Anywhere, is an RDBMS by SAP, that runs as an embedded database. Since version 10, ASA is developed under the name [SQLAnywhere]

162 questions
0
votes
1 answer

I need to do a query from 2 tables using count function

The query contains 4 columns: the full name of the doctor, the number of male patients, the number of female patients, and the total number of patients seen by that doctor. My problem is that I dont know how to count the number of males and…
0
votes
1 answer

SQL Unique ID for union all - Sybase

Is it possible to generate a unique ID for the auxiliary table? I am retrieving data from several tables, but I do not know how to create a new ID for the results: I would like to have an additional column with ID. I tried to look for several…
0
votes
1 answer

How to return greater value of the period for unique id combination?

If the paid_amount is not NULL or greater than 0 for the greater value of the period_id for that section_id and store_id combination, then the store would get a Y value for checked column. Here is the query I created based on the criteria that is…
espresso_coffee
  • 5,980
  • 11
  • 83
  • 193
0
votes
1 answer

How to declare and use out parameter in Powerbuilder with ASA database

I have a stored procedure named sp_getnextautono(as_sequenceid Char(20), as_sequenceno double output) In Powerbuilder I have scripted as follows: //Declaration Declare proc_autono Procedure for sp_setnextautono @as_sequenceid = :ls_input,…
Svasu
  • 1
  • 1
  • 2
0
votes
1 answer

Why is one of my CPP files not being built when using the command-line to compile

The setup: Windows XP MS VisualStudio 2003 Sybase SQL Anywhere 9 Embedded SQL (I know...but it's a really old project) This project is setup like so many others I have encountered here. The SQL precompiler processes a SQC file to generate a CPP…
Mr. Bowman
  • 11
  • 3
0
votes
1 answer

Sybase identity_gap attribute is not maintaining specified gap

I am using Sybase Adaptive Server Enterprise 15.7 and I have created a table like create table student( rollNum int identity, name varchar(16), primary key(rollNum) )with identity_gap = 50 When records are inserted, rollNum jumps from 3 to 51 -->…
Bifrost
  • 417
  • 5
  • 23
0
votes
1 answer

Update record with case statement for Sybase ASA11

I'm using sybase ASA11. There's 2 table, Deposit table (Column = Balance, AccountXID) and Trx Table (Column = TimeRqTimestamp, trxresp). I have an update syntax like this --Update for table Deposit @Amount = 2000 @Accountxid = 123 …
0
votes
1 answer

Show record data in the last 1 hour in sybase ASA11

select * from Trx where RequestTimestamp BETWEEN DATE(NOW()) AND DATEADD(HOUR, -1, GETDATE()) I have this sql code from sybase ASA11, hoping to show data in last 1 hour, but it just shows today's record from 00:00:00.000 AM till now(). What is…
0
votes
0 answers

Create Trigger for Update with condition in Sybase ASA16

I want to create a trigger with condition, there's 2 table Trx (Columns = TrxResp, Prodcode, TrxFwdIID, TrxTType) and Deposit (Columns = AccountXID, Balance). The case is if table Trx update with conditon where TrxResp in (51,55) and Prodcode in…
0
votes
0 answers

SybSQLException: Attempt to update or insert row failed because resultant row of size larger than 1962 bytes

I'm getting this error with sybase while updating records to my table. Below is my table definition CREATE TABLE BATCH_STEP_EXECUTION ( STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY , VERSION BIGINT NOT NULL, STEP_NAME VARCHAR(100) NOT…
0
votes
0 answers

SQL Anywhere Remote server connection to SQL Server

I'm trying to link tables from MS SQL Server(on Windows) to SQL Anywhere(on Linux) Have installed SQL Server driver:…
Ove Halseth
  • 431
  • 5
  • 13
0
votes
2 answers

Using IN clause with List agg. function

is there a way to use "IN" clause with the "List" aggregate function, like in this example: SELECT FirstName, LastName, CASE WHEN 1 IN LIST(ID) THEN 'Admin' WHEN 2 IN LIST(ID) THEN 'Moderator' WHEN 3 IN LIST(ID) THEN 'Owner' …
ZORRO_BLANCO
  • 849
  • 13
  • 25
0
votes
1 answer

A python web framework that works well with Sybase?

I have found lots that work well with any other datastore, but none that work well with Sybase. Please advise !! Thanks, Richard. [ Edit: http://code.google.com/p/sqlany-django/ isn't sufficient - I need Sybase support,not SQL Anywhere ]
Richard Green
  • 2,037
  • 2
  • 20
  • 38
0
votes
1 answer

Encrypting ODBC DSN login password programmatically

I am using file DSN for connecting to Sybase database. Login password is encrypted and is stored with EncryptedPassword keyword in the .dsn file. I have the requirement to change the database password and update the DSN accordingly. I am using…
Vineet
  • 75
  • 3
  • 9
0
votes
1 answer

what does it mean about that sybase error

it is about sybase Insufficient account permissions? [sybiq@db ~]$ isql -U abc -P abc -S abc3 1> sp_spaceused 2> go Msg 504, Level 11, State 0: SQL Anywhere -265: 'sp_spaceused' 1> select @@version 2> go @@version …
jiaqiang liu
  • 7
  • 1
  • 5