Forum Replies Created

Viewing 15 posts - 376 through 390 (of 907 total)

  • RE: Returning column names of a Table view

    I have not really followed this thread, but you may want to look at what sp_depends SP does. It might give you a clue to what you are looking for....

    Gregory A. Larsen, MVP

  • RE: Tough SQL

    Are you looking for something like this:

    set nocount on

    create table a (keyf int, a int)

    create table b (keyf int, b int)

    create table c (keyf int, c int)

    insert into a values...

    Gregory A. Larsen, MVP

  • RE: Pivot Table

    Here are some example of pivot table queries:

    http://www.geocities.com/sqlserverexamples/#pivot1

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

  • RE: Checking for Stalled Agent Jobs

    I'm guessing you could use "sp_help_job" SP and look at the "current_execution_status" column to determine the current status of a job. Of course I have no idea what the...

    Gregory A. Larsen, MVP

  • RE: Replace

    Have not tested this but try:

    update <yourtable>

    set phone = replace(phone,'-','')

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

  • RE: Stored Procedure Modified Date

    you can use the schema_ver column in sysobjects to identify that a new version was created, although you can't identify when. If you build a routine that checks to...

    Gregory A. Larsen, MVP

  • RE: Combine Tables

    Probable should change that rtm to rtrim, like so:

    create table x (id int, addr char(50))

    create table y (id int, addr char(50))

    insert into x values ('1','abcdefg')

    insert into y values ('1','bcdefg')

    insert into...

    Gregory A. Larsen, MVP

  • RE: Combine Tables

    You might try something like this. This is a very simple example, you will more than likely need a more complex like clause.

    create table x (id int, addr char(50))

    create...

    Gregory A. Larsen, MVP

  • RE: Performance Monitoring on NT for SQL Server

    I think you want to look for a file that has an extention of blg, csv or tsv. Open this file in PERFMON by clicking on the icon...

    Gregory A. Larsen, MVP

  • RE: "sa" and need to "permit access to db"

    I assume you mean you place them in the "System Administrators" server role. If this is the case, then the answer is no. Being in this role allows...

    Gregory A. Larsen, MVP

  • RE: Moving to a new server....

    Do you know if there are any issues installing the new BOL on a SP1 or SP2 version, and then migrating to SP3?

    Gregory Larsen, DBA

    If you looking for SQL Server...

    Gregory A. Larsen, MVP

  • RE: Moving to a new server....

    May also want to read this, if you have an old version of BOL:

    http://support.microsoft.com/default.aspx?scid=kb;en-us;303774

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

  • RE: An interesting task

    What about this option? Is this a simple, easy to follow method? The only problem with this solution is it will only handle a span of 21 years between...

    Gregory A. Larsen, MVP

  • RE: How do you query for trigger status?

    Here is another way:

    select OBJECTPROPERTY ( object_id('pubs.dbo.employee_insupd'),'ExecIsTriggerDisabled')

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

  • RE: Dynamic SQL column names

    Yep something like:

    declare @c char(10)

    declare @cmd char(100)

    set @c = 'test_column'

    set @cmd = 'create table tempdb.dbo.test (' + @c + ' int)'

    exec(@cmd)

    insert into tempdb.dbo.test values (1)

    select * from tempdb.dbo.test

    drop table tempdb.dbo.test

    Gregory...

    Gregory A. Larsen, MVP

Viewing 15 posts - 376 through 390 (of 907 total)