Viewing 15 posts - 4,411 through 4,425 (of 7,168 total)
One neat little easter-egg about CTEs that I'll throw out there is that they can be executed multiples times if they are referenced multiple times by your query. It is...
April 20, 2012 at 9:43 am
cARBONc (4/20/2012)
I actually loop, about every few seconds, requesting the agent job status. Once the status says it's complete, you are good to continue.
I wrote a proc several years...
April 20, 2012 at 9:38 am
Unfortunately I do not think you can unless you execute the command from something like PowerShell or C# where there is an Exception Collection available. In T-SQL you will only...
April 20, 2012 at 9:35 am
Henrico Bekker (4/20/2012)
3. Are you running 32bit with more than 4GB Physical Memory?
If yes, then AWE can with additional setting to the OS make use of more memory.
If NO, AWE...
April 20, 2012 at 9:33 am
You could go down the road of using a scheduled job to act as your "PowerShell runner", just know that sp_start_job is going to start the job and return control...
April 20, 2012 at 9:25 am
spin (4/20/2012)
if A
@var = select .......
if B
@var = select .......
if C
@var = select .......
i've instead created 3 stored procs so
if A
exec proc1 val1, val2, val3
if...
April 20, 2012 at 7:23 am
AIRWALKER-375999 (4/20/2012)
April 20, 2012 at 7:11 am
How did you migrate the database? If you did a backup/restore or detach/attach did you update usage stats and rebuild all your indexes after the migration?
April 19, 2012 at 4:17 pm
On SQL 2005, no, not unless you have trace flag 1222 or 1204 enabled or had a server-side trace running.
If you're worried about deadlocks enable 1222 (only) globally and future...
April 19, 2012 at 4:02 pm
qgudex (4/19/2012)
I originally tried adding the account to just dbcreator, but it seems that this does not actually make the account "owner" in this case. ...
April 19, 2012 at 3:55 pm
For the record BULK INSERT and bcp will not import Excel files (xls or xlsx files in binary format). Those tools are meant for importing plain-text files.
April 19, 2012 at 3:48 pm
Happy to assist, you're in the right place to pickup a few good nudges here and there 😉
April 19, 2012 at 3:22 pm
spin (4/19/2012)
sorry i just abbreviated the joins for simplicity.
the problem with the way your suggesting is that the select statement has many more columns and some other joined table...
April 19, 2012 at 3:17 pm
toddasd (4/19/2012)
select a.year, a.month, a.product, b.sales, b.units
from all_dates_and_products a
left join my_sales b on
a.year = b.year
and
a.month = b.month
and
a.product =...
April 19, 2012 at 3:15 pm
Viewing 15 posts - 4,411 through 4,425 (of 7,168 total)