In Sybase SQL, I would like to execute a String containing SQL.
I would expect something like this to work
declare @exec_str char(100)
select @exec_str = "select 1"
execute @exec_str
go
from the documentation of the exec command
execute | exec
is used to execute a stored procedure or an extended stored
procedur...
I have a table called "downloads" with a few thousand rows. I just added a column called is_completed using the following command:
ALTER TABLE downloads ADD is_completed BIT default 1 NOT NULL
Now I would like to change the default value for is_completed to 0 - I tried this command to no avail:
ALTER TABLE downloads MODIFY is_complet...
We have a hard to track-down bug in one of our systems, i.e. it appears very seldom and randomly so we figure good logging over an extensive time period would be helpful.
Therefore I would like to ask if it's possible in any way to let Sybase (12.5.X or 15.X) log the SQL operations that updates the contents of a specific table, i.e. ins...
is it posible to simply open and view a sybase dat file?
I've been trying to look for a tool but every tool asks for server information, and I just want to open the file.
thanks.
...
They share common history, they run on different operating systems. This is the part I know.
what parts remain the same?
which have changed since they split?
is SQL Server knowledge still applicable to Sybase?
what features available in Sql Server are not present in Sybase?
which features that are present in Sybase are not availabl...
A long time ago I figured out that bcp is just a little C program that calls the special bit of the sybase client api to do mass data moving into the database. It lies cheats and steals and skips check constraints all in the name of speed.
Great, I'm all for it.
In sybase 12 I noticed that the api was exposed in the C client library, but...
We have a Database in Sybase, which we access from a Java server.
Access to the DB was made directly through the Sybase driver, using DriverManager. It was working correctly, we were able to call our stored procedures.
Recently, we are migrating to an application server (on JBoss 5), and the calls to the database are now made through a...
In my Perl script, I use DBD::Sybase (via DBI module) to connect to a SQL Server 2008. The base program as below runs without problem:
use DBI;
# assign values to $host, $usr, $pwd
my $dbh = DBI->connect("dbi:Sybase:$host", $usr, $pwd);
$dbh->do("BEGIN TRAN tr1");
my $update = $dbh->prepare("UPDATE mytable SET qty = ? where name = ?");...
I have a sybase 15 DB and for one of my tables, I want to make a column default to the current date/time of the row insert. Is this possible?
In a sybase text, the following is said:
ALTER TABLE sales_order
MODIFY order_date DEFAULT CURRENT DATE
On my DB this dosn't do anything ,as CURRENT DATE is not recognized.
...
Dear Friend
I want to connect Sybase 12.5 using vb 6.0, then what should be provider i can use to connect the Sybase 12.5.
thanks
...
Hi there,
Using SQL statements (sybase) how can I create or restore a full database given the conpressed backup file (myDatabase.cmp.bak).
The reason i'm saying create or restore is that the DB already exists but I can drop it before creating it if that's easier.
Do I need to worry about Device files? For example if the backup file us...
Hello. Using Sybase IQ v12.7. Executing sp_helptext ProcedureName shows the text of the stored procedure which is fine. However it wraps lines at 80 characters. The question is, how to show text text of a stored procedure without wrapping?
In Sybase Central Java Edition there is a feature see the text of a stored procedure (Tranact-...
Does or can DataWindow .NET take advantage of connection pooling?
...
Hey Everyone,
If there are any Sybase ASE experts out there, I was wondering if there is a way to get Sybase to trace all the queries that it receives.
I currently have a program running that usually begins displaying some strange behaviour after 7 hours from startup. I would like to find out what Sybase is doing at this time, so that...
Sybase problem: The selected values of column1 (id) of a huge_tbl table (60 million+ records) needs to be copied into small_tbl table which is comparatively small. The criteria to select rows from the huge_tbl depends on column2 values (mydate).
huge_tbl:
- id is primary key of huge_table
- mydate column is a datetime field.
- There is...
Hi there,
Does anyone know how I can query the database to find what devices a database uses?
There is the sysdatabases table and the sysdevices table but I don't know how to link them
Anyone know?
...
Running on Adaptive Server Enterprise/15.0.3/EBF 17157 ESD#3/P/x86_64/Enterprise Linux/ase1503/2726/64-bit/FBO/
The below code should never enter the substring case, however I am presented with a Sybase Error 536.
Is this a form of optimization where it evaluates all paths regardless of the actual value??
We can work around this but w...
I am trying to query Sybase database using DBD::Sybase. Can someone please clarify what is the difference between using syb_nsql vs prepare(...) - execute(..) calls?
...
I'm using Sybase::CTlib to query a Sybase server. However when I execute the following:
while( $dbr->ct_results($restype) == CS_SUCCEED ) {
if( $restype == CS_CMD_FAIL ) {
warn "Update Check Failed...";
next;
}
next unless $dbr->ct_fetchable($restype);
$ts = $dbr->ct_fetch;
}
My query returns exactly one value....
I need to recover data from a Sybase SQL Anywhere 12 (I have an *.db file) into MS SQL Server 2008.
I installed the SQL Anywhere 12 Developer kit and that allowed me to run the database and installed ODBC drivers that should have allowed me to do this. I managed to use the SQL Server Import/Export wizard to import a single table by typ...