sybase

can't find the type 'bigint' in Sybase ASE 12.5.4

Hi is bigint supported in Sybase ASE 12.5.4 ? if not is there any equalent to bigint in Sybase ASE 12.5.4 ? ...

Problem in executing different queries based on condition in CASE statement

Hello All, I am facing a problem in executing queries with CASE statement. Based on my condition,(for eg. length), I want to execute different SQL statement. Problematic sample query is as follows: select case when char_length('19480821') = 8 then select count(1) from Patient when char_length('19480821')=10 th...

Comparing specific columns in 2 different files using R

Hi, I find myself having to do this very often -- compare specific columns from 2 different files. The columns, formats are the same, but the columns that need comparison have floating point/exponential format data, e.g. 0.0058104642437413175, -3.459017050577087E-4, etc. I'm currently using the below R code: test <- read.csv("C:/VBG...

Getting a Connection with DBCP via the Sybase Jconnect JDBC driver

I am trying to get a Connection in the following code and I keep getting an SQLException with the message "Login failed" and with the details "Specified database not found". Connection con = null; BasicDataSource dataSource = new BasicDataSource(); dataSource.setDriverClassName("com.sybase.jdbc.SybDriver"); dataSource.setUsername("u...

Does where 1=2 get called for every row?

I have some sprocs that need a temp table. In order not to hardcode the column types (which are varchar with some length) so I don't have to change the declarations when the reference table schema changes (i.e. fields become longer) I do this (instead of a create table call): select orderId into #sometmptbl from orders where 1=2 Howev...

Opening adt , adi and adm files

Hi All, I am developing a web application and I have a folder containing a bunch of files with .adm , .adi and .adt and .bak extensions.I want to be able to read this data and convert put it in mysql db. I have figured that these are files stored by sybase in its proprietary format. I have opening with sybase advantage server but the fo...

Why is my number column not returning data?

I have a table, which I shall call table_name, for that is it's name. Table_name has two columns, column_a, a varchar column; and column_b, a number(10) column. I have a process which selects information out of column_b, using column_a in the where clause. For some reason, this process keeps lagging: I fire the process, and it never com...

How to determine how much disc space a table is using in ASE

I have a table which I think might be better off if it uses different data types for many of the columns. I wish to design some tests to determine the pay off in disc space if these columns are switched to better data types. How can I determine how much disc space a table is taking up in ASE 15.0? ...

Counting all other types but the current one

Hi, I'm trying to write this query, that would calculate the average value of all the columns except the one that contains the type value, which I'm grouping the whole query by. So for 4 types for example, each column in the resulting table will contain the average of all the other three type's values, i need to exclude the current type...

What is the best way to connect to a sybase database from python?

Hello everyone, I am trying to retrieve data in a sybase data base from python and I was wondering which would be the best way to do it. I found this module but may be you have some other suggestions: http://python-sybase.sourceforge.net/ Thanks ...

Troubles in installing python-sybase module

Hello guys, I am trying to install this module simply following the installation guide: http:// python-sybase.sourceforge.net/sybase/node5.html I get an error that I don't understand, I am wondering if it's not a firewall problem but I don't know how to handle that: C:\Documents and Settings\lippela\Desktop\python-sybase-0.39>python ...

SQL query shorthand for not selecting null columns when doing select all

Hi guys, when I do: SELECT * FROM SOMETABLE I get all the columns from SOMETABLE, but I DON'T want the columns which are NULL (for all records). How do I do this? Reason: this table has 20 columns, 10 of these are set but 10 of them are null for certain queries. And it is time consuming to type the columnnames.... Thanks, Voodoo ...

Sybase optimizer creates a cursor for a DELETE query which then fails

We are executing the following query using embedded SQL in C: DELETE archive_table FROM archive_table arc, #arc_chunk loc WHERE arc.col = loc.col Sybase's response is: The DELETE WHERE CURRENT OF to the cursor 'C42' failed because the cursor is on a join. The query is bewing constructed as a C string and then executed using E...

Ruby on Rails + Sybase + Ubuntu Linux - Error: Could not load SQLAnywhere DBCAPI library

I'm actually brand new to Ruby and Sybase both, but here goes: I'm trying to connect Ruby up to a remote Sybase server. (I've been successful with a local MySQL server.) I've done: gem install sqlanywhere gem install activerecord-sqlanywhere-adapter (and set up the stuff in the database.yml, of course) Still, when I got to http://...

Altering a non clustered index in a sybase

I have a unique non-clustered index on a sybase table which includes 4 columns: col1, col2, col3 and col4. I want to drop one of the columns from the table. I don't want to drop and recreate the index. Can I alter the index to not consider this column? ...

Spring NamedParameterJdbcTemplate + an array of Integers + Sybase

Sooo.. We found a bug and the stack pretty much looked like this com.sybase.jdbc2.jdbc.SybSQLException: Class [java.lang.Integer not found. Check and make sure that the class has been installed, and an entry exists in Sysxtypes. Then I thought, aaaaw, I just have to convert 'em into primitives. int[] ids = ArrayUtils.toPrimitive(set....

Finding keys in a db table that arent in a list

On sybase. I've got a load of primary keys If I do: select key from table where key in (...list of about 2000 keys...) I get about 1700 results. Whats the easiest way to get a list of the ~300 entries in my list that arent present? It seems to be something that should be easy, but I cant work it out... EDIT: Seems an example may be ...

Linking tables from other database in MySQL.

Is it possible to link tables from other databases (MS SQL, Sybase, etc.) inside a MySQL database, on a Debian server? I am thinking this could be possible using ODBC. ...

How do I get one row in the result set out of 2 rows in the table/file without using cursors in Sybase/Perl

I have a table T with columns A,B,C & D as below: A,B,C,D A1,B1,USD,LIBOR A1,B2,JPY,FIXED A2,B3,USD,LIBOR A2,B4,EUR,FIXED A3,B5,JPY,FIXED A3,B6,USD,LIBOR Table always has 2 rows per "A", with different values of "B". "B" is unique "A" - varchar(10), "B" - varchar(8), "C" - varchar(3), "D" - varchar(5) Validation rules restrict th...

Calling sp_rename on a table kills database connection in Sybase

I'm trying to rename a table using the following syntax sp_rename [oldname],[newname] but any time I run this, I get the following [using Aqua Datastudio]: Command was executed successfully Warnings: ---> W (1): The SQL Server is terminating this process. <--- [Executed: 16/08/10 11:11:10 AM] [Execution: 359ms] ...