Click here to Skip to main content
15,881,938 members

Comments by Sprint89 (Top 19 by date)

Sprint89 3-Nov-14 11:50am View    
What do you mean by 'extract'? are you trying to get at the contents of a text file? Or shell out to a batch file perhaps?
Sprint89 18-Jul-14 4:19am View    
You could do it in dynamic SQL, get the number of records, build a string in a loop that would have that number of records, add a where clause and exec the string. Pretty ugly though

http://www.mssqltips.com/sqlservertip/1160/execute-dynamic-sql-commands-in-sql-server/
Sprint89 17-Jul-14 3:20am View    
What do you want the generated code to do?
Sprint89 3-Jul-14 3:29am View    
"First find days then calculate the months."

There are not a standard number of days in a month, it could be 28, 29, 30 or 31. That is why you need to consider month boundaries
Sprint89 1-Jul-14 3:30am View    
You will need a separate update query for each table, are you trying to use one update for more than one table?