Click here to Skip to main content
16,004,924 members
Home / Discussions / Database
   

Database

 
AnswerRe: SUM() of a SUM() help please! Pin
Mike Dimmick14-Jul-06 0:39
Mike Dimmick14-Jul-06 0:39 
GeneralRe: SUM() of a SUM() help please! Pin
Heinz_15-Jul-06 12:12
Heinz_15-Jul-06 12:12 
QuestionTransfer data between databases Pin
Gulfraz Khan13-Jul-06 4:54
Gulfraz Khan13-Jul-06 4:54 
AnswerIf an error occurs Pin
Ennis Ray Lynch, Jr.13-Jul-06 9:22
Ennis Ray Lynch, Jr.13-Jul-06 9:22 
GeneralIt works for me! Pin
Gulfraz Khan14-Jul-06 4:19
Gulfraz Khan14-Jul-06 4:19 
QuestionMultiple user database Pin
codeamin13-Jul-06 4:51
codeamin13-Jul-06 4:51 
AnswerOpen the database as read/only Pin
Ennis Ray Lynch, Jr.13-Jul-06 9:18
Ennis Ray Lynch, Jr.13-Jul-06 9:18 
QuestionRecursive SELECT paradox!!! [modified] Pin
innocent7313-Jul-06 3:40
innocent7313-Jul-06 3:40 
Hi Folks,

I have a database table named Voyage_History that stores the voyage information of our company's vehicles. I have imported data from an MS Excel file and finally I had get the result as screen below:

---------------------------------------

SELECT Voyage_ID,PlateNumber,StartDate from Voyage_End as ddd
Group By Voyage_ID,PlateNumber,StartDate



Voyage_ID PlateNumber StartDate
----------- ----------- ------------------------------------------------------
1 34 DD 0254 2005-12-28 00:00:00
2 34 DD 0254 2005-12-28 00:00:00
3 34 DD 0254 2005-12-30 00:00:00
4 34 DD 0254 2005-12-31 00:00:00
5 34 DD 0254 2006-01-01 00:00:00
6 34 DD 0254 2006-01-04 00:00:00
7 34 DD 0254 2006-01-05 00:00:00
8 34 DD 0254 2006-01-05 00:00:00
9 34 DD 0254 2006-01-06 00:00:00
10 34 DD 0254 2006-01-06 00:00:00
11 34 DD 0254 2006-01-12 00:00:00
12 34 DD 0254 2006-01-13 00:00:00
13 34 DD 0254 2006-01-16 00:00:00
14 34 DD 0254 2006-01-17 00:00:00
15 34 DD 0254 2006-01-17 00:00:00
16 34 DD 0254 2006-01-21 00:00:00
17 34 DD 0254 2006-01-23 00:00:00
18 34 DD 0254 2006-01-26 00:00:00

------------------------------------------------

In fact, voyage_ID 1 and Voyage_ID 2 are same voyages. Because all data is same.

How can I create another table that stores unique Voyage_ID, and the most important part of the question how can I import this data correctly? ( I mean how to determine the same voyages)

Should I have apply a recursive select statement?



-- modified at 9:44 Thursday 13th July, 2006
AnswerRe: Recursive SELECT paradox!!! Pin
Eric Dahlvang13-Jul-06 4:13
Eric Dahlvang13-Jul-06 4:13 
GeneralRe: Recursive SELECT paradox!!! [modified] Pin
innocent7313-Jul-06 4:30
innocent7313-Jul-06 4:30 
GeneralRe: Recursive SELECT paradox!!! Pin
Eric Dahlvang13-Jul-06 4:37
Eric Dahlvang13-Jul-06 4:37 
GeneralRe: Recursive SELECT paradox!!! Pin
innocent7313-Jul-06 4:40
innocent7313-Jul-06 4:40 
GeneralThe best thing Pin
Ennis Ray Lynch, Jr.13-Jul-06 5:20
Ennis Ray Lynch, Jr.13-Jul-06 5:20 
GeneralRe: Recursive SELECT paradox!!! Pin
Eric Dahlvang13-Jul-06 5:50
Eric Dahlvang13-Jul-06 5:50 
QuestionSQL replication using .net Pin
farshad.A13-Jul-06 2:38
farshad.A13-Jul-06 2:38 
QuestionSQl file Log Pin
AnhTin12-Jul-06 18:13
AnhTin12-Jul-06 18:13 
AnswerRe: SQl file Log Pin
kumarprabhakar7412-Jul-06 18:37
kumarprabhakar7412-Jul-06 18:37 
GeneralRe: SQl file Log Pin
AnhTin12-Jul-06 18:59
AnhTin12-Jul-06 18:59 
GeneralRe: SQl file Log Pin
WoutL12-Jul-06 20:40
WoutL12-Jul-06 20:40 
AnswerRe: SQl file Log [modified] Pin
Mike Dimmick13-Jul-06 3:18
Mike Dimmick13-Jul-06 3:18 
QuestionComparing strings in SQL Pin
kscadi12-Jul-06 17:42
kscadi12-Jul-06 17:42 
AnswerRe: Comparing strings in SQL [modified] Pin
technomanceraus12-Jul-06 18:09
technomanceraus12-Jul-06 18:09 
Questiongetting query names Pin
hamidreza_buddy12-Jul-06 7:44
hamidreza_buddy12-Jul-06 7:44 
AnswerRe: getting query names Pin
leckey12-Jul-06 7:58
leckey12-Jul-06 7:58 
GeneralRe: getting query names Pin
Eric Dahlvang12-Jul-06 8:04
Eric Dahlvang12-Jul-06 8:04 

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.