Click here to Skip to main content
15,895,462 members
Home / Discussions / Database
   

Database

 
AnswerRe: Reading from AS400 Pin
Wendelius9-Feb-09 6:04
mentorWendelius9-Feb-09 6:04 
GeneralRe: Reading from AS400 Pin
Giorgi Dalakishvili9-Feb-09 6:21
mentorGiorgi Dalakishvili9-Feb-09 6:21 
GeneralRe: Reading from AS400 Pin
Wendelius9-Feb-09 6:43
mentorWendelius9-Feb-09 6:43 
Questioninstall the OSQL tool on the client machine Pin
sunil goyalG5-Feb-09 23:13
sunil goyalG5-Feb-09 23:13 
QuestionSQL Server 2005 pending open transaction Pin
sujithkumarsl5-Feb-09 19:24
sujithkumarsl5-Feb-09 19:24 
AnswerRe: SQL Server 2005 pending open transaction Pin
Wendelius9-Feb-09 6:22
mentorWendelius9-Feb-09 6:22 
GeneralRe: SQL Server 2005 pending open transaction Pin
sujithkumarsl9-Feb-09 16:41
sujithkumarsl9-Feb-09 16:41 
QuestionEleminating same consecutive rows. Pin
pratap19805-Feb-09 12:13
pratap19805-Feb-09 12:13 
Hi All
I am writing an sql query for this situation to alalyze my data.
Table: Test

Actual Data

id key task
1 101 Ho
2 101 Dm
3 101 Dm
4 101 Ho
5 101 Ho
6 101 Ho
7 101 Ma
8 101 Ma
9 101 Dm

Required Output
id Key task
1 101 Ho
2 101 Dm
4 101 Ho
7 101 Ma
9 101 Dm

I want to compare the consecutive rows "task" column and want to display only one of those consecutive rows if the "task" column is same.

How can i achieve this in Microsoft SQL Server

I achieved this in Oracle by
SELECT routekey,collectionid,time,speed,heading,culmativedistance,latitude,lathemisns,longitude,longhemisew,satellitesinview,satellitestracked,satellitestatus,hdp,fixquality,snr,checksum,lowsignalenv,nogpssignal,nosatellitesinview,nulldatarpt,gpstrigger
FROM tester
WHERE prev_gpstrigger != gpstrigger
OR prev_gpstrigger IS NULL
ORDER BY collectionid,routekey;

Thanks
AnswerRe: Eleminating same consecutive rows. Pin
Blue_Boy6-Feb-09 4:59
Blue_Boy6-Feb-09 4:59 
QuestionMigrating from Oracle to SQL Server-urgent Pin
pzn3xq5-Feb-09 5:36
pzn3xq5-Feb-09 5:36 
AnswerRe: Migrating from Oracle to SQL Server-urgent Pin
PIEBALDconsult5-Feb-09 6:03
mvePIEBALDconsult5-Feb-09 6:03 
AnswerRe: Migrating from Oracle to SQL Server-urgent Pin
Wendelius5-Feb-09 6:10
mentorWendelius5-Feb-09 6:10 
QuestionUsing SQL Server 2005 stored procedure in a view Pin
Steven J Jowett5-Feb-09 1:09
Steven J Jowett5-Feb-09 1:09 
AnswerRe: Using SQL Server 2005 stored procedure in a view Pin
Rob Philpott5-Feb-09 2:05
Rob Philpott5-Feb-09 2:05 
GeneralRe: Using SQL Server 2005 stored procedure in a view Pin
Steven J Jowett5-Feb-09 2:23
Steven J Jowett5-Feb-09 2:23 
Questionsql query parser Pin
me_aaryan4-Feb-09 22:38
me_aaryan4-Feb-09 22:38 
AnswerRe: sql query parser Pin
Wendelius5-Feb-09 6:06
mentorWendelius5-Feb-09 6:06 
AnswerRe: sql query parser Pin
PIEBALDconsult5-Feb-09 6:11
mvePIEBALDconsult5-Feb-09 6:11 
QuestionGrouping to eliminate null Pin
member274-Feb-09 20:00
member274-Feb-09 20:00 
AnswerRe: Grouping to eliminate null Pin
Ennis Ray Lynch, Jr.5-Feb-09 6:33
Ennis Ray Lynch, Jr.5-Feb-09 6:33 
Questioncountry,state ,city, table in sql server Pin
surajitkhamrai4-Feb-09 19:09
surajitkhamrai4-Feb-09 19:09 
AnswerRe: country,state ,city, table in sql server Pin
Rob Philpott4-Feb-09 22:03
Rob Philpott4-Feb-09 22:03 
QuestionSQL xml: get xml values into CSV? Pin
pankazmittal4-Feb-09 11:38
pankazmittal4-Feb-09 11:38 
AnswerRe: SQL xml: get xml values into CSV? Pin
Wendelius5-Feb-09 5:59
mentorWendelius5-Feb-09 5:59 
GeneralRe: SQL xml: get xml values into CSV? Pin
pankazmittal5-Feb-09 9:08
pankazmittal5-Feb-09 9:08 

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.