set @section_1 = ltrim(rtrim(left(@full_name,charindex(',',@full_name)-1))); set @section_2 = ltrim(substring(@full_name, set @first_name = left(ltrim(rtrim(@section ...
SELECT '838115' AS 'Supplier Acct Number', CAST(OH.oe_po_no AS int) AS 'Wal-Mart PO Number', 'Wal-Mart Store Number' = CASE WHEN len(OH.cus_alt_adr_cd) > 6 THEN CAST('9999' AS int) ELSE OH.cus_alt_adr ...
So I've got this temp table in a stored procedure.<BR><BR>Here's some code:<BR><BR><pre class="ip-ubbcode-code-pre"><BR>Set @i = 1<BR>While @i <= 10<BR>Begin<BR>If ...