[Ur] SQL: renaming tables

Artyom Shalkhakov artyom.shalkhakov at gmail.com
Tue Mar 1 23:25:43 EST 2016


2016-03-01 23:36 GMT+06:00 Adam Chlipala <adamc at csail.mit.edu>:

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


Thank you very much!


>
>
> 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
>>>
>>
>
> _______________________________________________
> Ur mailing list
> Ur at impredicative.com
> http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
>



-- 
Cheers,
Artyom Shalkhakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20160302/ba30b8c0/attachment.html>


More information about the Ur mailing list