Viewing 15 posts - 8,476 through 8,490 (of 13,460 total)
MonsterRocks (10/27/2010)
declare @to_date datetimeset @to_date= ' '
print @to_date
it will return 1st jan 1900....why?... any help?.. we cant assign this '' value to a datetime variable?
sql will...
October 27, 2010 at 6:24 am
snehagupte (10/27/2010)
thanks for quick help.i did as u said, but its not even showing the sql server folder where i can drag down the enterprise manager option.
plz help.
simply right click...
October 27, 2010 at 5:58 am
the easiest way is to ask the other admins "hey did you create that job?"
I just created a job on purpose, and it does not appear in the default trace.
i...
October 27, 2010 at 5:52 am
click start, and when programs button is visible, right click on it;
"Open" is the first choice, click that.
a folder opens, drill down inside the Programs folder to where you want...
October 27, 2010 at 5:37 am
it's a behavior thing.
a local variable, when you assign something too big, gets truncated.
however an error will occur if you try to insert/update to a table, which has a more...
October 26, 2010 at 1:46 pm
here's the code to get the first sunday of this month;
the last sunday of the previous month is the same date minus 7 days.
you could change the code to get...
October 26, 2010 at 10:42 am
i have these saved in my snippets, and the list is really incomplete:
--Oracle sp_help equivilent:
DESCRIBE tablename;
DESC tablename;
--Oracle sp_who equivilent
select osuser, machine, program, status from v$session;
--Oracle kill connection equivilent
select 'ALTER SYSTEM...
October 26, 2010 at 10:25 am
I'd start with select * from sys.server_principals
that will give you all the database users, roles, credentials and more;
you could filter it after that on the type_desc column for WHERE...
October 26, 2010 at 10:14 am
you want to use a query to generate the commands for you, based ont he metadata.
i just tested this: create user/login [Noobie];
ran the results of the script below.
logged in as...
October 26, 2010 at 10:06 am
Rob-350472 (10/26/2010)
October 26, 2010 at 9:37 am
WayneS (10/26/2010)
Lowell, I'd recommend one change to your code - use the QuoteName() function for the schema/table names. For dynamically generated code like this, better to make it bullet-proof.
awesome idea,...
October 26, 2010 at 9:23 am
what a pain; too bad you can't go smack the developers for not adding relationships in the first place....that's so wrong. In some countries, that an offence punishable by cane-ing.
I...
October 26, 2010 at 9:20 am
you can also use the metadata to generate the statements you need to run...potentially 300 commands you said.
you did not provide any specific details, so here's a scenario to use...
October 26, 2010 at 7:11 am
my suggestions are still the same; show us your execution plan, and tell us how many records you are returning.
for example, if you are returning less than 10 rows, 42...
October 26, 2010 at 7:04 am
hosseini.mehran (10/26/2010)
Thanks my friends , all your guidance help me, I could decrease the time of sp from 184 seconds to 42 seconds by using covering index.thanks a lot....
how...
October 26, 2010 at 5:38 am
Viewing 15 posts - 8,476 through 8,490 (of 13,460 total)