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)"
Mysql,Şartlı ifadeler, query sonucunu kullanmak
Forum kuralları
Forum kurallarını okuyup, uyunuz!
Forum kurallarını okuyup, uyunuz!
-
- Üye
- Mesajlar: 82
- Kayıt: 19 Ağu 2005 09:34
- Konum: Istanbul
Mysql,Şartlı ifadeler, query sonucunu kullanmak
Celebrating the past , Creating the Future
-
- Üye
- Mesajlar: 82
- Kayıt: 19 Ağu 2005 09:34
- Konum: Istanbul