Forum Replies Created

Viewing 15 posts - 1 through 15 (of 46 total)

  • RE: database 'master' is not valid 9003 error Help!!!

    The expression "Replace the database file with the corrupted one." is wrong.

    The correct one must be:

    Replace the corrupted ones with the database files in Templates directory.

    I have test it and...

    ------------
    When you 've got a hammer, everything starts to look like a nail...

  • RE: Selecting next top n records....

    Supposing that the last SerialNo read is 50165 the next 50000 statement is:

    select top 50000 *

    from table-name

    where SerialNo > 50165

    order by SerialNo

    In case that u r in a SP, you...

    ------------
    When you 've got a hammer, everything starts to look like a nail...

  • RE: combine all tables in a database with a union query

    In "access"... I suppose you mean Microsoft Access...?

    What this has to do with T-SQL script u ask for?

    Please, correct me if i am wrong, but i suppose that you...

    ------------
    When you 've got a hammer, everything starts to look like a nail...

  • RE: combine all tables in a database with a union query

    The code that you read can be ran in the SQL Query analyser...

    The print statement is displayed in the output.... but the 'print' i used (as you see) is in......

    ------------
    When you 've got a hammer, everything starts to look like a nail...

  • RE: Is more fater the execution of a store procedure?

    Counting time is not a easy issue... specially in the network.

    Many parameters must be taken into account...

    I really have a lot of questions before i get into final result.

    1.Actually, what...

    ------------
    When you 've got a hammer, everything starts to look like a nail...

  • RE: combine all tables in a database with a union query

    I agree with Vladan... we have a very strange database indeed...

    Another solution (more close to VB) is to read the user tables from the system tables and construct a dynamic...

    ------------
    When you 've got a hammer, everything starts to look like a nail...

  • RE: Row To Column

    What do you mean by "the table is huge" ?

    Is there a very big number of rows?

    If this is the case then... it is very possible that you end up...

    ------------
    When you 've got a hammer, everything starts to look like a nail...

  • RE: selecting result of a dynamic sql query into a variable

    sp_executesql is what u r looking 4...

    Actually (by reading the SBO) u will see the following:

    "Using sp_executesql is recommended over using the EXECUTE statement to execute a string. Not only...

    ------------
    When you 've got a hammer, everything starts to look like a nail...

  • RE: selecting result of a dynamic sql query into a variable

    Seems that you dont read my replies....

    ------------
    When you 've got a hammer, everything starts to look like a nail...

  • RE: selecting result of a dynamic sql query into a variable

    The problem is not actually in your code but in the size of the @Command which is too short to keep the whole string.... try

    Declare @command varchar

    ------------
    When you 've got a hammer, everything starts to look like a nail...

  • RE: selecting count(*) from a table into an int variable

    Also....

    Declare @numRows int

    select @numrows =count(*) from customer

    ------------
    When you 've got a hammer, everything starts to look like a nail...

  • RE: selecting result of a dynamic sql query into a variable

    Actually the EXEC command is executed in a diff address space of the current so... your var/s are not visible.

    What you have to do is to declare the var inside...

    ------------
    When you 've got a hammer, everything starts to look like a nail...

  • RE: selecting from a table name in string format

    --You can run this in QA

    Declare @tablename varchar(50)

    Declare @SQLCommand varchar(350)

    Declare Cursor1 Cursor Static ForWard_Only For

     select sysobjects.name

     FROM sysobjects 

     WHERE sysobjects.type = 'U'

    Open Cursor1

    Fetch Next From Cursor1...

    ------------
    When you 've got a hammer, everything starts to look like a nail...

  • RE: For script guru''''s

    Hi!! Fizz... looking for "Scripts Guru's"... smart title indeed   ... now I 've to prove that am one...

    ------------
    When you 've got a hammer, everything starts to look like a nail...

  • RE: How to Show Columns as Rows

    ------------
    When you 've got a hammer, everything starts to look like a nail...

Viewing 15 posts - 1 through 15 (of 46 total)