Find Jobs
Hire Freelancers

WRITE A QUERY

$10-30 USD

Tamamlandı
İlan edilme: 10 yıldan fazla önce

$10-30 USD

Teslimde ödenir
How could I modify the query way down below to report inventory as an "In Stock" at the product level and not the variant level? For example the query below returns: productid,variantid,productname,variantname,categoryname,manufacturer,producttype,image,url,inventory,description,extensiondata,misctext,price p123,v123,widget,blue,categoryA,acme,shirt,[login to view URL],[login to view URL],3,wave shirt,cotton,pre-shrunk,$10 p123,v124,widget,green,categoryA,acme,shirt,[login to view URL],[login to view URL],2,wave shirt,cotton,pre-shrunk,$10 p123,v125,widget,red,categoryA,acme,shirt,[login to view URL],[login to view URL],5,wave shirt,cotton,pre-shrunk,$10 p124,v123,widget,blue,categoryA,acme,shirt,[login to view URL],[login to view URL],3,wave shirt,cotton,pre-shrunk,$10 p124,v124,widget,green,categoryA,acme,shirt,[login to view URL],[login to view URL],2,wave shirt,cotton,pre-shrunk,$10 p124,v125,widget,red,categoryA,acme,shirt,[login to view URL],[login to view URL],5,wave shirt,cotton,pre-shrunk,$10 I'd rather get a result like below where only one line shows for product P123 and it says "In Stock" if any of the variants (color) have any inventory greater than 0 and null for anything out of stock: productid,variantid,productname,variantname,categoryname,manufacturer,producttype,image,url,inventory,description,extensiondata,misctext,price p123,v123,widget,categoryA,acme,shirt,[login to view URL],[login to view URL],IN STOCK,wave shirt,cotton,pre-shrunk,$10 p124,v125,widget,categoryA,acme,shirt,[login to view URL],[login to view URL],[NULL],wave shirt,cotton,pre-shrunk,$10 Here is the current query I use. WITH Categories (ParentCategoryID, CategoryID, Name, ComputedLevel, Sort) AS ( SELECT [login to view URL], [login to view URL], [login to view URL], 0 AS ComputedLevel, CAST('\'+[login to view URL] AS NVARCHAR(255)) FROM Category AS c WHERE ParentCategoryID = 0 AND Deleted=0 AND Published=1 UNION ALL SELECT [login to view URL], [login to view URL], [login to view URL], ComputedLevel + 1, CAST([login to view URL] + '\'+[login to view URL] AS NVARCHAR(255)) FROM Category AS c INNER JOIN Categories AS s ON [login to view URL] = [login to view URL] WHERE Deleted=0 AND Published=1 ) SELECT [login to view URL], [login to view URL], [login to view URL] AS ProductName, [login to view URL] AS VariantName, [login to view URL] AS CategoryName, [login to view URL] AS Manufacturer, '/images/product/icon/' + Convert(varchar(max), [login to view URL]) +'.jpg' as IMAGE, '/p-' + cast([login to view URL] as nvarchar) + '-' + [login to view URL] + '.aspx' as URL, [login to view URL], [login to view URL], [login to view URL], [login to view URL], [login to view URL] FROM ProductVariant AS pv WITH (NOLOCK) JOIN Product AS p WITH (NOLOCK) ON [login to view URL] = [login to view URL] JOIN ProductCategory AS pc WITH (NOLOCK) ON [login to view URL] = [login to view URL] JOIN ProductManufacturer AS pm WITH (NOLOCK) ON [login to view URL] = [login to view URL] JOIN Manufacturer AS m WITH (NOLOCK) ON [login to view URL] = [login to view URL] JOIN Categories AS c WITH (NOLOCK) ON [login to view URL] = [login to view URL] WHERE pv.Deleted=0 AND pv.Published=1 AND p.Deleted=0 and pv.Published=1
Proje No: 4915545

Proje hakkında

14 teklif
Uzaktan proje
Son aktiviteden bu yana geçen zaman 11 yıl önce

Biraz para mı kazanmak istiyorsunuz?

Freelancer'da teklif vermenin faydaları

Bütçenizi ve zaman çerçevenizi belirleyin
Çalışmanız için ödeme alın
Teklifinizin ana hatlarını belirleyin
Kaydolmak ve işlere teklif vermek ücretsizdir
Seçilen:
Kullanıcı Avatarı
I am working with oracle and have vast experience in writing sql queries. I have written more than 500 queries for my product. i can do this for you
$25 USD 1 gün içinde
0,0 (0 değerlendirme)
0,0
0,0
14 freelancer bu proje için ortalama $22 USD teklif veriyor
Kullanıcı Avatarı
Greetings! I can code in any language and provide 3 months support. Error free code and browser compatibility.
$33 USD 3 gün içinde
5,0 (14 değerlendirme)
3,8
3,8
Kullanıcı Avatarı
I can help you on that. I am ready to start it now
$30 USD 3 gün içinde
5,0 (3 değerlendirme)
3,3
3,3
Kullanıcı Avatarı
Hi, please check PMB for more information. Thanks :)
$25 USD 1 gün içinde
4,9 (11 değerlendirme)
2,6
2,6
Kullanıcı Avatarı
Hi, Let me do this for you.
$25 USD 3 gün içinde
5,0 (2 değerlendirme)
1,2
1,2
Kullanıcı Avatarı
Hy, I`m ready to start this job now.
$25 USD 3 gün içinde
0,0 (0 değerlendirme)
0,0
0,0
Kullanıcı Avatarı
Expert SQL developer, got the answer you need.
$15 USD 0 gün içinde
0,0 (0 değerlendirme)
0,0
0,0
Kullanıcı Avatarı
Hello btappan, I have read your requirements and I am very confident to do this project. I guarantee COMPLETE satisfaction before payment. Please check PM for more details!
$23 USD 1 gün içinde
0,0 (0 değerlendirme)
0,0
0,0
Kullanıcı Avatarı
I'm a passionate SQL programmer - I love writing quick queries and am eager to help you with this!
$25 USD 1 gün içinde
0,0 (0 değerlendirme)
0,0
0,0
Kullanıcı Avatarı
I can do it easily
$23 USD 1 gün içinde
0,0 (0 değerlendirme)
0,0
0,0
Kullanıcı Avatarı
This easy SQL, I help you with 20$ budget
$20 USD 1 gün içinde
0,0 (0 değerlendirme)
0,0
0,0
Kullanıcı Avatarı
I have 10 years of experience in this field.
$10 USD 0 gün içinde
0,0 (0 değerlendirme)
0,0
0,0
Kullanıcı Avatarı
Ready to start.
$10 USD 1 gün içinde
0,0 (0 değerlendirme)
0,0
0,0
Kullanıcı Avatarı
Hi there! I can help you with the code.
$15 USD 3 gün içinde
0,0 (0 değerlendirme)
0,0
0,0

Müşteri hakkında

   UNITED STATES bayrağı
Jackson, United States
5,0
9
Ödeme yöntemi onaylandı
Tem 21, 2012 tarihinden bu yana üye

Müşteri Doğrulaması

Teşekkürler! Ücretsiz kredinizi talep etmeniz için size bir bağlantı gönderdik.
E-postanız gönderilirken bir şeyler yanlış gitti. Lütfen tekrar deneyin.
Kayıtlı Kullanıcı İlan Edlien Toplam İş
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Ön izleme yükleniyor
Coğrafik konum için izin verildi.
Giriş oturumunuzun süresi doldu ve çıkış yaptınız. Lütfen tekrar giriş yapın.