[SQL] Query to create HwanLevels in 3 seconds

04/25/2013 23:13 royalblade#1
so i made this quickly cuz i had to make some zerk levels.
its done pretty badly actually xD
however it works (it has a shitload of unnessesary code but who gives a shit)

PHP Code:
Declare @1 varchar(max)
declare @
2 varchar(max)
declare @
3 varchar(max
declare @
4 varchar(max)
declare @
5 int
declare @6 int

DECLARE @intFlag INT
SET 
@intFlag 1
WHILE (@intFlag <=255)
BEGIN
PRINT @intFlag
SET 
@intFlag = @intFlag 1


set 
@=((Select MAX(HwanLevelfrom _RefHWANLevel))
set @= @5+1
set 
@= ((Select MAX(HwanLevelfrom _RefHWANLevel))
set @= @+1
print @4

Set 
@'UIO_SECOND_HWAN_CH_NAME_LEVEL_' + @4
Print @1
set 
@'UIO_SECOND_HWAN_EU_NAME_LEVEL_' + @4
Insert into _RefHWANLevel 
(
[
HwanLevel]
      ,[
ParamFourcc1]
      ,[
ParamValue1]
      ,[
ParamFourcc2]
      ,[
ParamValue2]
      ,[
ParamFourcc3]
      ,[
ParamValue3]
      ,[
ParamFourcc4]
      ,[
ParamValue4]
      ,[
ParamFourcc5]
      ,[
ParamValue5]
      ,[
AssocFileObj128]
      ,[
Title_CH70]
      ,[
Title_EU70])
values (
@
4,    1397769301,    200,1145127506,0,0,0,0,0,0,0,'xxx',@1,
@
2
)


END
GO 
04/25/2013 23:44 PortalDark#2
#approved
04/27/2013 01:44 ™_Ahmed_™#3
Good Query ..
Thx for Release it <3
04/29/2013 15:53 Schickl#4
Your variables have really nice names
Gonna do it like that too from now on!
It'll surely help understanding the meaning of the code