sybase-iq

SQL Anywhere Error -728: Update operation attempted on non-updatable remote query

穿精又带淫゛_ 提交于 2019-12-24 12:54:57
问题 What I'm trying to do: update table_name set field2 = substring(REGEXP_SUBSTR(field1, 'item=[0-9]+', charindex('item=', field1)), 6) But I'm getting SQL Anywhere Error -728: Update operation attempted on non-updatable remote query Can I solve it somehow? I don't use local/remote tables. I use one table. 回答1: So I guess I found soltion... even 2. Unfortunately still no way to use REGEXP_SUBSTR... I do: first alter table my_table add item_position int null alter table my_table add is_char int

How do I execute PreparedStatement(select object_id()) in sybase iq?

让人想犯罪 __ 提交于 2019-12-24 12:53:41
问题 We have a small jdbc application that talks to sybase iq database which does: String objectName = "SYS.SYSWEBSERVICE"; //The actual value of objectName does not matter. //It could be any view object in the sys schema PreparedStatement preparedStatement = connection.prepareStatement("SELECT OBJECT_ID(?)"); preparedStatement.setString(1, objectName); preparedStatement.executeQuery(); We are getting this error: java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter not set, index: 0.s

Sybase IQ Pagination

怎甘沉沦 提交于 2019-12-24 09:14:16
问题 I wonder if anyone has a solution to the following requirement. I have a stored procedure which returns a result set of for example 1000 rows. Now I need to limit this to 100 rows at a time. So I will pass in a start and end index value and I only want the records between the start index rowcount and the end index rowcount So for example my stored procedure call signature looks like this:- stp_mystoredproc(startIndex INTEGER, endIndex INTEGER) So if I set startIndex = 100 and endIndex = 200

Selecting a Random Subset in SQL (Sybase Server IQ)

倾然丶 夕夏残阳落幕 提交于 2019-12-23 17:21:08
问题 I'm trying to select a random subset of records using either rand() or newid(), but any time I run the following, I always get the same results back: SELECT *,rand() as rid INTO #mytable FROM othertable select top 10 * from #mytable order by rid I've tried every variation of this, but it seems that sybase server iq always returns the same rand() value when I do it like the above. When I try to do SELECT * FROM othertable order by newid() I get an error saying it's illegal to use newid() in

SQL Script to pull duplicate data

ぐ巨炮叔叔 提交于 2019-12-11 21:06:50
问题 Need help pointing in right direction using an SQL query to extract data out of this SYBASE database example: 12345 blue 12345 red 12345 green 56789 purple 56789 black 98765 brown output must look like this: 12345 blue red green 56789 purple black 98765 brown Was trying to use "union" or maybe "distinct" Please point me in the right direction. 回答1: Oracle uses WM_CONCAT or LIST_AGG to do this anymore I think sysbase uses List() Source documentation describing function So.. using your SQL

connect to Sybase IQ with NHibernate

不羁岁月 提交于 2019-12-11 16:45:29
问题 I want to connect to a Sybase IQ database, which is lying on a server via Fluent NHibernate: I use C# with the NHibernate version 3.3.1.4 I am using the code from here: http://pwigle.wordpress.com/2008/11/21/nhibernate-session-handling-in-aspnet-the-easy-way/ I have tried to adopt the construktor to this: private SessionManager() { sessionFactory = Fluently.Configure() .Database(SQLAnywhereConfiguration.SQLAnywhere11.ConnectionString("server=SERVER_NAME:PORT; user=USER_NAME; password=PASSWORD

Using Apache Hadoop in a Cognos BI environment

一曲冷凌霜 提交于 2019-12-07 14:34:11
问题 This might be a dumb question since I have not yet fully understood how Cognos BI works. Also, I tried posting this on Stack Exchange, in vain (error with putting tags). My question is - Can Apache Hadoop be used to make Cognos BI work faster ? Or is Cognos doing the same thing which Hadoop does (MapReduce functionality) ? The place where I have started working, uses the Cognos BI suite on top of Sybase IQ (the content store). Apache Tomcat is the web server. What happens sometimes is that

Using Apache Hadoop in a Cognos BI environment

为君一笑 提交于 2019-12-06 00:44:37
This might be a dumb question since I have not yet fully understood how Cognos BI works. Also, I tried posting this on Stack Exchange, in vain (error with putting tags). My question is - Can Apache Hadoop be used to make Cognos BI work faster ? Or is Cognos doing the same thing which Hadoop does (MapReduce functionality) ? The place where I have started working, uses the Cognos BI suite on top of Sybase IQ (the content store). Apache Tomcat is the web server. What happens sometimes is that Cognos takes a lot of time(almost dies) to generate reports if the data set is large. So can Apache

Can LOAD TABLE be used without a column-list?

无人久伴 提交于 2019-12-04 05:52:56
问题 I'm used to unloading and loading data using Sybase ASE using the bcp command-line tool. This doesn't require you to specify any column names. I understand that the equivalent to bcp in Sybase IQ is the LOAD TABLE command, however I cannot get any data to load without specifying the column names. datafile.txt: 1,2,3, 1,2,3, CREATE TABLE myTable ( fa integer null, fb integer null, fc integer null ) LOAD TABLE myTable FROM 'datafile.txt' QUOTES OFF ESCAPES OFF The above yields the following

how to resolve 'Update operation attempted on non-updatable query'?

↘锁芯ラ 提交于 2019-12-02 15:03:49
问题 I am working on a sybase-iq server Sybase IQ/15.4.0.3014 I have a working query to update one field of a table as below update table1 set a.field1= b.some_value from table1 a, table2 b where a.id = b.id This is working fine when I execute it from a sql session. When it is being called from a high level application, I am getting the below error for the above query SQL Exception code is 7301 Update operation attempted on non-updatable query I am not able to find why I am getting this error. Is