sybase

How to create a user defined function in sybase?

Hi *, I trying to define a function in sybase. I write this script: CREATE FUNCTION GetUserGroup (userId int) RETURNS int BEGIN RETURN (10) END but when I run this, I get this error: >[Error] Script lines: 1-6 -------------------------- Incorrect syntax near the keyword 'BEGIN'. Msg: 156, Level: 15, State: 2 Server: NEWSERVER,...

How can I catch Sybase bcp errors reliably?

We're using named pipes with Sybase bcp so that we can compress output on-the-fly. This is a paraphrase of the error handling idiom, some error checking in the non-bcp parts of the script has been removed to shorten the example. while : do { rm -f $fifo mkfifo $fifo cat $fifo & CatPid=$! b...

Why grouping in a subquery causes problems

When I include the 2 commented out lines in the following subquery, seems that it takes forever until my Sybase 12.5 ASE server gets any results. Without these 2 lines the query runs ok. What is so wrong with that grouping? select days_played.day_played, count(distinct days_played.user_id) as OLD_users from days_played inner join days_r...

How do I limit the amount of results returned in Sybase?

I need to query a Sybase database which has a lot of data in it, and would like to set a limit so the DB stops the query after 10 results. The key thing is performance, so it would be no use if it searched all results and then then returned the last 10 results. Thanks in advance ...

How do I Connect to a Sybase Database from Windows CE using .Net?

I need to make a connection to a Sybase (SQL Anywhere) database in a Windows CE app over the network (wifi). I'm hoping someone in the SO community has done before and can't point me in the right direction. There doesn't seem to be a lot of information on the topic. I've tried google, SO and the sybase website. Thanks in advance ...

The 'Sybase ASE OLE DB Provider' provider is not registered on the local machine.

I am getting this error when trying to connect to sybase database using oledb connectivity from visual studio.net 2005 The 'Sybase ASE OLE DB Provider' provider is not registered on the local machine. ...

How do I properly test my database performance with high load demand?

I have found a lot of topics about stress-testing web application. My goals are different, it's to test only database (sybase sql anywhere 9). What I need: Some tool to give a diagnostic of all sqls and find a bottleneck. I wish I could macro-view the entire system easily. Best practices to design/build a good sql queries. The syst...

sybase enhancment

Hi, Do I need to modify the store procedures if sybase version is enhanced ...

difference in sybase versions

What is the diffenrce in store procedures of sybase version 5 and version 15 ...

I need to get FreeTDS drivers so I can install Perl's DBD::Sybase, but FreeTDS.org is down. What can I do?

I need to get FreeTDS drivers so I can install Perl's DBD::Sybase, but FreeTDS.org is down. What can I do? ...

Sybase openqueries ?

Hello, Does open query exist in sybase ? Or more generally, in sybase, what are the possible way to select among the result of a procedure (temporary tables, out params, others ??) ...

SQL Anywhere 11 - Custom Domain visualization

I'm storing .NET TimeSpan objects in a SQL Anywhere database as their underlying .NET implementation type, a 64-bit integer. I've even created a custom domain called "timespan" to do so. When debugging in Visual Studio, you can override the default ToString() for the debugger window so that it shows what you want. I'm looking for a si...

php odbc connect not connecting to sybase db

php odbc_connect not connecting with sybase database. I set up a web site using php to talk to a sybase db (already in use for a in-house application) via a odbc connection, so users in the field could access the in-house db. This was on a 2003 NT server, and everything worked fine. Then I set up a similar site on an XP Pro machine (t...

Spring Transaction with Sybase

I am using Spring in my Web Application , with the underlying database as Sybase. I have 3 complex stored procedures to be executed. The procs , have create table and drop table commands to hold temporary result sets. The tables are created in the user db space , rather that in the tempdb space. Hence, I am faced with the need to ensu...

Deploying SQL Anywhere 10 Runtime Engine

I'm trying to deploy the Sybase SQL Anywhere 10 Runtime Engine, but I'm having some problems. When I run my application, I get an error: Error SQLSTATE = IM003 Specified driver could not be loaded due to system error 193 (cinema_ConfigurationDriver). OK According to my research, this is indicative of a missing DLL. I am lookin...

How to separate positive and negative numbers into their own columns?

I have a table with the following columns and data: activity_dt | activity_amt 2009-01-01 | -500 2009-01-01 | 750 Can I write a query that looks at the sign of activity_amt and puts it in the credits column if it's positive, and the debits column if it's negative? (I'm using Sybase) activity_dt | debits | credits 2009-01-01 ...

Connecting to WebService via HTTPS throws SCL Profile Allocation error

I'm trying to use Jax-WS generated classes (created using wsimport) to call a webservice over an HTTPS connection from within a Java component in the application server Sybase EAServer 5.3. I get an exception in the EAServer log with the following as its underlying cause (I have removed the URL of the webservice). 2009-11-15 18:39:...

Sybase Development IDE

Is there a Toad type application for Sybase? I can't seem to find a single one! I've tried using VS 2008 but can't see the sproc source. ...

Sybase sql anywhere sync a Database view(pull from consolidated to remote)?

I am trying to set up a synchronization model to sync my consolidated Oracle database with a remote SQL Anywhere database. I have a couple Views on the consolidated Oracle database that I want to pull into the Sql Anywhere database as tables. I want to pull them over as they touch 4-5 tables (gotta love good normalization) and only ha...

Full table scan occured even when index exists?

We have a sql query as follows select * from Table where date < '20091010' However when we look at the query plan, we see The type of query is SELECT. FROM TABLE Worktable1. Nested iteration. Table Scan. Forward scan. Positioning at start of table. Using I/O Size 32 Kbytes for data pages. With MR...