SQL Basics

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsDatabasesSQL Basics

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old November 20th, 2012, 09:52 AM
Kenny_FSW Kenny_FSW is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 4 Kenny_FSW User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 39 m 45 sec
Reputation Power: 0
I think I need help witha a sub-query

Hello,

Just new to your forum and I hope you can help me out.

My main problem is that I'm not sure what it is that I am trying to do, but I know what I'd like to achieve, so searching has been pretty futile so far

I have a Sales orders table. whcih contains all the details you would typically find there.

The ones that I am interested in are, Sales order no, Stock Code, Description and Delivery Date.

The stock codes are typically alpha numeric (eg M1000), but there is a stock code called 'FREETYPE' that allows sales people to edit the Description on the sales order (this is typically where they put serial numbers).

What I need to do is make a query that will return the Order No, 'FREETYPE' code along with the description, but only if the Stock Code 'M1000' is on that sales order.

At the moment this is what I do.

I run a query to SELECT
Sales order no
Stock code
Description
Delivery date
WHERE Stock code = 'FREETYPE'

This then pulls off all the freetype lines on sales orders (which is massive)


I then run a query to SELECT
Sales order no
Stock code
Description
Delivery date
WHERE Stock code = 'M1000'

Within the 1st table that I extracted, I vlookup to the second query and delete the lines that return a #N/A value. This ofcourse is a really long wined way to do things and does not allow for the report to be easily refreshed.

I use Ms Query from within Excel 2007, any help would be greatly appreciated.



-Kenny

Reply With Quote
Reply

Viewing: Tutorialized ForumsDatabasesSQL Basics > I think I need help witha a sub-query


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap