Sybase

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsDatabasesSybase

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old June 5th, 2015, 01:56 AM
stahorse stahorse is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 6 stahorse User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 44 m 35 sec
Reputation Power: 0
How does sybase SQL queries differs from MS SQL queries

Hi

I just joined this company and I'm new to Sybase, so I'm looking through their work to see what's happening, I cam across this query which I need help of.

SELECT
count(DISTINCT h.hosp_id) AS cases,
sum(h.totalbenefit) AS total_benefit,
CONVERT(DECIMAL(10,2),(total_benefit/cases)) AS average_cost_per_admission
FROM
dss."hosp_cases" h

--> From my understanding of MS T-SQL, the query would start to execute from the "FROM" clause, SELECT would be second last then ORDER BY being the last one to execute. Now from the above query I could help to notice that they have "ONVERT(DECIMAL(10,2),(total_benefit/cases)) AS average_cost_per_admission" as one of the field they are selecting, "total_benefit" and "cases" as aliases.

--> My question is, is it possible to do Selection like that, and how does Sybase execute, and links if any to study further on Sybase.

Reply With Quote
  #2  
Old February 29th, 2016, 11:47 PM
xavipirlo10 xavipirlo10 is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Feb 2016
Posts: 2 xavipirlo10 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 42 sec
Reputation Power: 0
How does sybase SQL queries differs from MS SQL queries

The “BEGIN TRANSACTION” command is used to declare the beginning of a transaction, and either a COMMIT statement is used at the end. This COMMIT statement will write the changed data to disk, and end the transaction. Within a transaction, ROLLBACK will discard any changes made within the transaction block. When properly used with error handling, the ROLLBACK allows for some degree of protection against data corruption. After a COMMIT is issued, it is not possible to roll back any further than the COMMIT command.

Reply With Quote
Reply

Viewing: Tutorialized ForumsDatabasesSybase > How does sybase SQL queries differs from MS SQL queries


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap