Forum Replies Created

Viewing 15 posts - 1,606 through 1,620 (of 2,452 total)

  • RE: help with datediff

    do you have any other columns available that hold date info ...eg yyymmdd?

    also what are you expecting to happen when the end time is two or more days after the...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Join SQL Query help - Really stuck bad

    have you tried grouping by cc.cn instead of hostname?

    if you cant make it work, then we need details (create table / insert data scripts) for the other tables...in MS...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: GetDate() 5 Years ago without time formated 'YYYY-MM-DD'

    SELECT convert(varchar(10), DateAdd(yy, -5, GetDate()),120)

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Join SQL Query help - Really stuck bad

    do you mean like this (based on my set up code)

    SELECT shost_name, COUNT(DISTINCT time_stamp) AS visits

    FROM MSA

    GROUP BY shost_name

    ORDER BY shost_name

    if not...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Interesting Question related to Splitting table row conditionally

    uravindarreddy (6/23/2013)


    Hi Livingston,

    Anyway would datetime columns in these type of scenario help a lot?

    Regards

    ok...thanks for update.

    was thinking that maybe a running balance by date may have helped...but can't see that...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Join SQL Query help - Really stuck bad

    famaash (6/23/2013)


    Hi,

    I really appreciate your assistance. I am using MySQL with PHP..

    This forum is Microsoft SQL Server.

    here is some code that may give some ideas...remember this code is for Microsoft...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: T SQL Update statement that is set based

    does TFI_PERSON have a date of birth column stored as datetime format?

    why this

    [DOB_DAY] [int] NOT NULL,

    [DOB_MONTH] [int] NOT NULL,

    [DOB_YEAR] [int] NOT NULL,

    rather than DOB (datetime) ?

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: selecting same columns

    http://msdn.microsoft.com/en-us/library/ms190690(v=sql.105).aspx

    try this

    if OBJECT_ID('tempdb..#t') is not null

    drop table #t1

    SELECT TOP 100000

    IDENTITY(INT,1,1) AS N INTO #t

    FROM Master.dbo.SysColumns sc1

    SELECT count(n) FROM #t

    --==================================================

    if OBJECT_ID('tempdb..#t1') is not null

    drop table #t1

    SELECT TOP 100000

    IDENTITY(INT,1,1) AS N...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: selecting same columns

    this article may help you...(J Moden)

    http://www.sqlservercentral.com/articles/T-SQL/62867/

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Need help with query

    maybe something along these lines will help you get started

    SELECT

    CALLNO,

    TITLE,

    STUFF ( (

    SELECT ',' + ARTIST

    ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Interesting Question related to Splitting table row conditionally

    are the tables that you describe really as simple as you make them out to be?

    I would have thought for these type of transactions there would have been at least...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Need assistance with a query

    starter......

    SELECT TOP 10000

    CustomerID = CAST(Abs(Checksum(Newid()) % 90 + 1) AS INT),

    ProdID = CAST(Abs(Checksum(Newid()) % 900 + 1) AS INT)

    INTO ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Trying to join 3 tables from different servers

    does the following help you?

    http://stackoverflow.com/questions/9393207/cannot-resolve-the-collation-conflict-between-sql-latin1-general-cp1-ci-as-and

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: adding line break changes execution plan

    Edward-445599 (6/18/2013)


    Bhaskar.Shetty (6/18/2013)


    Whenever you fire same query second time or more, it will be faster anyways as it will pick the result from cache and gives faster results. This may...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Collect data on the basis of timestamp from a table in a view

    nidhi.finance1 (6/16/2013)


    My requirement is to show this data in this format in a view to show asset value on 3 days i.e. Today, before 7 days, before 30 days:

    L_Limit ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

Viewing 15 posts - 1,606 through 1,620 (of 2,452 total)