Mysql,Şartlı ifadeler, query sonucunu kullanmak

Delphi'de kod yazma ile ilgili sorularınızı bu foruma yazabilirsiniz.
Cevapla
guney_tosun
Üye
Mesajlar: 82
Kayıt: 19 Ağu 2005 09:34
Konum: Istanbul

Mysql,Şartlı ifadeler, query sonucunu kullanmak

Mesaj gönderen guney_tosun »

Selamlar;arkadaşlar,query'iin sonucuna bir faura numarası ekleyeceğim ama sartlı bir ifade kullanmam gerekiyor fakat nasıl yapabilirim bilmiyorum..Bunu yaparken Customercode ve shipment alanlarınıda kontrol etmeliyim..
Mesela;
customercode alanındaki değer bir onceki kayıttaki customercode alanının değeri ile aynı ise ikisinede aynı fatura numarasını vermek istiyorum tabi bununda 15 satırlık bir sınırı var..15 satır sonra hala aynı customercode varsa fatura nosunu 1 arttırmalı.. gibi Yardımcı olursanız çok sevinirim.. Şimdiden ilgilenen herkeze teşekkürler..
Bu arada Mysql 5.0 kullanıyorum ve delphi7

"SELECT
nikebarcode.Code1,
nikebarcode.Code2,
nikebarcode.Shipment,
nikebarcode.Package,
shipmentinfo.week,
shipmentinfo.trailer,
shipmentinfo.Shipment,
shipmentinfo.Customer,
shipmentinfo.city,
shipmentinfo.no,
shipmentinfo.country,
shipmentinfo.Name,
shipmentinfo.Colli,
shipmentinfo.Weight,
shipmentinfo.Unit,
shipmentinfo.ProductName,
shipmentinfo.DeliveryDate,
shipmentinfo.time,
nikebarcode.MISSING,
shipmentinfo.Waybilldate,
shipmentinfo.WaybillCreated,
shipto.ID,
shipto.CustomerCode,
shipto.DeliveryName,
shipto.DeliveryAddress,
shipto.DeliveryAddress2,
shipto.DeliveryDistrict,
shipto.DeliveryCity,
shipto.DeliveryPostCode,
shipto.Deliverycode,
billto.ID,
billto.CustomerCode,
billto.CustomerName,
billto.Address,
billto.Address2,
billto.District,
billto.City,
billto.Postcode,
billto.TaxOffice,
billto.TaxNumber
FROM
billto,
shipto,
shipmentinfo,
nikebarcode
WHERE
(nikebarcode.code2 = 309) AND
(shipmentinfo.shipment = nikebarcode.shipment) AND
(shipmentinfo.customer = shipto.customercode) AND
(billto.customercode = shipto.customercode)"
Celebrating the past , Creating the Future
guney_tosun
Üye
Mesajlar: 82
Kayıt: 19 Ağu 2005 09:34
Konum: Istanbul

Mesaj gönderen guney_tosun »

Merhalar hala sorunuma bir çözüm bulamadım
Celebrating the past , Creating the Future
Cevapla