Hi,
I have orders with unique numbers. These orders have orderlines. How can I do an update query to update all order lines in a table to autonumber all lines from 1 to n?
Background info: I have orderlines. Some have to be summed and combined to one order line. I get these plus others in a...
Hi,
I have a parameter called @Type. This parameter can have different values, like 'STOP', 'START', etc.
Based on this value I have to built different where clauses
LIKE when 'STOP' I have to set: "WHERE STATUS = 0", while when it's 'START' I have to set: "WHERE CHECKED_OUT = 0"
What is the...
Hi,
I have the following question: My SP has a paramter @GROUP_MODEL, and based on this value, a different query will be built, for example:
IF @GROUP_MODEL = '1'
begin
set @sql = 'SELECT MO.MODEL_TYPE AS SORTGROUP_3, ' +
'Max(M.SORTGROUP_2) SORTGROUP_2, '
/*'''0'' AS...
Hi,
I have a parameter called @version which can be 1, 2, 3, 4, 5
I have 5 columns in my table, price_1, price_2, etc.
I have a stored procedure to get a price which has a parameter called @version
So depending on the value, I have to get price_1, _2, etc.
Right now I build an SQL string and...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.