|
Home > Archive > MS SQL Server MSEQ > May 2005 > Query Question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| Hi! what command should i include in the SELECT query statement so that i can
filter away the duplicate record(see only unique row)...eg by time. Thks!
| |
| Hari Prasad 2005-05-30, 9:23 am |
| Hi,
see DISTINCT / GROUP BY CLAUSE in books online
Thanks
Hari
SQL Server MVP
"David" <David@discussions.microsoft.com> wrote in message
news:3FFA38D5-ABE8-45C3-B1DB- CB678852B45E@microso
ft.com...
> Hi! what command should i include in the SELECT query statement so that i
> can
> filter away the duplicate record(see only unique row)...eg by time. Thks!
| |
|
| Hi!
If i'm trying to filter by Date and Time which is 2 seperate data field
distintively, how's the sql query be like? What i wanted to achieve here is
every rows will have a distinct date and time. Any idea? Thks!
"Hari Prasad" wrote:
> Hi,
>
> see DISTINCT / GROUP BY CLAUSE in books online
>
> Thanks
> Hari
> SQL Server MVP
>
> "David" <David@discussions.microsoft.com> wrote in message
> news:3FFA38D5-ABE8-45C3-B1DB- CB678852B45E@microso
ft.com...
>
>
>
| |
| Hugo Kornelis 2005-05-31, 8:25 pm |
| On Mon, 30 May 2005 21:12:22 -0700, David wrote:
>Hi!
>
>If i'm trying to filter by Date and Time which is 2 seperate data field
>distintively, how's the sql query be like? What i wanted to achieve here is
>every rows will have a distinct date and time. Any idea? Thks!
Hi David,
I'm sorry, but I have trouble understanding what you try to achieve. It
would help if you would post:
* the structure of your table(s) (as CREATE TABLE statements, including
all constraints and properties, though irrelevant columns may be
omitted);
* some illustrative rows of sample data (as INSERT statements);
* the expected output
See www.aspfaq.com/5006 for more info on how to post.
Also, having date and time as seperate columns is usually a bad idea.
SQL Server has no datatypes for date only or time only, but it does have
datatypes for date and time combined. Splitting date and time in two
columns will introduce many problems that you won't have if you keep
them combined in one datetime column.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
|
|
|
|
|