So I have a Sybase stored proc that takes 1 parameter that's a comma separated list of strings and runs a query with in in an IN() clause:
CREATE PROCEDURE getSomething @keyList varchar(4096)
AS
SELECT * FROM mytbl WHERE name IN (@keyList)
How do I call my stored proc with more than 1 value in the list?
So far I've tried
exec getSom...
I have a stored procedure which takes as its parameter a varchar which needs to be cast as a datetime for later use:
SET @the_date = CAST(@date_string AS DATETIME)
I'm expecting the date string to be supplied in the format "DD-MON-YYYY", but in an effort to code defensively, if for some reason it can't be cast successfully, I want to ...
Imagine the scene, you're updating some legacy Sybase code and come across a cursor. The stored procedure builds up a result set in a #temporary table which is all ready to be returned except that one of columns isn't terribly human readable, it's an alphanumeric code.
What we need to do, is figure out the possible distinct values of th...
I am trying to generate a report by querying 2 databases (Sybase) in classic ASP.
I have created 2 connection strings:
connA for databaseA
connB for databaseB
Both databases are present on the same server (don't know if this matters)
Queries:
q1 = SELECT column1 INTO #temp FROM databaseA..table1 WHERE xyz="A"
q2 = SELECT ...
I'm maintaining some code that uses a *= operator in a query to a Sybase database and I can't find documentation on it. Does anyone know what *= does? I assume that it is some sort of a join.
select * from a, b where a.id *= b.id
I can't figure out how this is different from:
select * from a, b where a.id = b.id
...
We are now using NHibernate to connect to different database base on where our software is installed. So I am porting many SQL Procedures to Oracle.
SQL Server has a nice function called DateDiff which takes a date part, startdate and enddate.
Date parts examples are day, week, month, year, etc. . .
What is the Oracle equivalent?
I...
What is the difference between UNION and UNION ALL.
...
If you're creating a temporary table within a stored procedure and want to add an index or two on it, to improve the performance of any additional statements made against it, what is the best approach? Sybase says this:
"the table must contain data when the index is created. If you create the temporary table and create the index on an e...
I need to specify a date value in a sybase where clause. For example:
select *
from data
where dateVal < [THE DATE]
...
I have been sick and tired Googling the solution for doing case-insensitive search on Sybase ASE (Sybase data/column names are case sensitive). The Sybase documentation proudly says that there is only one way to do such search which is using the Upper and Lower functions, but the adage goes, it has performance problems. And believe me th...
We need to get some good books on Sybase ASE 15 for our developers. The people in the team have previous experience with different SQL flavors (MS SQL, MySQL, Informix and Oracle) but no one worked with Sybase before. Therefore I am looking for two kinds of books:
Book for developers on how to use Sybase for queries,sprocs, views etc....
Are there any good database schema comparison tools out there that support Sybase SQL Anywhere version 10? I've seen a litany of them for SQL Server, a few for MySQL and Oracle, but nothing that supports SQL Anywhere correctly.
I tried using DB Solo, but it turned all my non-unique indexes into unique ones, and I didn't see any optio...
I don't seem to be able to close the OledbDataReader object after reading data from it. Here is the relevant code -
Dim conSyBase As New OleDb.OleDbConnection("Provider=Sybase.ASEOLEDBProvider.2;Server Name=xx.xx.xx.xx;Server Port Address=5000;Initial Catalog=xxxxxxxxxx;User ID=xxxxxxxx;Password=xxxxxxxxx;")
conSyBase.Open()
Dim cmdSy...
Well, the question is pretty much in the title. I've just installed Visual Studio SP1, and now when I want to import a Entity Model from a database, it doesn't display the SQL Anywhere provider anymore.
Does anyone know if there is a patch or some way to make it work with SP1?
Thanks.
...
I am pretty much a Sybase expert, an experienced developer, and very comfortable learning new stuff.
I need to write a bunch of SQL to run against an Oracle database.
Can someone recommend a book, training course or other resource to give me what I need to know in the shortest possible time?
I don't need Oracle for Dummies, but someth...
I have recently changed an application from storing the database username and password in a configuration file (gasp password stored in plain text in a config file, I know, I know).
The application now asks the user to type in her username and password before it can continue.
The new version of the application now has to interrogate th...
I have some tables that I build as a part of my report rollup. I don't need them afterwards at all. Someone mentioned to truncate them as it would be faster.
...
When the autocomplete listbox/dropdown is displayed in Aqua Data Studio, you have to hit enter in order for the current hightlighted item to complete the identifier. Is there a way that I can hit the tab key to autocomplete instead? This is the default behavior for Visual Studio and I cannot find the keyboard shortcuts editor in Aqua Dat...
I am using sybase database to query the daily transaction report. I had subquery within my script.
Here as it goes:
SELECT orders.accountid ,items.x,etc
(SELECT charges.mistotal FROM charges where items.id = charges.id)
FROM items,orders
WHERE date = '2008-10-02'
Here I am getting the error message as Subquery cannot return more than...
Good morning,
I know very little (arguably nothing) about SYBASE setup, but I do know SSIS is having trouble enlisting SYBASE in a distributed transaction. Has anyone been able to make this work?
The SSIS Runtime has failed to enlist the OLE DB connection in a distributed transaction with error 0x80004005 "Unspecified error".
This h...