Forum Replies Created

Viewing 15 posts - 331 through 345 (of 569 total)

  • RE: UNPIVOT using T-SQL

    mahesh.vsp (7/16/2009)


    Using target i need to get back the Customer Data?

    quote]

    Hi,

    You mean reversing of the pivot?

  • RE: Blocking Query

    Hi,

    Along with, PS correct approach, the DBCC inputbuffer shows the contents of

    sp/table/.. against the SPID

    ARUN SAS

  • RE: can I use a value like "1,203" in a calculation?

    kevinwinters (7/15/2009)


    Any chance I can convert that text:"1,203.75" to a number like 1203.75 on the fly?

    Hi,

    Try this

    declare @ABC nvarchar(20)

    select @abc = '1,234.56'

    select cast(replace(@ABC,',','') as numeric(18,2))

    RESULT

    1234.56

  • RE: Commas within multi select text

    Hi,

    You delimited the comma separated from the string into the table and use the table in the stored procedure like

    create table #temp

    (

    city varchar(30)

    )

    declare @abc varchar(1000)/*Alwayes should be in max value*/

    select...

  • RE: Temp Table full

    arun.sas (7/7/2009)


    Eswin (7/7/2009)


    What should i do to find the root cause of the issue?

    What all events and data columns should i check when in run my Trace for the issue?

    Hi,

    One...

  • RE: Temp Table full

    Eswin (7/7/2009)


    What should i do to find the root cause of the issue?

    What all events and data columns should i check when in run my Trace for the issue?

    Hi,

    One of...

  • RE: Merge Many rows to one row

    Bur@ir (7/7/2009)


    Where Customer_ID is a unique number for the customer. Now i want it to be in this way:

    Customer_ID: ...

  • RE: Merge Many rows to one row

    Hi,

    also try this

    create table #temp

    (

    Cust_Id int,

    Cust_Ser varchar(20)

    )

    insert into #temp

    select 1234,'Football'

    union all

    select 1234,'Swimming'

    union all

    select 1234,'Table Tennies'

    union all

    select 1234,'Basketball'

    select Cust_Id, (case when Cust_Ser = 'Football' then 'FB'

    when Cust_Ser = 'Swimming' then...

  • RE: Transaction handling failing with error, please help correct

    Dean Jones (7/6/2009)


    Msg 208, Level 16, State 1, Procedure spInsertProfile, Line 16

    Invalid object name 'tblMarket_Profifile'.

    Msg 266, Level 16, State 2, Procedure spInsertProfile, Line 2215

    Transaction count after EXECUTE indicates that a...

  • RE: DROP DATABASE with variable not possible?

    FreeHansje (7/6/2009)


    DECLARE @DBNaam varchar(50), @file1 varchar(200), @file2 varchar(200)

    SET @DBNaam = 'DBName2'

    IF EXISTS(SELECT DBID FROM sysdatabases

    WHERE name = @DBNaam)

    BEGIN

    DROP DATABASE @DBNaam;

    END

    Hi,

    try this

    DECLARE @DBNaam varchar(50),

    @DROP nvarchar(100),

    @RESULT nvarchar(200)

    set @DBNaam = 'DBName2'

    set @DROP =...

  • RE: select query

    Hi,

    try this

    create table #temp

    (

    text1 varchar(100)

    )

    insert into #temp

    select '\VOL003\TEXT\0001\11400034_00000.txt'

    union all

    select '\VOL003\TEXT\0001\114000305_00000.txt'

    union all

    select '\VOL003\TEXT\0001\1140000036_00001.txt'

    select replace(text1,'\VOL003\TEXT\0001\','') from #temp

    Result

    11400034_00000.txt

    114000305_00000.txt

    1140000036_00001.txt

    ARUN SAS

  • RE: Computed column in table as a constriant ???

    Digs (7/1/2009)


    SO I guess its CAST(A AS VARCHAR) + '_' + B i n the for the formula in the properties part of design in the SQL server table.

    Hi,

    try...

  • RE: Speeding up Bulk Insert

    hein (6/30/2009)


    A job with 10 000 records took 20 seconds when the table had less than 2 000 000 records. Now, on 6 000 000+, it's down to about 100...

  • RE: How to insert/copy rows from one table to another?

    descentflower (7/1/2009)


    How would i do that with an efficient way?

    Hi,

    What you mean the efficient way???

    create tbDestination

    (

    col1 int default as 1,

    col2 int

    )

    insert into tbDestination (Col2)

    select * from tbSource

    create tbDestination

    (

    col1 int ,

    col2...

  • RE: Raw count for all tables in databsae

    pat (6/30/2009)


    how can i get report to get row count for all tables in database

    Hi,

    Try Another method

    USE DB

    GO

    SELECT

    a.name, object_name (i.id) TableName, rows as RowCnt

    FROM sysindexes i INNER JOIN sysobjects o...

Viewing 15 posts - 331 through 345 (of 569 total)