Home > Archive > MS SQL Server MSEQ > August 2005 > Maximum Length Issue









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]

 

Author Maximum Length Issue
Travis

2005-08-01, 3:25 am

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_Hist
ory.flt_Id))>1) AND
((Count(F_Sgmt_Histo
ry.Psg_Id))>1) AND
((Count(F_Sgmt_Histo
ry.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
priya.H.Gupta@lntinfotech.com

2005-08-01, 3:25 am

instead of '[' ,']' (square baracket ) use '(' ,')' and do not use '.'
before 'AS'.
your problem will be solved

"Travis" ने लिखा:

> 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_Hist
ory.flt_Id))>1) AND
> ((Count(F_Sgmt_Histo
ry.Psg_Id))>1) AND
> ((Count(F_Sgmt_Histo
ry.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

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com