Forum Replies Created

Viewing 15 posts - 5,611 through 5,625 (of 7,636 total)

  • RE: Custom Sequence Values

    You want the DENSE_RANK() function:

    Select Id, DENSE_RANK() OVER(order by Id) as [Seq_Num]

    From MyTable

  • RE: UPdate statement

    And how can you tell which one was the first inserted? SQL Server does not necessarily either store them or return them in the same order that you inserted...

  • RE: Script system stored procedures in master?

    OK, this will get the entire length:

    select o.name, m.definition

    from master.sys.system_sql_modules m

    join master.sys.system_objects o

    ON o.object_id = m.object_id

    Of course, getting the entire definition out of...

  • RE: Script system stored procedures in master?

    "Select [text] from master.sys.syscomments" works but is limited to 4000 characters.

  • RE: Custom Sequence Values

    In what context are you trying to do this? A SELECT? A View? An INSERT Trigger? A stored procedure that is writing to the table?

    It is...

  • RE: UPdate statement

    psangeetha (9/3/2008)


    But the trick is, I need to populate the value of first cno in the CIT.desc.

    Define "first". Remember that relational database have no inherent order of their...

  • RE: Use of # tables vs ## global tables when using dymanic SQL

    Glad I could help.

  • RE: Importing XML from file to XML field

    GibsonM111 (9/3/2008)


    If I'm logged into SQL Server Management Studio using Windows Authentication, shouldn't SQL Server use my account?

    Not necessarily. The actual security context that SQL Server uses for external...

  • RE: Table

    Execute the following command and post the results:

    SELECT * From INFORMATION_SCHEMA.TABLES

  • RE: Use of # tables vs ## global tables when using dymanic SQL

    #Temp tables are unique per-session, not per procedure.

    #Temp tables can span subordinate Batches, but is dropped when the batch that created it exits. EXEC('..') and sp_ExecutSQL() create subordinate batches...

  • RE: Importing XML from file to XML field

    I don't know what account OPENROWSET from SQL Server runs under, but you should make sure that it has the necessary access to that directory and file.

  • RE: Lost in Space

    Mind you, I do not know if these numbers are correct. I am just saying that they are reasonably possible. 😀

  • RE: Lost in Space

    blandry (9/3/2008)


    Can these numbers actually be correct? Your editorial states 10,000 lost each week at the 36 largest airports. That means on average 278 laptops per week, or...

  • RE: How can I mass alter multiple stored procedures?

    ALTER is not an option for the Script Generator. The Script Generator is the thing in SSMS that can script multiple objects at a time.

    The facility that creates the...

  • RE: Problem with DeadLock Transaction

    At this point, the only two things that I am fairly certain would work are:

    1. A SQLCLR proc that recieves an XML parameter and writes it to...

Viewing 15 posts - 5,611 through 5,625 (of 7,636 total)