Forum Replies Created

Viewing 15 posts - 46 through 60 (of 119 total)

  • RE: Finding Datatype

    Arun,

    Try something like:

    select column_name

          ,data_type

          ,character_maximum_length

          ,numeric_precision

          ,numeric_scale

    from   information_schema.columns

    where  table_name = 'myTable'

    Hope this helps,

    Scott Thornburg

  • RE: White Papers

    The best, most thorough book on SQL Server Transactional Replication is Hilary Cotter's A Guide to SQL Server 2000 Transactional and Snapshot Replication.  I've been using Replication for about 2 years...

  • RE: Insert into problem with linked server

    Are either of the servers Win 2003 OS?  I've hit this same type of issue due to the default DTC settings on Win 2003. 

    The straight

    exec linkedserver.dbname.dbo.procname

    is a...

  • RE: Replication Question

    Rkatri,

    Does the data that is imported to Server B go into the same tables as published from Server A, or are these different tables?

    If different, there's no problem.  But if you're...

  • RE: get the rowcount before issuing statement

    Maybe I'm misunderstanding the requirements, but if you know you never want to select more than N rows, why not always do a SELECT TOP N for your query?

    If there...

  • RE: How to defult date column to null?

    Any possibility that txtDOB.Text is actually an empty string, and that the Session variable DOB is then set to ''?

    SQL Server converts that to the result you have.  FOr example,...

  • RE: Using alias in equations

    Use a derived table:

    SELECT   subtotal

          , (subtotal * 0.5) as tax

    FROM  (select

                 (quantity * price) as subtotal

           from table) t

     

    Scott Thornburg

  • RE: How are logs written?

    From Books Online "Transaction Log PHysical Architecture"

    "When the database is created, the logical log file begins at the start of the physical log file. New log records are added...

  • RE: Variable parameters

    If none of Field1 - Field6 are nullable (or contain nulls), one way to do this is:

    Select * From MySQLTable 

     Where Field1 = CASE P1 WHEN '' THEN Field1 Else @P1 END        

      and Field2 = CASE P2...

  • RE: Need help with proper syntax

    You're quite welcome.  Glad I could help.

    As far as cleaning up the query, could you execute the following and return the results

    select tblNM_News.CategoryID, count(*)

    from   tblNM_News

    where  NOT EXISTS (select...

  • RE: Format/Transpose table data to Columns and Rows.

    I agree with Craig for step 1 -- make sure the data is entered into a 3-column table.

    Then run something like

    SELECT

         (select  value from DataTable dt1 where dt1.row =...

  • RE: locking?

    While SET ROWCOUNT xx is deprecated in SQL 2005, I look forward to being able to write
     
       DELETE TOP 1000 FROM MyTable
       WHERE ....
     
    to implement exactly the functionality that...

  • RE: TSQL formatter

    A website that works well for this is http://www.sqlinform.com.  Paste in your SQL and it formats it nicely.I've been using this for over a year, and it works quite...

  • RE: Need help with proper syntax

    Yup.

    The problem is in the GROUP BY clause.  You are grouping by tblNM_NewsCategory.CategoryDesc, but this is a ntext column.  Such is not allowed by SQL Server.  You have two options:

      ...

  • RE: Missing performance counters for one instance

    Glad you were able to solve your problem.  I've hit this problem quite a bit with SQL 2000 SP3.  One cause of missing SQL Server PerfMon counters is starting an...

Viewing 15 posts - 46 through 60 (of 119 total)