SQL Server Paging query using a column alias -
I'm trying to create a question that I can then use for a page system here In the form of a query, it stands as the Phone Number, Ro_Number () as the SELECT SLCustomerAccountID, Customer Account Number, Customer Rights Name, (Main Telephone Area Code + main telephone subscriber number) ( Customer order by ACCnet) as the Randex from the SLC customer The account is where the customer 'account' name and the line index between 10 and 30 orders by CustomerAccountName
with this query errors
invalid column name 'RowIndex'
Because I'm trying to use the other name, but I can use this to set this so that I have data in the Here's the query where there is a return without clauses RowIndex
ID1 ID2 name number line number __________________________________________ | 12374927 | 00010014 | Some names ****** | 1 | | 51744 | 6631 | Same name ****** | 2 | Text after the
You do not use another name in where
(Only in ORDER BY
) But if you can access from a CTE:
as a CTE (selected from the selected SLCustomerAccountID, CustomerAccountNumber, CustomerAccountName, ( MainTelephoneAreaCode + MainTelephoneSubscriberNumber) from PhoneNumber, ROW_NUMBER (), as in RowIndex, as in SLCustomerAccount, where CustomerAccountName is selected as '% green%') Select SLCustomerAccountID, CustomerAccountNumber, CustomerAccountName, (MainTelephoneAreaCode + MainTelephoneSubscriberNumber) CustomerAccountName
Comments
Post a Comment