Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
hi
i have two table

1. production_main 2. trackwork_pd

In first table i have maintain barcode, brand, gender information and in second table i have maintain (barcode, productindt and productoutdt).

So i want a sql query where user give current date and i compare with productindt column and query count the record by datewise and display that is type format and show which brand and which gender total product in.

brand gender totalbarcode
addias male 29

but i not able to make that type of query where user only input date and display this type of record where query tell the user to which brand and which gender total product in.


thanks
Posted

1 solution

Here's a hint
SELECT [columns], COUNT(column)
FROM table
JOIN table1 ON table.column = table2.column
WHERE date = @date_provided
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900