Forum Replies Created

Viewing 15 posts - 526 through 540 (of 3,221 total)

  • RE: list of Fields in a table

    Do you mean something like this?

    CREATE TABLE [dbo].[Table_3](

    [Col1] [nvarchar](50) NULL,

    [Col2] [nvarchar](50) NULL,

    [Col3] [nvarchar](50) NULL

    ) ON [PRIMARY]

    INSERT INTO dbo.Table_3

    SELECT NULL,NULL,'d' UNION ALL

    SELECT 'X',NULL,NULL UNION ALL

    SELECT NULL,NULL,NULL UNION ALL

    SELECT NULL,'X','C' UNION ALL

    SELECT...

  • RE: how do I take out the Fragmentation

    Does your table contain a clustered index ?

  • RE: Determine column usage

    I did NOT create this SP (Refer to the header for the author). But in testing it in my Sandbox DB it appeared to do what you desire to...

  • RE: Are the posted questions getting worse?

    Koen Verbeeck (4/4/2012)


    W00t! Steve approved my QotD on SSIS 2012. It will be published around 18th of April.

    So a QOD instead of a birthday present for me .... ugh

  • RE: VIEWS 5

    L' Eomot Inversé (4/4/2012)


    Nice easy question.

    Like Hugo, I found it somewhat odd that only one option was provided for the result of step 2; it might have been a good...

  • RE: How to add Identity an existing column

    Your Table:

    CREATE table Temp(ID int, Name varchar(10))

    --Inserting data for testing

    INSERT INTO Temp

    SELECT 1,'First' UNION ALL

    SELECT 2,'Second' UNION ALL

    SELECT 3,'Third'

    The new table you need to create using your SP

    CREATE TABLE...

  • RE: MDS

    SQLRNNR (4/3/2012)


    This is a feature i will have to learn.

    +1

  • RE: Rollback Update Statement

    Error Level 16 indicates that the error can be corrected by the user.

    From what you have stated, I am led to believe that there is more to your problem than...

  • RE: Please help me query

    Duplicate posting.. please reply here

    http://www.sqlservercentral.com/Forums/Topic1277750-391-1.aspx

  • RE: VIEWS 5

    OzYbOi d(-_-)b (4/3/2012)


    tks for the question.

    Wonder how many would have jumped at "6 columns" for STEP 2 if it were an option...

    Wondered the same, but alas and alack after my...

  • RE: Error Output using T-SQL

    An expansion on my prior post.

    CREATE PROCEDURE [dbo].[usp_GetErrorInfo]

    AS

    SELECT

    ERROR_NUMBER() AS ErrorNumber,

    ...

  • RE: Error Output using T-SQL

    Are you familiar with a TRY CATCH block if not start here:

    http://msdn.microsoft.com/en-us/library/ms175976(v=sql.100).aspx

    Also please note if you post table definition(s), sample input and desired output you are more likely to get...

  • RE: How to add Identity an existing column

    Modified your code, in an insiginificant manner to:

    CREATE table Temp(ID int, Name varchar(10))

    CREATE table Temp1(ADTID INT,ID INT,Name varchar(10))

    INSERT INTO Temp -- Add 1 row of data to Temp

    SELECT 10,'Some name'

    SELECT...

  • RE: VIEWS 4

    Alex-668179

    I do mind. But the data is only incorrect because of the bug in SQL Server that does not handle SELECT * correctly inside a view.

    It being a "bug"...

  • RE: order by COUNT(x) in rank

    To illustrate the differences try this code

    USE Northwind

    GO

    SELECT COUNT(4) AS 'Count by col number' FROM dbo.Audit -- counts nulls

    SELECT COUNT(Item) AS 'count specific col' FROM dbo.Audit --counts only non null...

Viewing 15 posts - 526 through 540 (of 3,221 total)