Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)

  • RE: Find a character in string

    HI,

    Below query will find if there are any special character

    in string

    DECLARE @test-2 VARCHAR(50)

    SET @test-2 = 'MySt%ring'

    Select Convert(BIT,PATINDEX('%[^a-zA-Z0-9]%',@Test))

    Hope this will help you :-):-D

  • RE: sales by product category

    Create Script

    CREATE TABLE [dbo].[Sales](

    [Department] [nvarchar](50) NULL,

    [price] [int] NULL

    )

    Sample data taken

    Departmentprice

    A 10

    B ...

  • RE: BCP Error

    HI

    try this

    declare @sql varchar(8000)

    SET @dir = 'D:\';

    SET @sql = 'bcp "select * from Test.dbo.TableName" queryout "c:\bcptest3.txt " -c -t, -T -S';

    EXEC master..xp_cmdshell @sql;

    Hope this helps 🙂 🙂

  • RE: Sql Query

    DECLARE @test-2 TABLE

    (

    RowID INT,

    DateStamp DATE,

    PrevStatus INT,

    ...

  • RE: SELECT???? Query idea???

    HI ,

    select * INTO Test FROM

    (

    select ROW_NUMBER()over(partition by customer order by customer) as counts ,customer,Contract

    from tablename

    ) A where counts...

  • RE: what is cross server query

    ...

Viewing 6 posts - 1 through 6 (of 6 total)