Forum Replies Created

Viewing 15 posts - 1,141 through 1,155 (of 1,923 total)

  • RE: SQL count

    Try this:

    SET NOCOUNT ON

    DECLARE @PhoneNumbers TABLE

    (

    ID INT IDENTITY(1,1),

    TEL1 BIGINT,

    TEL2 BIGINT,

    TEL3 BIGINT

    )

    INSERT @PhoneNumbers (Tel1, Tel2, Tel3)

    ...

  • RE: I need some help with a test, please.

    Jeff Moden (9/18/2010)


    ColdCoffee (9/18/2010)


    Jeff Moden (9/18/2010)


    ColdCoffee (9/18/2010)


    Jeff, PFA the results my DESKTOP..

    Mine runs on

    OS : Windows 7 Ultimate,

    SQL ...

  • RE: String Parsing

    How about this:

    --: Declare local variables

    DECLARE @command VARCHAR(50)

    DECLARE @Folder VARCHAR(50)

    SET @Folder = 'P:\Documentary'

    SET @command = 'dir /b /s "'+@Folder+'"' -- Place you

    -- Declare a temp table to hold...

  • RE: I need some help with a test, please.

    Jeff Moden (9/18/2010)


    ColdCoffee (9/18/2010)


    Jeff, PFA the results my DESKTOP..

    Mine runs on

    OS : Windows 7 Ultimate,

    SQL ...

  • RE: I need some help with a test, please.

    Jeff, PFA the results my DESKTOP..

    Mine runs on

    OS : Windows 7 Ultimate,

    SQL ...

  • RE: Update one column of a table with data from another table

    Varinder Sandhu (9/18/2010)


    found the solutions...

    actually if the tables lie in different dbs

    then create temp table in db X that contain the data of tableB from db Y

    this way...

  • RE: Add white space

    SPACE can do it for you

    SELECT SPACE( LEN( Col1)) + Col1 from <your table>

    And as Wayne suggested, u can use REPLICATE as well.. like:

    SELECT REPLICATE(' ' , LEN(col1)) + Col1...

  • RE: Store Procedure Issue

    Just a suggestion : Drop the temp table in the SP before it is getting created. like :

    IF OBJECT_ID('tempdb..#temp') is not null

    drop table #temp

    create table #temp (a int, b varchar,...

  • RE: Error in the Query

    Fantastic... thanks for the appreciation EasyBoy.. 😀

  • RE: What a nice place to be

    Awesome feedback , Mike.. I concur completely on whatever u said about SQLServerCentral.. :smooooth:

  • RE: Error in the Query

    EasyBoy (9/16/2010)


    When i execute the following query i got the message.

    I couldnt find out what exactly the problem is.

    Msg 102, Level 15, State 1, Line 2

    Incorrect syntax near ')'.

    DBA

    Msg 208,...

  • RE: Error in the Query

    Try this :

    DECLARE @I INT

    DECLARE @C INT

    DECLARE @Name VARCHAR(800)

    DECLARE @command varchar(max)

    SET @I = 1

    SELECT @C = COUNT(*) FROM SYS.SYSDATABASES

    SET @Name = ''

    SET @command = ''

    DECLARE @Table_Name VARCHAR(800)

    SET @Table_Name = 'DB_ROLE_'...

  • RE: To make a audit vertically in TSQL

    Saravanan, we have told a gazillion times to post the tables structures, sample data et all (i myself have told u and pointed u to the article by Jeff Moden,...

  • RE: Concatenate Results in Row

    First of all, thanks to u too for posting the question fantastically..Secondly, recursive queries, WHILE Loops will all produce the result, but the FOR XML thing is fast and furious.....

  • RE: Retrieving data from SQL2008 to XML via Web Service

    Dear Muratingol, please provide some sample data and the table structures so that we will give you what exactly you want!

Viewing 15 posts - 1,141 through 1,155 (of 1,923 total)