Forum Replies Created

Viewing 15 posts - 18,016 through 18,030 (of 18,926 total)

  • RE: method for testing whether server exists?

    R u doing this in a DTS?

  • RE: Timestamp Column

    If you can't work it out, post your query and we'll help you.

  • RE: help with a query

    This will need some tweaking but it can give you an idea :

    SELECT [city_code], [outlet_code], sum([sold_units]) as UnitsSold, CAST(Issue - 1 AS INT) / 4 AS UnitPeriod

    FROM [MerchDB].[dbo].[tblOutletSales]

    where active...

  • RE: Timestamp Column

    Maybe this will help :

    GO

    create table #t

    (

    Col1 varchar(10) not null,

    TS timestamp not null

    )

    GO

    Insert into #t (Col1) values ('test')

    Insert into #t (Col1) values ('test2')

    Insert into #t (Col1) values ('test3')

    Select *...

  • RE: help with a query

    Why don't you add a column Period and another group by by this period?

  • RE: urgent please

    We were simply suggesting the trigger solution because it would avoid doing this complexe condition twice in a row :

    WHERE Len([Rec.code]) > 2 --Check Length

    ...

  • RE: urgent please

    You don't need more... you just need to code now .

  • RE: urgent please

    That's why 2 heads are always better than one ...

    I'm not sure which solution would be better because they all seem pretty much the...

  • RE: Formating data for export

    Declare @a as decimal(18,4)

    set @a = 12345.67

    Select replace (@a, '.', '')

    --123456700

    please note that you'll always get 4 decimals even if it's an integer

  • RE: urgent please

    Or you could delete them right away from your staging table using the same where condition, but using a delete trigger to do the insert on the error table... That...

  • RE: help with script in Query Analyzer

    What executed successfully?

  • RE: help with script in Query Analyzer

    Select DISTINCT R.clinicphone from dbo.records R left outer join dbo.center C on R.clinicphone = C.clinicphone where C.clinicphone is null

    This will give you a list of clinicphones that exists in records...

  • RE: Formatting in T-SQL

    Yes there's a way as Noeld pointed out but why do you want to format your data like this?? this work is more often than not supposed to be...

  • RE: help with script in Query Analyzer

    that means that the syntax is correct, try doing a left join from the child table to the parent table to find missing keys. Correct those (either by recreating the...

  • RE: help with script in Query Analyzer

    ALTER TABLE dbo.records ADD CONSTRAINT

    FK_records_center_FKNAME FOREIGN KEY

    (

    clinicphone

    ) REFERENCES dbo.center

    (

    clinicphone

    )

Viewing 15 posts - 18,016 through 18,030 (of 18,926 total)