Forum Replies Created

Viewing 15 posts - 10,321 through 10,335 (of 13,469 total)

  • RE: Can anyone define a value of 65536 in master.dbo.sysdatabases.status?

    shew (11/18/2009)


    Sorry, I'm looking for a "65536" hit on the status column, rather than the status2 column.

    look at the post again...the code for reading the status column is a...

  • RE: Linked Server Excel Sheet (tab) names

    yes...

    exec sp_tables_ex LinkedServerName

    that will show all the sheets(tables) that exist in the Excel spreadsheet...or any other linked server for that matter. that retrieves the metadata from whatever linked server...

  • RE: what swrong with this

    Lynn Pettis (11/12/2009)


    Geez, Lowell, you take all the fun out making the OP tell us what the problem is... 😉

    mea culpa; it was low hanging fruit and i'm try...

  • RE: what swrong with this

    syntax.

    a case statement has only a single CASE keyword between the CASE and END,

    ie

    CASE

    WHEN [condition1] THEN [value]

    WHEN [condition2] THEN [value]

    ELSE [value3]

    END

    you can look...

  • RE: How to hold Database Name in a variable and use it with USE keyword

    to get the table counts, i see you'll have to loop thru everything one way or the other;

    here's one way to do what you asked...i'm using sp_msforeachdb, which uses a...

  • RE: Help with optimizing stored procedure

    oops sorry i misread your code...i thought @KeyWhat was which field,@keywhere was the value...i updated my code, but it's not what you wanted...except if they only use one of the...

  • RE: Help with optimizing stored procedure

    at the very least, you can get rid of the OR statements, correct?

    it looks like your application picks two search terms, but your current WHERE statement you build searches 8...

  • RE: Help with optimizing stored procedure

    the problem is you have a "do all find all" procedure. it has tha couple of problems:

    multiple OR statements.

    LIKE statements that start with a percent sign.

    with multiple OR...

  • RE: BCP Utility Main Purpose

    JC-3113 (11/10/2009)


    Hi GSquared

    if i restore a table, are the index(s) also restored with it, or do I have to do additional steps ?

    Thanks

    Jim

    If a table was dropped, it's indexes went...

  • RE: Query Data Between Characters

    george here's one way to do it;

    i'm using a function CHARINDEX2, which finds the Nth occurrance of a string within the string.

    with that, i can find the first CrLf and...

  • RE: Total # of Items grouped by rows

    here's one way to do it; in this case, i put the total Hours a s acolumn in the same row...not normalized, repetative, but the data is there.

    this is based...

  • RE: How to compile the stored procedure while creating

    vikas bindra (11/10/2009)


    You sure that you are using 2008.

    Because in SSMS 2008 it gives an error if you type a table name that doesn't exists.

    not true.

    when it comes to compiling...

  • RE: Money datatype

    it's just a bit bigger: (19,4)

    here's an example:

    create table money(

    mymoney money)

    select * from sys.columns where name = 'mymoney'

    select type_name(system_type_id) ,

    type_name(user_type_id),

    '('+ convert(varchar,precision)+ ','+ convert(varchar,scale) + ')'

    from sys.columns where...

  • RE: Narrowing search on 3 nearest fields

    in SQL server, there is always more than one way to skin a cat:

    this should provide the same logic...the order by is the key:

    create table #NoName(

    ProdCode varchar(30),

    Width ...

  • RE: DDL log

    Richard

    for my DDL database trigger, I'm using execute as without an issue;

    here's how my trigger starts:

    CREATE TRIGGER [ReturnPREventData]

    on DATABASE WITH EXECUTE AS 'dbo'

    FOR

    CREATE_PROCEDURE, DROP_PROCEDURE, ALTER_PROCEDURE

    AS

    here's a complete exampel for...

Viewing 15 posts - 10,321 through 10,335 (of 13,469 total)