How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask ATLPROG Your Own Question

ATLPROG
ATLPROG, Computer Software Engineer
Category: Programming
Satisfied Customers: 7677
Experience:  MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
44910485
Type Your Programming Question Here...
ATLPROG is online now
A new question is answered every 9 seconds

I'm trying to understand what exactly the following

Customer Question

Hello, I'm trying to understand what exactly the following clustered index and ensuing code does:
CREATE UNIQUE CLUSTERED INDEX unclix_id ON orders.dbo.stage(ID)
DECLARE @s bigint, @b smallint, @e bigint, @i bigint, @sql nvarchar(max), @s_varchar varchar(8), @i_varchar varchar(8)
SELECT @s = 1, @b = 10000, @e =(###) ###-####
SELECT @i = @b
WHILE @s = 100
)
SELECT os.ID,
os.ColA,
os.ColB,
os.ColC,
os.ColD
FROM OLTPSYS.Inventory.OrderSystem AS os
INNER JOIN new AS n ON n.ColX = os.ColF
WHERE os.ID BETWEEN ' + @s_varchar + ' AND ' + @i_varchar + '
AND ColE = 3000
''
)
'
EXECUTE sys.sp_executesql @sql
SELECT @s = @i + 1
SELECT @i = @i + @b
END
Submitted: 7 months ago.
Category: Programming
Expert:  tejas_speed replied 7 months ago.
Hi Sir, I would like to help you out on this after some time. I hope you are fine with it. Please let me know if it is too urgent so that i can make this question open for someone else. Thank you.
Customer: replied 7 months ago.
Hi, it's ok, I already received an answer. THanks!