Wednesday, May 22, 2013

[SQL Server] Random Number Generator

[SQL Server] Random Number Generator


Random Number Generator

Posted: 30 Apr 2013 12:11 AM PDT

I am trying to create a random number generator that would populate a number between 8-48 to 9 different lanes with the only criteria being that each lane number cannot be within 5 of any lane within 3 spaces of it. So what I mean is if lane 4 has a number of 30 then lane 1-2-3 and lane 5-6-7 cannot be within 5 of lane 4's number. Hope this makes sense and any help would be sincerely appreciated....

Alter Column Name based on another field value

Posted: 22 May 2013 06:25 AM PDT

I'm not sure if I can do this.... I'm trying to change the column heading based on the value of another field.Something like this:SELECT Other AS 'Other (describe):' + [OtherText]FROM [TESTTABLE]The value of [u]Other [/u]is "[b]X[/b]"The value of [u]OtherText[/u] is "[b]Football[/b]"So the column heading would look like: "[b]Other (describe): Football[/b]"The value would be "[b]X[/b]"... I know there are much better ways of doing this, just we don't have the option of changing the table format.The Select statement would only ever return one single record.

windows updates / security patches in a clustered environment?

Posted: 21 May 2013 08:08 PM PDT

Hi allI´me new to the DBA role and this weekend we are having our first "maintenance weekend" in a while, where we apply windows security patches and such.we have 3 clusters running active/active configurations.normally, i move the sql server instances from server A and then apply the patches, reboot the server and repeat the process for server B, C and D.i was thinking... what if i apply the patches on all servers at the same time and then juggle the instances only to perform the rebooting procedure, would that "hurt" SQL server?who do you guys do this? and how often ? is there a way to script this to do it automatically? any and all thoughts on the topic is much appreciated!

No comments:

Post a Comment

Search This Blog