I have a SQL statement similar to the one shown below in Perl:
my $sql="abc..TableName '$a','$b' ";
The $a is free text which can contain anything including single quotes, double quotes, back- and front-slash characters, etc.
How can these characters be escaped to make the SQL statement work?
Thanks.
...
Hi there,
I have to work with a legacy system based on SQL Anywhere 5, db access layer is in C++ using embedded SQL. The problem I have is not really a C++ problem, but embedded SQL forces us to SQL statements which cannot be dynamically generated. There are many tables containing a lot of columns having the datatype double. Though the ...
When trying to create a user-defined functions (UDFs) on sybase 15+, you may get the following error:
"illegal built-in function statement in scalar SQL function"
This is b/c "non deterministic" functions such as getdate(), rand(), newid() are not allowed in UDFs.
Is there a way around this limitation?
Note that I plan answer my own qu...
I'm an experienced Sybase developer (10+ years) looking to branch out into SQLServer. Does anyone have any advice on good courses / books to help me transition? Thanks.
...
How can I connect from Delphi to Sybase Sql Server? I want to be able to make querys, execute stored procedures, reference views, etc., all the things that the server allows me to do.
Are there any components (like the dbGo components) or something like that?
...
I had stored procedure MySPOld in Sybase db. I created new sp MySP. This new sp returns data while executed from Sybase Sql Advantage. But not returning the data when called from VBA - Excel 2003 (EOF property of recordset is True). Here is my code..
Dim dbCon As ADODB.Connection
Dim rstTemp As New ADODB.Recordset
Dim query As String
qu...
I am currently learning Cocoa. However I am coming from a traditional Sybase/Oracle background using Powerbuilder. Having been spoiled by the 'power' of a datawindow for may years, I not sure that coredata or sqllite will satisfy my needs and ideas.
Basically I'm looking for some good reference sites, books, or just plain old advice on...
I am certain that this is documented somewhere, but I can't seem to find it.
Does anybody know if JDBC stored procedure results are streamed in Sybase?
In particular, if I use a CallableStatement to call a Sybase stored procedure, is it possible for the Java code start to read rows from the resulting ResultSet before the stored procedu...
Can anyone out there provide an example of bulk inserts via JConnect (w/ENABLE_BULK_LOAD) to Sybase ASE? I've scoured the internets and found nothing. I'm running on a short timeline so if someone can provide a short java code example it would be much appreciated.
Thanks,
Chris
...
Hello,
I've been handed a file which appears to me to be a Sybase database file from some older Sybase version. I have d-loaded the latest sybase package from sybase and tried using that to connect to the contents but failed. Can someone suggest to me how to determine which version of sybase (and perhaps even which sybase db product) my...
Or must it be a SQL Server database? If I'm reading the documentation right, as long as I use Entity Framework and not Linq to SQL, I can go against a Sybase data source. But I'm not certain...
...
It appears that it can't be done, but I really don't know why. When Sql Server executes an stored procedure it needs it's code to run it, so I'm sure that the stored procedure's code must exists in some place, but I don't know where, either.
Maybe this code is encrypted, but it could be decrypted with some tool, since the DBMS needs to ...
hi ,
In my sybase server, some rows of a table (TBL_RESOURCE) are deleting from unknown source at random intervals.I tried a lot, but i cannot able to locate from which source/file/process this data is deleting.Is there any mechanism to locate this problem !! i need to find out who is deleting this rows..
how we can find out who is dele...
When you want to insert default values into a table, some databases allow this syntax:
INSERT INTO table DEFAULT VALUES;
ASE does not support this.
Using:
INSERT INTO table (col2, col3) VALUES (DEFAULT, DEFAULT)
and skipping the identity column works for columns with constant default values, but not for computed columns including ti...
For a Perl library that dumps Sybase schemas for DBIx::Class (::Schema::Loader), I need to be able to introspect DEFAULTs and computed columns.
Suppose we have:
create table bar (
id INTEGER IDENTITY PRIMARY KEY,
foo VARCHAR(10) DEFAULT 'foo',
adt AS getdate(),
ts timestamp
)
Here's as far as I got:
select substring(c.name,1...
I have to search all rows with a filter with specific hour and minute.
Example:
26/05/2009 - 16:00
26/05/2009 - 17:00
10/11/2009 - 09:00
10/11/2009 - 10:00
10/11/2009 - 11:00
10/11/2009 - 12:00
I want all rows with hour/minute "17:00" and "18:00".
And the date is optional field.
I don't know how to do this. I'm using "sql anywhere ...
In order to remove the bias introduced by the differences in the number of days in the months and years (in case of leap years), from monthly total comparisons of arbitrary quantities and assuming, for example, a table named My_Table with a datetime column named order_date, and an integer one named revenue, I use the following query to g...
I'm trying to build a mailbox where we can group the messages in x.
If you put x to 20 you'll see messages 1-20 on the first page, opening the second page will show message 21-40 etc.
How do I efficiently query this? The best I could come up with is this:
select top 20 *
from tbl_messages
where
tnr_id not in
(
select top 40 tnr_i...
How can I both set rowcount and then execute a query in a Statement.executeQuery() function?
note I don't want to use Statement.setMaxRows() to do this
...
Hi,
I have tested jconn2 and jconn3 on same application which is connected to sybase ase15.03 server . But I encountered the really big performance differences between these two api. For example I have run a simple select query on a big table (which contains 7051328 rows 20 cols). JCONN2 returns the resultset in 5.3sec but jconn3 retur...