Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server Syntax?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00495857
Message ID:
00495953
Views:
11
>
>SQL Server doesn't like field aliases in its GROUP BY or HAVING clauses. Copy the actual expression definition into the HAVING clause.
>SELECT cast(g1csf.pacid /10000000 as int) as UREG, g1csf.*
>into ProgeddTests
> FROM  g1csf INNER JOIN g1_cnsin
>   ON  G1csf.cnsinv = G1_cnsin.cnsinv
>   where substring(ltrim(str(g1csf.pacid,14)),8,2) ='20'
>and substring(ltrim(str(g1csf.pacid,14)),1,2) ='26'
>having cast(g1csf.pacid /10000000 as int) >= 26000
>HTH.

It doesn't like the having without a group by either. Oh well??

Thanks though.

__Stephen
Previous
Reply
Map
View

Click here to load this message in the networking platform