Click here to Skip to main content
15,886,362 members
Home / Discussions / Database
   

Database

 
Rant[REPOST] Database backed up type virtual device- not mainteance job Pin
Richard Deeming27-Jun-16 3:56
mveRichard Deeming27-Jun-16 3:56 
Questioncall sql scripts from others folders Pin
MrKBA19-Jun-16 23:43
MrKBA19-Jun-16 23:43 
QuestionRe: call sql scripts from others folders Pin
CHill6020-Jun-16 1:41
mveCHill6020-Jun-16 1:41 
AnswerRe: call sql scripts from others folders Pin
MrKBA20-Jun-16 2:30
MrKBA20-Jun-16 2:30 
AnswerRe: call sql scripts from others folders Pin
Eddy Vluggen20-Jun-16 1:46
professionalEddy Vluggen20-Jun-16 1:46 
GeneralRe: call sql scripts from others folders Pin
MrKBA20-Jun-16 2:29
MrKBA20-Jun-16 2:29 
GeneralRe: call sql scripts from others folders Pin
Eddy Vluggen20-Jun-16 2:40
professionalEddy Vluggen20-Jun-16 2:40 
AnswerRe: call sql scripts from others folders Pin
CHill6020-Jun-16 3:41
mveCHill6020-Jun-16 3:41 
You can use the sqlcmd utility from a windows batch file e.g.
@ECHO OFF
FOR /F  %%i IN ('sqlcmd -S YourDBInstance -Q"set nocount on;select  CONVERT(DECIMAL(10,2),FVersion) from TVersion"') DO SET VNO=%%i

call .\v%VNO%\script.bat
@echo done.

Things to note
- you'll have to insert your own information for the -S parameter
- Do not put spaces around the = sign in SET VNO=%%i
- The conversion in the query is necessary to ensure the .00 is returned correctly
- you will need to substitute your script name for script.bat
QuestionPrioritized joining - Updated Pin
Jörgen Andersson16-Jun-16 9:39
professionalJörgen Andersson16-Jun-16 9:39 
AnswerRe: Prioritized joining Pin
Mycroft Holmes16-Jun-16 13:05
professionalMycroft Holmes16-Jun-16 13:05 
GeneralRe: Prioritized joining Pin
Jörgen Andersson16-Jun-16 21:58
professionalJörgen Andersson16-Jun-16 21:58 
GeneralRe: Prioritized joining Pin
Mycroft Holmes17-Jun-16 2:52
professionalMycroft Holmes17-Jun-16 2:52 
GeneralRe: Prioritized joining Pin
Jörgen Andersson17-Jun-16 3:59
professionalJörgen Andersson17-Jun-16 3:59 
GeneralRe: Prioritized joining Pin
Jörgen Andersson29-Jun-16 10:28
professionalJörgen Andersson29-Jun-16 10:28 
AnswerRe: Prioritized joining - Updated Pin
Richard Deeming17-Jun-16 1:57
mveRichard Deeming17-Jun-16 1:57 
GeneralRe: Prioritized joining - Updated Pin
Jörgen Andersson17-Jun-16 3:30
professionalJörgen Andersson17-Jun-16 3:30 
GeneralRe: Prioritized joining - Updated Pin
Richard Deeming17-Jun-16 12:29
mveRichard Deeming17-Jun-16 12:29 
GeneralRe: Prioritized joining - Updated Pin
Jörgen Andersson18-Jun-16 4:18
professionalJörgen Andersson18-Jun-16 4:18 
GeneralRe: Prioritized joining - Updated Pin
Jörgen Andersson29-Jun-16 10:44
professionalJörgen Andersson29-Jun-16 10:44 
QuestionPivot Not Working Pin
MadDashCoder11-Jun-16 8:01
MadDashCoder11-Jun-16 8:01 
AnswerRe: Pivot Not Working Pin
Mycroft Holmes11-Jun-16 14:51
professionalMycroft Holmes11-Jun-16 14:51 
AnswerRe: Pivot Not Working Pin
CHill6012-Jun-16 0:33
mveCHill6012-Jun-16 0:33 
GeneralRe: Pivot Not Working Pin
MadDashCoder12-Jun-16 3:56
MadDashCoder12-Jun-16 3:56 
GeneralRe: Pivot Not Working Pin
CHill6012-Jun-16 4:43
mveCHill6012-Jun-16 4:43 
GeneralRe: Pivot Not Working Pin
MadDashCoder12-Jun-16 8:36
MadDashCoder12-Jun-16 8:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.