SQL Equivalent

Jorge Arias omnis2 at valhallasystems.net
Thu Aug 22 11:23:03 EDT 2013


Thanks Nick,

Best Regards

El 22/08/2013 06:34 a.m., Nick Harris escribió::
> Hi Jorge
> That data type is read only
> Omnis will just ignore any attempt to overwrite any variable with a data
> type set to seq
> Rgds
> Nick
>
> -----Original Message-----
> From: omnisdev-en-bounces at lists.omnis-dev.com
> [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of Jorge Arias
> Sent: 21 August 2013 22:44
> To: OmnisDev List - English
> Subject: Re: SQL Equivalent
>
> Helo Jerry,
>
> Yes. All the files in my applicatios have a sequence field and is named
> "Seq".
>
> Is it a reserved word/field?
>
>
> El 21/08/2013 12:36 p.m., Jerry Greenberg escribió::
>> Just curious because I didn't see any mention of this...
>>
>> Is your sequence field type in the native data file set to Seq or INT?
>> If it's set to SEQ you'll most likely have to change it.
>>
>> Jerry
>>
>> At 02:32 AM 8/21/2013, you wrote:
>>> Ben,
>>>
>>> Thanks for point me in the right direction
>>>
>>> Best Regards,
>>> Jorge A. Arias
>>>
>>> El 19/08/2013 11:03 p.m., Ben Butler escribió::
>>>> Hi,
>>>>
>>>> This is what you need:
>>>>
>>>> https://www.google.co.uk/search?q=sql+cross+table+update&ie=utf-8&oe
>>>> =utf-8&rls=org.mozilla:en-US:official&client=firefox-a&gws_rd=cr
>>>>
>>>>
>>>>
>>>> Cheers
>>>>
>>>> Ben
>>>>
>>>> On 20/08/2013 04:43, Jorge Arias wrote:
>>>>> Hi Bas,
>>>>>
>>>>> No luck...
>>>>>
>>>>> What I am trying to do is to fill the field "Lot.ItemSeq" with
>>>>> value of "Items.Seq" if "Items.id" is equal to "Lot.idItems"
>>>>>
>>>>> "Items" and "Lot" are two files in the same datafile.
>>>>>
>>>>> I can achieve that with the DML code I wrote, but I don't know how
>>>>> to do the same using SQL.
>>>>>
>>>>> Best Regards,
>>>>> Jorge
>>>>>
>>>>>
>>>>>
>>>>> El 19/08/2013 07:26 p.m., Bastiaan Olij escribió::
>>>>>> Hey Jorge,
>>>>>>
>>>>>> You need to name your other table as well:
>>>>>>
>>>>>> UPDATE Lot
>>>>>> SET Lot.ItemSeq = Items.Seq
>>>>>> FROM Items
>>>>>> WHERE Items.id = Lot.idItems
>>>>>>
>>>>>> Not sure what you're trying to do though...
>>>>>>
>>>>>> Cheers,
>>>>>>
>>>>>> Bas
>>>>>>
>>>>>> On 20/08/13 9:54 AM, Jorge Arias wrote:
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I am changing one of my applications from DML to SQL (Native data
>>>>>>> file),
>>>>>>>
>>>>>>> Which SQL statement would be the equivalent of
>>>>>>>
>>>>>>> Find first on Lot.Seq
>>>>>>> Repeat
>>>>>>> Single file find on Items.id (Exact match) {Lot.idItems} If flag
>>>>>>> true Prepare for edit Calculate Lot.ItemSeq as Items.Seq Update
>>>>>>> files End If Next on Lot.Seq Until flag false
>>>>>>>
>>>>>>> I tryed this:
>>>>>>>
>>>>>>> UPDATE Lot SET  Lot.ItemSeq=Items.Seq WHERE Items.id=Lot.idItems
>>>>>>>
>>>>>>> but of course... it didn't work.
>>>>>>>
>>>>>>> Thanks in advanced
>>>>>>>
>>>>>>> Best Regards,
>>>>>>> Jorge A. Arias
>>>>>>>
>>>>>>> _____________________________________________________________
>>>>>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>>>>>>
>>>>>>
>>>>
>>>> _____________________________________________________________
>>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>>>
>>>
>>> --
>>> Best Regards,
>>> Jorge A. Arias
>>> _____________________________________________________________
>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>>
>>
>
> --
> Best Regards,
> Jorge A. Arias
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2013.0.2904 / Virus Database: 3211/6587 - Release Date: 08/18/13
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
>
>

-- 
Best Regards,
Jorge A. Arias



More information about the omnisdev-en mailing list