VINAY-NARAN
New member
- Local time
- Today, 04:35
- Joined
- Oct 10, 2008
- Messages
- 7
Please find attachment.
I would like Query depending on below criteria
where I can Enter Branch code
or Just Press Enter for all branches
below sql works fine for secons option
but when I try with brach code 1 its give all braches start with 1
What im' missing on below sql
SELECT [201].[3digit], [201].ordtyp, [201].branch, [201].bname, Sum([201].[Net Sales]) AS [SumOfNet Sales], Sum([201].Cost) AS SumOfCost, Sum([201].Qty1) AS SumOfQty1, [201].Month, [201].Year
FROM 201
GROUP BY [201].[3digit], [201].ordtyp, [201].branch, [201].bname, [201].Month, [201].Year
HAVING ((([201].branch) Like [Branch Code OR Press Enter To Continue] & "*"));
Regards
Vinay
I would like Query depending on below criteria
where I can Enter Branch code
or Just Press Enter for all branches
below sql works fine for secons option
but when I try with brach code 1 its give all braches start with 1
What im' missing on below sql
SELECT [201].[3digit], [201].ordtyp, [201].branch, [201].bname, Sum([201].[Net Sales]) AS [SumOfNet Sales], Sum([201].Cost) AS SumOfCost, Sum([201].Qty1) AS SumOfQty1, [201].Month, [201].Year
FROM 201
GROUP BY [201].[3digit], [201].ordtyp, [201].branch, [201].bname, [201].Month, [201].Year
HAVING ((([201].branch) Like [Branch Code OR Press Enter To Continue] & "*"));
Regards
Vinay