In our sales database we import data from an external source. They have done some changes and the sales period now looks like this:
- 0113_AU
- 0113_DK
- 0113_EU
- 0114_AU
- 0214_EU
etc....
The problem is that i only want to fetch one period, example all sales for: 0113. But when i run my stored procedure now, it fetches all data when i write 0113. Here is the beginning and end of my procedure.
@period nvarchar
and
sales.period_year_region = @period
How can i edit the last part so it fetches only for the periods that has 0113, and nothing else? Even when i write 0113_EU it receives to much data...
- 0113_AU
- 0113_DK
- 0113_EU
- 0114_AU
- 0214_EU
etc....
The problem is that i only want to fetch one period, example all sales for: 0113. But when i run my stored procedure now, it fetches all data when i write 0113. Here is the beginning and end of my procedure.
@period nvarchar
and
sales.period_year_region = @period
How can i edit the last part so it fetches only for the periods that has 0113, and nothing else? Even when i write 0113_EU it receives to much data...