Sybase Database

Sybase, a subsidiary of SAP, builds a client/server relational database management system. Products include Adaptive Server Enterprise (ASE), Adaptive Server Anywhere (ASA), Sybase Unwired Platform (SUP) for mobile applications, Afaria for enterprise mobile device management and IQ for data warehouse and big data applications.

Share tech news, updates, or what's on your mind.

Sign up to Post

I'm trying to establish a connection to Medisoft database using ODBC but I can not get a connection established. This is the command string I'm putting in my application:

ODBC;Server=HDCServer;DSN=MSPatient;User ID=user;Password=password;

The ODBC source is pointing to MWDDF.ADD

The error is that "the table is a database table, it can not be opened as a free table"

The ODBC driver is installed. Any ideas ?
0
Keep up with what's happening at Experts Exchange!
LVL 12
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Hi ,


I am using sybase database for my project, for select queries its working fine but while insert/update/delete it's not working fine. Means app will become hang.


Please help me out.



Insert/Update/Delete not working.



Thanks,
Venkat.
0
what are uses of Windows functions like

OVER(), PARTITION etc.

is it supported in all the databases?

what are other windows functions are there?
why they called windows functions

please advise
0
what are differences between correlated vs non-correlated sub query

when we use each one of them
what is moving range date and how correlated sub query useful there?

also when we use Cartesian product with cross join
please advise
0
DIFFERENCES BETWEEN

1. FUL OUTER JOIN
2. LEFT OUTER JOUN
3. RIGHT OUTER JOIN
4. LEFT INNER JOIN
5. RIGHT INNER JOIN
6. FULL INNER JOIN

WHEN TO USE WHICH ONE

please advise
0
SELECT UPPER(COLUMN1)
FROM SCHEMA1.TABLE1

SELECT UPPER(COLUMN2)
FROM SCHEMA2.TABLE2

i have 100 records in column 1 and column 2 with roughly half capitol words(HONDA etc.) and rest of half small words(nissan etc.)

when i do UPPER character function

i expected to see 50 records with values like NISSAN


when i do LOWER character function
i expected to see 50 records with values like honda

but i got only 2 records.

can you please advise how to fix this
0
descendex.zipdescendex.zip0
down vote
favorite
I am having a problem with seeks not working on descending indexes key values.

I set up my DBE as follows:

SET COLLATION TO AMERICAN Dbeload( "ADSDBE", .F. ) DbeSetDefault( "ADSDBE" )

// FOXCDX compatibility - .CDX/.FPT DbeInfo( COMPONENT_DATA , ADSDBE_TBL_MODE, ADSDBE_CDX ) DbeInfo( COMPONENT_ORDER, ADSDBE_TBL_MODE, ADSDBE_CDX )

// Use server rights not user rights DbeInfo( COMPONENT_DATA, ADSDBE_RIGHTS_MODE, ADSDBE_IGNORERIGHTS )

I am connecting through an ADS data dictionary and the tables were added using the FoxPro (DBF/CDX) driver (not the Visual Foxpro driver.)

The indexes are created through ADS.

I have an index that puts empty dates first followed by descending dates then ascending IDs as:

 descend(If(empty(date),’99999999’,dtos(date))+id
Whenever I do a seek as either dbseek(descend(‘99999999’)) or dbseek(descend(dtos(dMyDate))) the seek goes to EOF or the proper record (date does exist) is not found properly.

I have the character set set to ANSI for both systems and the collation to Engl.(Amer) in both.

I've attached a sample program, table and other information in case anyone wants to take a look.
0
Hello Experts,
Currently I am in the process of comparing a large number of tables between two databases. The source db is Sybase and the destination to which it was migrated to is SQL Server. One simple but a tedious way is to save the output as text files and compare it with each other using file comparison, which really is not efficient when the rows are several hundred thousands. Hence, would like to know if there is an easy way out.

Thanks in Advance!
0
In my sample table I have several records with the same ID. Based on another field called amounttype, I need to merge the 2 rows so that I only get 1 row.

If the amounttype is = A, I want to take the values from the fields tax and TX from the row with the same ID and put it in the fields tax and TX for the record with the same ID.

Here are the 2 records:

2rows.png
Desired result:

1row.png
If amounttype ='A' then (take value from field tax from the record with the same ID but with amounttype =8) and  put it here.....

How do I achieve this?
0
I have a Sybase Anywhere 16 database. I was wondering if there was anyway of see who or when a row or column was last changed. I am thinking there is not but I am not that familiar with Sybase.
0
Introducing Cloud Class® training courses
LVL 12
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

SELECT COUNT ( DISTINCT cust_code ) AS "Number of employees"
FROM orders;

checking above query at
https://www.w3resource.com/sql/aggregate-functions/count-with-distinct.php

how to display those unique values of  cust_code rather than just count
please advise
0
I have an question if there is a possibility to load SAP ASE database  dump from ASE server running on HP-UX to Linux.
I found a tech-note on sap help, but it haven't directly answered my question.
Dumping and Loading Databases Across Platforms

Did someone perform successfully such type of restore between these two platforms?
0
SELECT COUNT(POPULATION) from CITY
WHERE District= "California";

what is difference between above and below query?

SELECT SUM(POPULATION)
FROM CITY
WHERE DISTRICT = "California";

Please advise
0
Need to know if its possible in SAP Plant Maintenance to do a manual call on just ONE maintenance item # on a multi-item maintenance plan. For example, I have a maintenance plan # 1001 that has 99 task list items on it, varying in intervals from daily to annually, and one of those task lists maint items is # 567, I want to manually call just that 567 item to generate a work order tomorrow. I know if I were to create a maintenance plan for every task list, this would not be a problem, but my maintenance plans have many task lists on them and I cannot figure out how to manually call just ONE of them and not any others on that maintenance plan.
thx experts
BobR
0
In Sybase sql how do I check if a stored procedure exists?
If the procedure exists I need to recreate it.

If it does not exists I need to also create it.
0
Can you please help me with the below query:

SELECT
                                 SM_SEC_GROUP,
                                 SM_SEC_TYPE,            
                                 MAX (ABS(MKT_VALUE * r.rate)) AS 'MKV_USD',
                                 MAX (ABS(MKT_NOTION * r.rate)) AS 'NOTIONAL_USD',
                                 COUNT (*) AS 'NUM_OF_HOLDINGS'  ,
                        MAX(FI.MATURITY) AS MATURITY
                                               
                        --      INTO #FI_Summary
                              FROM
                                 iim_risk_point.dbo.FI_PORT_SEC_CHAR_LOAD FI,
                                 dbo.Account ACT,
                                 dbo.fx_rate r
                              WHERE
                                 ASOF_DATE = '12/29/2017' AND
                       FI.MATURITY < dateadd(dd, 30, '12/29/2017') AND
                                 FI.PORTF_LIST = ACT.ID_ALADDIN AND
                                 ACT.STATUS = 'A' AND
                                 ACT.NME_GC_LVL1 IN('Fixed Income','Liquidity' )   AND
                                 MKT_VALUE <> 0  AND
                                 FI.PORT_CURRENCY = r.curr_sold AND
                                 r.curr_bought = 'USD' AND
                                 FI.ASOF_DATE = r.date
                              GROUP BY
                                 SM_SEC_GROUP,
                                 SM_SEC_TYPE
                              ORDER BY 1,2


      the dateadd function is not giving correct results. what am I doing wrong.
0
I wrote some SYbase sql to check if a column exists. If it does not exists I create a new column in the table. It almost works but something is wrong with my exec statement at line 3. When I try and run the code code block below I get an error message --> stored procedure '"ALTER TABLE dbo.customers ADD CustLoyalty VARCHAR(20)"' not found.
 So can someone tell me what is wrong at line 3 below?


1  if not exists (select 1 from syscolumns where id= object_id('dbo.customers') and name = 'CustLoyalty')
2   begin
3  exec "ALTER TABLE dbo.customers ADD CustLoyalty VARCHAR(20)"
4  end
0
Dears, I have sybase replication server 15.7
I ran sysadmin hibernate_on to be able to purge queues, now I try to run sysadmin_off but the server became hung and not reactive , even after  restarting the sybase service .

please advice how can I re-active the server and finish its hibernation mode
0
My question involves not only Oracle but Sql server and Sybase. I am wondering if there is a way to monitor database changes so to prevent catastrophic events so to speak in the database. By catastrophic events, below are some examples.
The reason I am asking this is that on my job I work with about 6 different databases. two are Oracle, two are Sybase and two are Sql server. I need to somehow monitor any catastrophic changes to the database. Is there a way to do that? I have an application that accesses the databases and of course the application will crash if certain catastrophic events occur. But sometimes running the application is not enough, so to somehow monitor any database changes would be great.


- Deletion of linked servers
- Deletion of user accounts
- Deletions from key tables
0
Cloud Class® Course: Certified Penetration Testing
LVL 12
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

But whenever possible have a unique clustered index.  For example, on the state codes table, a unique clustered index on state_code would work just fine.
i am reading as above.
what is meaning of unique clustered index and how it is different from regular index. please let me know advantages of using it.

please advise
0
I had a situation where a '\x0d' charater was appearing (appended) to the data in a single column.

Scenario:
In a stored procedure, data is retrieved and a #table is used for data manipulation.
At the end of the proc, the data is inserted into a permenant table, selecting from the #table.
However, in 1 column (not all) a carriage return, '\x0d', was appended to the data.

this was not in the #table and I could not see why this was happening.

I recompiled the permenant table and the error disappeared.

My concern is this is a production procedure & table, and it is not feasible to re-create the table and rerun the procedure every time (if) it reappears.

Any experience of this issue?
Any theories??

TIA
0
Dear Team,

Following is the error is received in the ASE errorlog,

Error: 12301, Severity: 20, State: 1
00:0002:00000:00211:2017/12/13 17:57:16.79 server  Internal error: the index (id = 2) and the data for row (26710892, 25) in table 'BUT000', database 4 are inconsistent; data is marked deleted but index is not. Aborting the transaction.

After that not able to connect dataserver, below is the error,

--Server is up and running but i'm getting below error Read from the server has timed out.

$isql -U -S -P
CT-LIBRARY error:
        ct_connect(): user api layer: internal Client Library error: Read from the server has timed out.
0
Here is the solution for that question,  

select sysuser.user_name,table_name,systableperm.*
from systable,systableperm,sysuser
where stable_id=systable.table_id
and systableperm.grantee=sysuser.user_id
and sysuser.user_name='put_user_name_here'
0
Hi,
Well I would like to build a e-commerce site in .net  
I stucked in designing the DB tables , and my problem IS:

let us say I need as a seller to sell a 2 products :
1. ring
2. cat

the "Ring" product have this fields:
A. category :"Product"
B. CategoryType : "jewelry"
C. ProductCondition: "New"
D. ProductMaterial: "Silver"

the "Cat" producthave this fields:
A. category :"Product"
B. CategoryType : "Pet"
C. Age : "1 year"
D. Color : "White"

It means , that will be MANY products at same category  with VARY different fields/sub-category .
how can i solve this problem in designing the DB field/tables/relations between each other?
0
why we need junction table for many to many.

i am not clear on that concept. can you please elaborate with example tables with data?
i am going through below link but not completely clear
https://www.youtube.com/watch?v=P_nhBKs25DQ
please advise
0

Sybase Database

Sybase, a subsidiary of SAP, builds a client/server relational database management system. Products include Adaptive Server Enterprise (ASE), Adaptive Server Anywhere (ASA), Sybase Unwired Platform (SUP) for mobile applications, Afaria for enterprise mobile device management and IQ for data warehouse and big data applications.