Forum Replies Created

Viewing 15 posts - 17,731 through 17,745 (of 18,926 total)

  • RE: Query Analyzer displaying all int datatypes as decimals....

    what's the tabbed mode?? I've already seen the wave option but I never used it.

  • RE: Avg for 5 days

    Quick math from sql server :

    0 / 5 = 0

    1 / 5 = 0

    2 / 5 = 0

    3 / 5 = 0

    4 / 5 = 0

    Select avg(temp) as AvgTemp,...

  • RE: Query Analyzer displaying all int datatypes as decimals....

    Maybe you were sleepwalking or sleeptyping... I doubt that this could be set using a tsql command so I must assume it was done by hand... Can't tell who...

  • RE: Sub Select

    You could also look up the union operator :

    (union all)

    Select 1 as Demo

    union all

    Select 2 as Demo1

    union all

    Select 1 as Demo1

    ----

    1

    2

    1

    (union)

    Select 1 as Demo2

    union

    Select 2 as Demo1

    union

    Select 1 as...

  • RE: Sub Select

    This could work :

    Select

    (select

    (select cast (count (*)as decimal) from t_TRANSACTION where status_id = '15854' and active = 1) /

    (select cast (count(*) as decimal) from t_TRANSACTION where status_id in(15854,15750)...

  • RE: SUM

    This is a basic task but I just don't see a solution with the data you are presenting me...

    Can you post the script to create all the tables you need...

  • RE: Query Analyzer displaying all int datatypes as decimals....

    How long have you guys been DBAS??? I never came across the fifth of the problems you guy can solve..

  • RE: Problem with Creating Dynamic T-SQL...

    I'm gonna repeat my question :

    WHY ARE YOU using dynamic sql for this task???? there's absolutely no need in this case.

    have you tried runnning this statement in static sql?

    DECLARE...

  • RE: Avg for 5 days

    where's the month information??

    Do you keep all the 365 days in the day column?

    Ex feb. 28 = day 59?

  • RE: SUM

    What are the expected results from the query with this data?

  • RE: SUM

    Can you post the definition of the tables with some sample data for each one also with the expected results of the query? We're only gonna do guess work...

  • RE: Problem with Creating Dynamic T-SQL...

    Why do you want to use sp_executesql for this??

    This query would do the same thing :

    DECLARE @dbsize dec(15,2)

    DECLARE @drive char(1)

    SET @drive = 'C'

    SET @dbSize = (select (dbsize*8.00/1024/1024) from dbo.drivespace...

  • RE: DTS passwords

    There's probabely another way, but it looks like you have to do a save has under another name (no password this time). Delete the old one and rename the...

  • RE: SUM

    Select TransactionType, Sum(SaleAmount) as SaleAmount, Sum(PaymentAmount) as PaymentAmount, Sum(SaleAmount - PaymentAmount) AS Balance FROM dbo.Transactions Where UserID = @ClientID

    group by TransactionType

  • RE: Slow query help needed!!!!

    Can't blame you... I can't speel very weil either! .

Viewing 15 posts - 17,731 through 17,745 (of 18,926 total)