Tema: Re: MS SQL
Autorius: Baltas auksas
Data: 2012-11-14 16:46:24
bandziau, selectai selecte nebaisus, bet man reikia kuo paprasciau nes po to 
ta pacia logika reiks and GEMBASE perdaryti :( o ten tiek daug laisves nera.


"Raimis" <somebody@nomail.com> wrote in message 
news:k806ra$ii0$1@trimpas.omnitel.net...
>O tu bandei "Dream-Colored Bunny"  selecta?
> Ten tik vien lentele ir yra. Ar labai tie "dzoinai" baisus?
>
>
> "Baltas auksas" <aa@aa.aa> wrote in message 
> news:k8036g$db8$1@trimpas.omnitel.net...
>> bet gi cia viena lentele, ka cia dzoininti ?
>> man is jos vienos reikia istruakti info
>>
>>
>> "Dream-Colored Bunny" <cream@lemon.nospam> wrote in message 
>> news:k802cg$c9h$1@trimpas.omnitel.net...
>>> Hmm...
>>> jei visur yra vnt ir kg, bei nera pasikartojimu, tai tiesiog:
>>>
>>> select *
>>> from lentele d1
>>> join lentele d2 on d1.pavadinimas=d2.pavadinimas and 
>>> d1.partija=d2.partija and d1.vienetas='VNT' and d2.vienetas='KG'
>>> where d1.VNT<>0 and d2.VNT<>0
>>>
>>>
>>> -- 
>>>
>>> =^_^=
>>>
>>>
>>> "Baltas auksas" <aa@aa.aa> wrote in message 
>>> news:k801rv$bj6$1@trimpas.omnitel.net...
>>>> Prikabinau EXCELyje lentele su info, nes negraziai cia isipastino :(
>>>>
>>>>
>>>> "Baltas auksas" <aa@aa.aa> wrote in message
>>>> news:k801p9$bgj$1@trimpas.omnitel.net...
>>>>> Yra duomenu lentele:
>>>>>      Eil.nr
>>>>>     Prekes pavadinimas
>>>>>     Prekes partija
>>>>>     Mato vienetai
>>>>>     Kiekis
>>>>>
>>>>>      1
>>>>>     Preke A
>>>>>     Partija A
>>>>>     KG
>>>>>     6
>>>>>
>>>>>      2
>>>>>     Preke A
>>>>>     Partija A
>>>>>     VNT
>>>>>     0
>>>>>
>>>>>      3
>>>>>     Preke A
>>>>>     Partija B
>>>>>     KG
>>>>>     70
>>>>>
>>>>>      4
>>>>>     Preke A
>>>>>     Partija B
>>>>>     VNT
>>>>>     216
>>>>>
>>>>>      5
>>>>>     Preke A
>>>>>     Partija C
>>>>>     KG
>>>>>     166
>>>>>
>>>>>      6
>>>>>     Preke A
>>>>>     Partija C
>>>>>     VNT
>>>>>     576
>>>>>
>>>>>      7
>>>>>     Preke A
>>>>>     Partija D
>>>>>     KG
>>>>>     104
>>>>>
>>>>>      8
>>>>>     Preke A
>>>>>     Partija D
>>>>>     VNT
>>>>>     324
>>>>>
>>>>>      9
>>>>>     Preke A
>>>>>     Partija E
>>>>>     KG
>>>>>     45
>>>>>
>>>>>      10
>>>>>     Preke A
>>>>>     Partija E
>>>>>     VNT
>>>>>     140
>>>>>
>>>>>
>>>>>
>>>>> Kai parasyti selecta, kad rodytu tik visus irasus, isskyrus 1 ir 2 
>>>>> eilutes
>>>>> ?
>>>>> Kitaip sakant yra tikslas issitraukti produktu sarasiuka, kuriu kiekis 
>>>>> VNT
>>>>> <> 0 ir LKG <> 0
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>
>>
>
>