Forum Replies Created

Viewing 15 posts - 8,476 through 8,490 (of 13,460 total)

  • RE: date issue

    MonsterRocks (10/27/2010)


    declare @to_date datetime

    set @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...

  • RE: Enterprise manager not shown in start menu

    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...

  • RE: SQl Agent Job

    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...

  • RE: Enterprise manager not shown in start menu

    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...

  • RE: HELP!!! sql variable truncation

    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...

  • RE: get the first Sunday and last Saturday

    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...

  • RE: SQL Server to Oracle - Magic Decoder Ring

    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...

  • RE: Query to List all Users in Database

    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...

  • RE: How to hide objects (sp, views, tables) from a user?

    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...

  • RE: user defined data types within SQL Jobs?

    Rob-350472 (10/26/2010)


    When attempting to parse a job step in SQL Server Agent: Add Job Step I get an error finding a user defined data type. (Cannot Find Data Type <Type...

  • RE: Renameing a column in all tables in a sql 2008 database

    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,...

  • RE: Data Modelling an existing database

    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...

  • RE: Renameing a column in all tables in a sql 2008 database

    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...

  • RE: Huge Records...

    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...

  • RE: Huge Records...

    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...

Viewing 15 posts - 8,476 through 8,490 (of 13,460 total)