[Ur] SQL: renaming tables

Adam Chlipala adamc at csail.mit.edu
Tue Mar 1 12:36:03 EST 2016


The only issue here is that Ur/Web forces local table names to be 
capitalized.

On 03/01/2016 11:34 AM, Artyom Shalkhakov wrote:
> Dear all,
>
> How to write a query that involves renaming of table vars?
>
> For instance, I'd like to write something along the lines of:
>
>> SELECT
>>      category.CategoryID,
>>      category.Title,
>>      category.Slug,
>>      category.ImageID,
>>      category.ParentCategoryID,
>>      0 AS ProductCount
>> FROM category
>> INNER JOIN product_of_category AS pc ON
>> category.CategoryID = pc.CategoryID
>> WHERE pc.ProductID = {[product_id]}
> And I get:
>
>> syntax error: deleting  SYMBOL AS




More information about the Ur mailing list