# SQL query ?????????????????????????

**URL:** <https://forums.speedlife.net/t/sql-query/73727>\
**Category:** NYSpeed Off Topic\
**Created:** [September 18, 2009, 12:20pm UTC](https://forums.speedlife.net/t/sql-query/73727 "2009-09-18T12:20:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blue\_Eyed\_Devil](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/blue_eyed_devil/32/7292_2.png) [@Blue\_Eyed\_Devil](https://forums.speedlife.net/u/Blue_Eyed_Devil)\
**Post date:** [September 18, 2009, 12:20pm UTC](https://forums.speedlife.net/t/sql-query/73727/1 "2009-09-18T12:20:56Z")

</div>

OK pretend I know nothing about computers, I know real stretch. lol

I need a list of parts ID’s that have no inventory transactions between 10-1-2008 and 9-30-2009.  
The support guy at the software company is COMPLETELY useless. He keeps supplying statements that are f’ed up and says we are not being clear as to what we want. HOW MUCH MORE CLEAR CAN WE BE?  
PART ID’S THAT HAVE NO/ZERO/ZILCH TRANSACTIONS BETWEEN 10-1-2008 AND 9-30-2009!!!

We have gone back and forth several times and for some reason he can’t understand what we need.

Is it not clear?  
We are basically looking for dead inventory part ID’s.  
Can anyone help?  
Thanks.

---

<div class="post-metadata">

**Author:** ![boardjnky4](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@boardjnky4](https://forums.speedlife.net/u/boardjnky4)\
**Post date:** [September 18, 2009, 12:22pm UTC](https://forums.speedlife.net/t/sql-query/73727/2 "2009-09-18T12:22:51Z")

</div>

Depends what data is stored, as to what can be pulled. Seems like you are being reasonable though.

---

<div class="post-metadata">

**Author:** ![Blue\_Eyed\_Devil](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/blue_eyed_devil/32/7292_2.png) [@Blue\_Eyed\_Devil](https://forums.speedlife.net/u/Blue_Eyed_Devil)\
**Post date:** [September 18, 2009, 12:26pm UTC](https://forums.speedlife.net/t/sql-query/73727/3 "2009-09-18T12:26:59Z")

</div>

Yeah this is pretty simple, I am not asking for vendor zip codes west of the Misssissippi but not west of the Rockies. LOL

---

<div class="post-metadata">

**Author:** ![boardjnky4](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@boardjnky4](https://forums.speedlife.net/u/boardjnky4)\
**Post date:** [September 18, 2009, 12:29pm UTC](https://forums.speedlife.net/t/sql-query/73727/4 "2009-09-18T12:29:33Z")

</div>

on second thought, this is probably harder than you think…but not impossible

as I said before, it all depends on how the data is stored

---

<div class="post-metadata">

**Author:** ![LZ1](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@LZ1](https://forums.speedlife.net/u/LZ1)\
**Post date:** [September 18, 2009, 12:35pm UTC](https://forums.speedlife.net/t/sql-query/73727/5 "2009-09-18T12:35:07Z")

</div>

MySQL, MSSQL, Oracle?

---

<div class="post-metadata">

**Author:** ![Blue\_Eyed\_Devil](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/blue_eyed_devil/32/7292_2.png) [@Blue\_Eyed\_Devil](https://forums.speedlife.net/u/Blue_Eyed_Devil)\
**Post date:** [September 18, 2009, 12:36pm UTC](https://forums.speedlife.net/t/sql-query/73727/6 "2009-09-18T12:36:27Z")

</div>

At this point I think I could have scanned through the over 11,000 part ID’s to see if they have moved or not but, then what is the point of a database? Right?

Would it be an easier to see part ID’s that HAVE had transactions in the time period?

---

<div class="post-metadata">

**Author:** ![Blue\_Eyed\_Devil](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/blue_eyed_devil/32/7292_2.png) [@Blue\_Eyed\_Devil](https://forums.speedlife.net/u/Blue_Eyed_Devil)\
**Post date:** [September 18, 2009, 12:40pm UTC](https://forums.speedlife.net/t/sql-query/73727/7 "2009-09-18T12:40:22Z")

</div>

> [@LZ](#):
>
> MySQL, MSSQL, Oracle?

SQLBase server Gupta Technologies. :gotme:

---

<div class="post-metadata">

**Author:** ![tpgsr](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/tpgsr/32/7374_2.png) [@tpgsr](https://forums.speedlife.net/u/tpgsr)\
**Post date:** [September 18, 2009, 12:42pm UTC](https://forums.speedlife.net/t/sql-query/73727/8 "2009-09-18T12:42:07Z")

</div>

If you can tell me what the database type is, and maybe the field names I can help you.

Edit… You beat me to it, now how about the field id’s

---

<div class="post-metadata">

**Author:** ![LZ1](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@LZ1](https://forums.speedlife.net/u/LZ1)\
**Post date:** [September 18, 2009, 12:42pm UTC](https://forums.speedlife.net/t/sql-query/73727/9 "2009-09-18T12:42:33Z")

</div>

SELECT \* FROM Parts WHERE PartID NOT IN (SELECT PartID FROM Transactions WHERE TranDate \> ‘startdate’ AND TranDate \< ‘enddate’)

Something like that? lol

---

<div class="post-metadata">

**Author:** ![Blue\_Eyed\_Devil](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/blue_eyed_devil/32/7292_2.png) [@Blue\_Eyed\_Devil](https://forums.speedlife.net/u/Blue_Eyed_Devil)\
**Post date:** [September 18, 2009, 12:45pm UTC](https://forums.speedlife.net/t/sql-query/73727/10 "2009-09-18T12:45:55Z")

</div>

The software is called Visual Manufacturing, the company is infor.

---

<div class="post-metadata">

**Author:** ![boardjnky4](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@boardjnky4](https://forums.speedlife.net/u/boardjnky4)\
**Post date:** [September 18, 2009, 12:46pm UTC](https://forums.speedlife.net/t/sql-query/73727/11 "2009-09-18T12:46:54Z")

</div>

lol

valiant effort LZ, but there is not chance in writing a query unless you see the structure of the db

---

<div class="post-metadata">

**Author:** ![LZ1](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@LZ1](https://forums.speedlife.net/u/LZ1)\
**Post date:** [September 18, 2009, 12:47pm UTC](https://forums.speedlife.net/t/sql-query/73727/12 "2009-09-18T12:47:29Z")

</div>

Infor ughhhh they make software called FDC that uses pervasive sql ughhhhh so much fail

---

<div class="post-metadata">

**Author:** ![LZ1](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@LZ1](https://forums.speedlife.net/u/LZ1)\
**Post date:** [September 18, 2009, 12:47pm UTC](https://forums.speedlife.net/t/sql-query/73727/13 "2009-09-18T12:47:54Z")

</div>

> [@boardjnky4](#):
>
> lol
> 
> valiant effort LZ, but there is not chance in writing a query unless you see the structure of the db

Obviously…I was making a generalization :lol:

---

<div class="post-metadata">

**Author:** ![Blue\_Eyed\_Devil](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/blue_eyed_devil/32/7292_2.png) [@Blue\_Eyed\_Devil](https://forums.speedlife.net/u/Blue_Eyed_Devil)\
**Post date:** [September 18, 2009, 1:15pm UTC](https://forums.speedlife.net/t/sql-query/73727/14 "2009-09-18T13:15:17Z")

</div>

He has asked if we want parts that have had transactions outside that date. I am pretty sure EVERY part outside that date has had at least one transaction unless it was created this year!!!:suicide:

It is pretty scary that this guy is messing with people’s databases.

---

<div class="post-metadata">

**Author:** ![Blue\_Eyed\_Devil](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/blue_eyed_devil/32/7292_2.png) [@Blue\_Eyed\_Devil](https://forums.speedlife.net/u/Blue_Eyed_Devil)\
**Post date:** [September 18, 2009, 1:20pm UTC](https://forums.speedlife.net/t/sql-query/73727/15 "2009-09-18T13:20:23Z")

</div>

Here is a statement he gave us…

SELECT DISTINCT P.ID,P.DESCRIPTION FROM PART P, INVENTORY\_TRANS I  
WHERE P.ID(+) = I.PART\_ID AND I.TRANSACTION\_DATE NOT BETWEEN ‘10-OCT-2008’ AND ‘30-SEP-2009’;

He has told us we are not being clear in our request.:banghead:  
Once again, tell me if this not clear…  
PART ID’S THAT HAVE NO/ZERO/ZILCH TRANSACTIONS BETWEEN 10-1-2008 AND 9-30-2009!!!

When his wife asks him what he wants to eat for dinner does he tell her she is not being clear?!?

---

<div class="post-metadata">

**Author:** ![boardjnky4](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@boardjnky4](https://forums.speedlife.net/u/boardjnky4)\
**Post date:** [September 18, 2009, 1:23pm UTC](https://forums.speedlife.net/t/sql-query/73727/16 "2009-09-18T13:23:42Z")

</div>

that query looks legit

is it still not working?

---

<div class="post-metadata">

**Author:** ![d3x](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@d3x](https://forums.speedlife.net/u/d3x)\
**Post date:** [September 18, 2009, 1:25pm UTC](https://forums.speedlife.net/t/sql-query/73727/17 "2009-09-18T13:25:04Z")

</div>

> [@Blue Eyed Devil](#):
>
> The software is called Visual Manufacturing, the company is infor.

We use Visual Manufacturing at the machine shop I work at. I can’t think of a way to retrieve the information your looking for. As far as I can tell the software really only keeps track of the parts you do have transactions for…not the other way around. :gotme:

---

<div class="post-metadata">

**Author:** ![Blue\_Eyed\_Devil](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/blue_eyed_devil/32/7292_2.png) [@Blue\_Eyed\_Devil](https://forums.speedlife.net/u/Blue_Eyed_Devil)\
**Post date:** [September 18, 2009, 1:25pm UTC](https://forums.speedlife.net/t/sql-query/73727/18 "2009-09-18T13:25:11Z")

</div>

^^No it is giving us every part that has had a transaction NOT BETWEEN those dates which is pretty much every part.

---

<div class="post-metadata">

**Author:** ![Blue\_Eyed\_Devil](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/blue_eyed_devil/32/7292_2.png) [@Blue\_Eyed\_Devil](https://forums.speedlife.net/u/Blue_Eyed_Devil)\
**Post date:** [September 18, 2009, 1:26pm UTC](https://forums.speedlife.net/t/sql-query/73727/19 "2009-09-18T13:26:17Z")

</div>

> [@d3x](#):
>
> We use Visual Manufacturing at the machine shop I work at. I can’t think of a way to retrieve the information your looking for. As far as I can tell the software really only keeps track of the parts you do have transactions for…not the other way around. :gotme:

Right, these parts have had transaction but not recently.

---

<div class="post-metadata">

**Author:** ![boardjnky4](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@boardjnky4](https://forums.speedlife.net/u/boardjnky4)\
**Post date:** [September 18, 2009, 1:27pm UTC](https://forums.speedlife.net/t/sql-query/73727/20 "2009-09-18T13:27:16Z")

</div>

Remove ‘NOT’

[Next page](https://forums.speedlife.net/t/sql-query/73727.md?page=2)
