Tiger Board Logo

Donor's Den General Leaderboards TNET coins™ POTD Hall of Fame Map FAQ
GIVE AN AWARD
Use your TNET coins™ to grant this post a special award!

W
50
Big Brain
90
Love it!
100
Cheers
100
Helpful
100
Made Me Smile
100
Great Idea!
150
Mind Blown
150
Caring
200
Flammable
200
Hear ye, hear ye
200
Bravo
250
Nom Nom Nom
250
Take My Coins
500
Ooo, Shiny!
700
Treasured Post!
1000

YOUR BALANCE
Any yoo ####### know SQL?
storage This topic has been archived - replies are not allowed.
Archives - General Boards Archive
add New Topic
Replies: 17
| visibility 1

Any yoo ####### know SQL?

6

May 24, 2023, 1:39 PM

Maybe looking to do a join statement but I program exclusively in Excel.


FYT



flag link military_tech thumb_downthumb_up


Save Qatthews Land?***

6

May 24, 2023, 1:40 PM



2024 white level memberbadge-donor-05yr.jpg flag link military_tech thumb_downthumb_up

I like your funny words magic man


better than most

2

May 24, 2023, 1:40 PM



flag link military_tech thumb_downthumb_up

send me the two tables

1

May 24, 2023, 1:41 PM

the two primary keys

the fields you want

and the type of join you want

flag link military_tech thumb_downthumb_up

Re: send me the two tables


May 24, 2023, 1:43 PM

2 tables:
-item master (primary key is SKU)
-product code (Primary key is product code)


Product code is a field on the item master, but I want details from the product codes table for a field called saleable items

flag link military_tech thumb_downthumb_up


Somebody is trying to make store manager at the k-mart***

1

May 24, 2023, 1:48 PM



2024 white level memberbadge-donor-05yr.jpg flag link military_tech thumb_downthumb_up

I like your funny words magic man


Somebody is worried about their new manager at the k-mart***

1

May 24, 2023, 1:59 PM



ringofhonor-rhtig.jpg flag link military_tech thumb_downthumb_up


Re: send me the two tables

1

May 24, 2023, 2:02 PM [ in reply to Re: send me the two tables ]

Not positive in reading this right, but something like this...


select
a.item master
, b.product code
, b.saleable items
from item master as a
inner join product code as b
ON a.SKU = b.SKU

badge-donor-05yr.jpg flag link military_tech thumb_downthumb_up


that should work


May 24, 2023, 2:29 PM

depending on the iventory system you're using. Which one Tickle_It?

typically you have an Item_id that's the primary key for the item tables.

flag link military_tech thumb_downthumb_up

try this....just re-reading

1

May 24, 2023, 2:32 PM

select im.SKU, pc.saleable_items from item_master im
inner join product code pc on im.product_code = pc.product_code;

flag link military_tech thumb_downthumb_up

Nothing to do with inventory. Butt I took the easy way out


May 24, 2023, 4:12 PM [ in reply to that should work ]

lutz I had lunch with a programmer and he's going to add that field to my current view that I'm pulling for my BI utility. At some point I'll learn more SQL.

flag link military_tech thumb_downthumb_up


duh, you ruhtard

2

May 24, 2023, 2:04 PM [ in reply to Re: send me the two tables ]

SELECT im.SKU, im.saleable_items, pc.saleable_items
FROM item_master im
JOIN product_codes pc ON im.product_code = pc.product_code;

In this example, we're using the JOIN clause to combine the "item master" table (item_master) with the "product codes" table (product_codes) based on the common field product_code. We select the SKU number (im.SKU), the saleable items field from the "item master" table (im.saleable_items), and the saleable items field from the "product codes" table (pc.saleable_items).

Make sure to replace item_master and product_codes with the actual table names in your database. Additionally, adjust the column names (SKU, product_code, saleable_items) to match your schema.

2024 white level member flag link military_tech thumb_downthumb_up

S??? ????? ???? ??? ??????? ?????? ???? ??? ??????,
S??? ????? ?? ?? ???????? ???? ? ??????? ??? ????? ?????..


U 4 Reel?


May 24, 2023, 1:41 PM [ in reply to better than most ]

I thought you worked in Sales?

flag link military_tech thumb_downthumb_up


just recently got into sales


May 24, 2023, 3:14 PM

6 years in software design / engineering

4 years in building buildings

all supply chain / warehousing related.

SQL is my #####

flag link military_tech thumb_downthumb_up

ChatGPT.***

1

May 24, 2023, 2:00 PM



2024 purple level member flag link military_tech thumb_downthumb_up

drunk at the putt putt.


Re: Any yoo ####### know SQL?

2

May 24, 2023, 2:05 PM

Here's what Bard says, I don't do much with SQL so have no idea how to judge it's output:


Sure, here is the SQL join statement you can use:

SQL
SELECT
item_master.SKU,
item_master.ProductCode,
product_codes.SaleableItems
FROM item_master
INNER JOIN product_codes ON item_master.ProductCode = product_codes.ProductCode;
Use code with caution. Learn more
This will return all rows from the item_master table, and the corresponding rows from the product_codes table where the ProductCode column is equal. The SaleableItems column from the product_codes table will be included in the result set.

Here is an example of the output of this query:

Code snippet
SKU | ProductCode | SaleableItems
------- | -------- | --------
123456 | ABC123 | Yes
789012 | DEF456 | No

2024 white level memberbadge-donor-15yr.jpg flag link military_tech thumb_downthumb_up

Kinda reminds me of "Fast Times at Ridgemont High"

1

May 24, 2023, 3:00 PM



2024 white level memberbadge-donor-15yr.jpg flag link military_tech thumb_downthumb_up

https://as1.ftcdn.net/v2/jpg/00/81/16/28/1000_F_81162810_8TlZDomtVuVGlyqWL2I4HA7Wlqw7cr5a.jpg


Tigermemories used a MySQL database


May 24, 2023, 8:11 PM

But no, it's greek to me. I can use it, but the coding is greek to me.

2024 orange level memberbadge-donor-15yr.jpgringofhonor-tiggity-110.jpg flag link military_tech thumb_downthumb_up


Replies: 17
| visibility 1
Archives - General Boards Archive
add New Topic