Questions tagged [sybase-ase15]
120 questions
1
vote
0 answers
Sybase ASE Performance Difference Between a JOIN and "IN"
Is there a performance difference between the ways of querying two tables in Sybase ASE, if there are 10 million records in each table:
select top 1000 a.* from tableA a, tableB b
where a.id = b.id
select top 1000 * from tableA
…

dvai
- 1,953
- 3
- 13
- 15
1
vote
1 answer
Workaround for restriction: Another Execute Immediate statement cannot be executed inside an Execute Immediate statement
I understand that SAP ASE has a restriction for nested execute commands.
Because of which the following code shows error:
DROP PROCEDURE sp_proc1
CREATE PROCEDURE sp_proc1
AS
BEGIN
DECLARE @cmd VARCHAR(20)
SET @cmd = 'SELECT GETDATE()'
…

Daniel Vera
- 77
- 1
- 10
1
vote
0 answers
Sybase proc throws error - Incorrect syntax neatr ','
I am using Powerbuilder and Sybase in my application. I need to save Japanese characters from screen in a table. But when I try to update the existing row and click on save I get a DB error code 102, ERROR: Incorrect syntax near ','.
I tried to…

Sharmistha Sinha
- 315
- 1
- 5
- 12
1
vote
2 answers
The 'CREATE TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database
I am working on java project in which i am using Sybase and Apache Metamodel to get table data and its information.Now "ddl in tran" option is true but still when i get columns details using Apache Metamodel its giving me…

santosh
- 435
- 1
- 7
- 24
1
vote
0 answers
Executing Sybase ASE procedure in SQL Developer
I am trying to execute a Sybase ASE procedure in SQL Developer. It works fine in isql, but in SQL Developer it does not get executed.
When I execute it using 'Execute' command all I get is 'Procedure succeeded'.
Can you please let me know if there…

Mano
- 601
- 10
- 32
1
vote
1 answer
How to get the list of all database names from a Sybase DB Server in java
I want to get the list of all database names from a Sybase DB server. I can connect the Sybase db through Java, but don't know how to get the list of database names. I am using jconn4 jar file.
import java.sql.Connection;
import…

AbiSaran
- 2,538
- 3
- 9
- 15
1
vote
1 answer
What SQL do I use to convert (big)datetime to show microseconds?
Sybase docs show how to convert to several date/time formats, but none show the microseconds that bigdatetime support. What CONVERT style can I use?
For instance:
SELECT CURRENT_BIGDATETIME()
-------------------
May 8 2019 4:30PM
…

eric
- 755
- 6
- 11
1
vote
2 answers
Output of sybase query in pipe separated format
I need some assistance to figure out if its possible to get the output of a sybase sql query in pipe | separated format.
select top 10 * from mytable
The data returned is as follows
I am using sybase ASE 15 as my DB to run queries.
name age…

Newbie
- 11
- 2
1
vote
0 answers
Sybase-AseBulkCopy Fails When Changing the EnableBulkLoad In ConnectionString
I am using C#/ADO.NET/AseBulkCopy to copy several table from SQL Server to Sybase.
When the EnableBulkLoad is set to 0, everything works great, although it takes hours to process.
When the EnableBulkLoad is set to 1 or 2, any table with a DateTime…

bocaguy
- 11
- 3
1
vote
1 answer
Sybase add millisecond to date is not working
I'm trying to add 1 millisecond to date using dateadd function (Sybase ASE) but have no luck in this:
select dateadd(ms, 1, getdate()) cur_date,
dateadd(ms, 1, getdate()) add_ms,
datediff(ms,dateadd(ms, 1, getdate()), getdate())…

AleksandrK
- 33
- 4
1
vote
1 answer
Best way to update a column of a table of tens of millions of rows
Question
What is the Best way to update a column of a table of tens of millions of rows?
1)
I saw creating a new table and rename the old one when finish
2)
I saw update in batches using a temp table
3)
I saw single transaction (don't like this one…

Nelssen
- 1,023
- 1
- 17
- 42
1
vote
3 answers
Create Dynamic Query in Sybase SELECT TOP X
I am wondering how to do the following in Sybase 15.
DECLARE @DEPTH INT
SET @DEPTH = 8
SELECT TOP @DEPTH * FROM Table
It gives me the following error :
Error (102) Incorrect syntax near '@DEPTH'.
I tried using TOP (@DEPTH), same way as sql…

Rems
- 80
- 2
- 8
1
vote
1 answer
How to turn off mixed data and log in Sybase ASE 15.7?
When I use sp_helpdb in Sybase ASE 15.7 my result:
db_abc 2054.0 MB sa trunc log on chkpt, mixed log and data
db_def 1030.0 MB sa trunc log on chkpt, mixed log and data
Could I turn off mixed log and data?
I tried with sp_dboption…

Adam
- 1,041
- 1
- 7
- 22
1
vote
1 answer
delete query with correlated subquery throwing error
DELETE
FROM cats c
WHERE EXISTS (SELECT 1
FROM owner_cats o
WHERE o.id_cat = c.id_cat
AND o.id_owner = 1)
Tables names are different. This is throwing sybase errror 107.
The column prefix '%.*s' does not match with a table name or alias name used…

Pavan
- 11
- 1
1
vote
1 answer
jooq sybase code generation issue
I am using sybase ASE as my database. When I am trying to generate code using jooq it shows following warning.but no code generation is done. Any help thanks in…