Click here to Skip to main content
16,006,065 members
Home / Discussions / Database
   

Database

 
QuestionThe highest value for VarBinary(MAX) in Production Server Pin
Nadia Monalisa10-Aug-07 1:53
Nadia Monalisa10-Aug-07 1:53 
AnswerRe: The highest value for VarBinary(MAX) in Production Server Pin
Talal Sultan10-Aug-07 2:01
Talal Sultan10-Aug-07 2:01 
GeneralRe: The highest value for VarBinary(MAX) in Production Server Pin
Nadia Monalisa10-Aug-07 2:10
Nadia Monalisa10-Aug-07 2:10 
GeneralRe: The highest value for VarBinary(MAX) in Production Server Pin
Talal Sultan10-Aug-07 2:16
Talal Sultan10-Aug-07 2:16 
GeneralRe: The highest value for VarBinary(MAX) in Production Server Pin
Luis Alonso Ramos12-Aug-07 14:49
Luis Alonso Ramos12-Aug-07 14:49 
Questionhow can i write a query.... Pin
koolprasad200310-Aug-07 0:06
professionalkoolprasad200310-Aug-07 0:06 
AnswerRe: how can i write a query.... Pin
andyharman10-Aug-07 2:19
professionalandyharman10-Aug-07 2:19 
Questionpivot query in sybase Pin
pete007_ke9-Aug-07 22:08
pete007_ke9-Aug-07 22:08 
greetings people,

simply wondering whether there is another of doing this is standard ANSI Transact SQL.
So is here is the query that im running in SQL Server 2005:


Select flavour, isnull([Period 1],0) as [Period 1] , isnull([Period 2], 0) as [Period 2] from (
select sum(crates) as crates, flavour, dbo.getperiod(saledate,'08 Jul 2007','08 Aug 2007') as Period
from ReportSummary where
dbo.getperiod(saledate,'08 Jul 2007','08 Aug 2007') <> 'unknown' and producttypeid=10
group by flavour,dbo.getperiod(saledate,'08 Jul 2007','08 Aug 2007')

) as p
pivot
(
sum(crates) for period in ([Period 1],[Period 2])
) as pvt



and the result set is as follows:


FLAVOUR Period1 Period2
Bitter Lemon 894.41 0.00
Blackcurrant 892.53 0.00
Citrus 481.25 2.00
Coca-Cola 1346.00 0.00
Coke Light 131.75 0.00
Ginger Ale 404.88 0.00
Orange 2667.92 0.00
Soda Water 327.80 0.00
Sprite 1886.49 0.00
Stoney Ginger Beer 559.71 0.00
Tonic Water 250.00 0.00



my problem is that i need to run the same query in a Sybase databse.HOwever, Sybase does not have the pivot operator. Any other of doing the same thing??

Kind regards,
Pete.
AnswerRe: pivot query in sybase Pin
andyharman10-Aug-07 2:24
professionalandyharman10-Aug-07 2:24 
QuestionError in connecting remotely to database Pin
IamAmit9-Aug-07 3:18
IamAmit9-Aug-07 3:18 
AnswerRe: Error in connecting remotely to database Pin
Talal Sultan9-Aug-07 3:55
Talal Sultan9-Aug-07 3:55 
AnswerRe: Error in connecting remotely to database Pin
originSH9-Aug-07 5:10
originSH9-Aug-07 5:10 
GeneralRe: Error in connecting remotely to database Pin
IamAmit9-Aug-07 23:09
IamAmit9-Aug-07 23:09 
GeneralRe: Error in connecting remotely to database Pin
Talal Sultan9-Aug-07 23:59
Talal Sultan9-Aug-07 23:59 
GeneralRe: Error in connecting remotely to database Pin
IamAmit10-Aug-07 0:04
IamAmit10-Aug-07 0:04 
GeneralRe: Error in connecting remotely to database Pin
Talal Sultan10-Aug-07 0:11
Talal Sultan10-Aug-07 0:11 
GeneralRe: Error in connecting remotely to database Pin
IamAmit10-Aug-07 0:22
IamAmit10-Aug-07 0:22 
GeneralRe: Error in connecting remotely to database Pin
sam#10-Aug-07 1:35
sam#10-Aug-07 1:35 
GeneralRe: Error in connecting remotely to database Pin
Talal Sultan10-Aug-07 1:56
Talal Sultan10-Aug-07 1:56 
QuestionBulk insert Pin
John.L.Ponratnam9-Aug-07 3:03
John.L.Ponratnam9-Aug-07 3:03 
AnswerRe: Bulk insert Pin
andyharman9-Aug-07 4:41
professionalandyharman9-Aug-07 4:41 
QuestionServer Error i need to solve this error Pin
Rami Said Abd Alhalim9-Aug-07 2:35
Rami Said Abd Alhalim9-Aug-07 2:35 
AnswerRe: Server Error i need to solve this error Pin
Blue_Boy9-Aug-07 2:46
Blue_Boy9-Aug-07 2:46 
GeneralRe: Server Error i need to solve this error Pin
Rami Said Abd Alhalim9-Aug-07 2:50
Rami Said Abd Alhalim9-Aug-07 2:50 
AnswerRe: Server Error i need to solve this error Pin
Talal Sultan9-Aug-07 3:51
Talal Sultan9-Aug-07 3:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.