Maximum Length Issue



Hi ,

I perform the query show below to find the duplicate records within the
table itself

"SELECT f_table.flt_Id, f_table.Psg_Id, f_table.Flt_dt_Id
FROM
[SELECT
Count(F_Sgmt_History.flt_Id),
Count(F_Sgmt_History.Psg_Id),
Count(F_Sgmt_History.Flt_dt_Id),
F_Sgmt_History.flt_Id, F_Sgmt_History.Psg_Id, F_Sgmt_History.Flt_dt_Id
FROM F_Sgmt_History
GROUP BY F_Sgmt_History.flt_Id, F_Sgmt_History.Psg_Id,
F_Sgmt_History.Flt_dt_Id
HAVING (((Count(F_Sgmt_History.flt_Id))>1) AND
((Count(F_Sgmt_History.Psg_Id))>1) AND
((Count(F_Sgmt_History.Flt_dt_Id))>1))]. AS f_table INNER JOIN F_Sgmt_History
ON (f_table.Flt_dt_Id = F_Sgmt_History.Flt_dt_Id) AND (f_table.Psg_Id =
F_Sgmt_History.Psg_Id) AND (f_table.flt_Id = F_Sgmt_History.flt_Id)"

But I get the following error

"Server: Msg 103, Level 15, State 7, Line 3
The identifier that starts with 'SELECT
Count(F_Sgmt_History.flt_Id),
Count(F_Sgmt_History.Psg_Id),
Count(F_Sgmt_History.Flt_dt_Id),
F_Sgmt_History.flt_Id, ' is too long. Maximum length is 128.
Server: Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'AS'. "

I am not sure wat's wrong with the statment , please help

--
Travis Tan
.



Relevant Pages

  • RE: Maximum Length Issue
    ... > I perform the query show below to find the duplicate records within the ... > Travis Tan ... Prev by Date: ...
    (microsoft.public.sqlserver.mseq)
  • Exist Return Values
    ... I like to use a variable to store the return values of the ... I unable to do that from my query show ... Travis Tan ... Prev by Date: ...
    (microsoft.public.sqlserver.mseq)
  • Delete Query
    ... I'd like to create a query that checks for duplicate records and deletes the ... record that, on an autonumber field, has the smaller value? ... Prev by Date: ...
    (microsoft.public.access.queries)
  • Hide duplicate records
    ... Is there a way to hide duplicate records in a query, I tried to do it in a ... report and it still shows the duplicate records. ... Prev by Date: ...
    (microsoft.public.access.queries)
  • Re: Identifying Duplicate Records
    ... response to what appeared to be a barely relevant question. ... in the list of options is Find Duplicates query. ... or bring up the dupe records to look at them. ... have a find duplicate records wizard. ...
    (microsoft.public.access.formscoding)