JuniverSIS / Juniver

public
1 stars 1 forks source link

sqlcmd #2

Open Juniver opened 7 years ago

Juniver commented 7 years ago

sqlcmd -E -S DylanJang-PC\RICHBITCH -d rb_dev -i 20160901_FortuneSpins_onlyquery.sql

Dylan-Jang commented 6 years ago
@echo off

echo Chinese Zodiac...
sqlcmd -b -E -S localhost\Rhyme -d rhyme_gm_stage -i Proc_ChineseZodiac.sql
if %ERRORLEVEL% NEQ 0 goto fail

echo Cookie Freerolls...
sqlcmd -b -E -S localhost\Rhyme -d rhyme_gm_stage -i Proc_CookieFreerolls.sql
if %ERRORLEVEL% NEQ 0 goto fail

echo Daily...
sqlcmd -b -E -S localhost\Rhyme -d rhyme_gm_stage -i Proc_Tourney_rebrand_Daily.sql
if %ERRORLEVEL% NEQ 0 goto fail

echo Sunday...
sqlcmd -b -E -S localhost\Rhyme -d rhyme_gm_stage -i Proc_Tourney_rebrand_Sunday.sql
if %ERRORLEVEL% NEQ 0 goto fail

echo All days...
sqlcmd -b -E -S localhost\Rhyme -d rhyme_gm_stage -i Proc_Tourney_rebrand_AllDays.sql
if %ERRORLEVEL% NEQ 0 goto fail

goto end

:fail
echo.
echo -----------
echo ERROR...!
echo -----------

timeout /t -1

:end
echo.
echo All procedures updated.
Dylan-Jang commented 6 years ago
sqlcmd -b -E -S localhost\Rhyme -d rhyme_gm_stage -Q ^
"update  Tourneys ^
set     Status  = 4 ^
where   1=1 ^
and     PlayType = 2 ^
and     StartTime ^>= GETUTCDATE() ^
and     Status in (0, 1, 2)"

escape 문자 ^

Dylan-Jang commented 6 years ago
@echo off

sqlcmd -b -E -S localhost\Rhyme -d rhyme_gm_stage -Q "exec p_Agent_CreateTourney_CF 0"
sqlcmd -b -E -S localhost\Rhyme -d rhyme_gm_stage -Q "exec p_Agent_CreateTourney_CZ 0"
timeout 20

sqlcmd -b -E -S localhost\Rhyme -d rhyme_gm_stage -Q "exec p_Agent_CreateTourney_Daily 0"
timeout 20

sqlcmd -b -E -S localhost\Rhyme -d rhyme_gm_stage -Q "exec p_Agent_CreateTourney_Sunday 0"
timeout 20

sqlcmd -b -E -S localhost\Rhyme -d rhyme_gm_stage -Q "exec p_Agent_CreateTourney_AllDays 0"

:end
echo.
echo All procedures updated.
timeout 5