Forum Replies Created

Viewing 15 posts - 4,696 through 4,710 (of 5,504 total)

  • RE: How to get True /False

    I mixed old and new variables. Sorry.

    select case

    when cast(@FromTIME as datetime) BETWEEN @a AND @b

    or cast(@ToTime as datetime) BETWEEN @a AND @b

    then 'already'

    else 'can'

    end

    Side note:

    I too accept...

  • RE: How to get True /False

    You could declare two variables holding min and max time

    declare @a datetime,

    @b-2 datetime

    select @a= min(FTIME),@b=max(TTIME) from @TEMP

    select case

    when cast(@FromTIME as datetime) BETWEEN @a AND @b-2

    ...

  • RE: How to get True /False

    parthi-1705 (12/2/2009)


    Hi

    I have Attached my Requirement

    In Q1 (File Name) The O/P is True it is correct because 12:01:00 to 12:59:00 lies between the Temp table Range of 11:31:00...

  • RE: Percentage in Case statement

    TheSQLGuru (12/1/2009)


    Isn't this the best solution for the stated problem?

    select Total, Type1Count, Type1Count*100.0/Total as Perc1, Type2Count, Type2Count*100.0/Total as Perc2

    FROM (

    select count(*) as Total,

    ...

  • RE: How to get True /False

    What exactly are you trying to do?

    What are your expected results based on given parameter?

    I tested Nabhas solution and it works just fine.

    Is it possible that you still try to...

  • RE: collation conflict

    As an alternative you can define the collation of your temp table onlyy, not facing the pain Jeff mentioned.

    That's basically the reason why I recommended to figure out the collation...

  • RE: Combine overlapping datetime to return single overlapping range record

    Please provide sample data as described in the first link in my signature together with what you've tried so far.

  • RE: Date peak category

    Is "USD23,185" just a given number or is it based on anything else?

    I can't see any logical way to calculate the value as above based on the sample data you...

  • RE: datetime variable in where condition

    You're very welcome.

  • RE: datetime variable in where condition

    your data in the table does not match your variable setting.

    The value of your variable is 2009-11-16 00:00:00.000, but the value in your table is 12 hours ahead: 2009-11-16 12:00:00.000.

    It...

  • RE: How to copy specific nodes from one XML document to another using xls

    It's not really clear what you're looking for.

    It seems like all you're trying to do is to eliminate one node level (like NodeA, NodeB, NodeB1 a.s.o.). Is that what you...

  • RE: How to import data from excel file into mysql

    Bru Medishetty (11/27/2009)


    How about this MySQL Server 😛

    Wouldn't be a valid result of the equation...

    Btw: Adding a simple space to your suggestion would turn it into "My" SQL...

  • RE: Updating Date-time Field takes long

    Your execution plan does not really support your statement in terms of duration.

    It looks like it's done within 13 milliseconds and not 11 seconds a stated in your original post.

    The...

  • RE: How to import data from excel file into mysql

    Well, I probably have to use some math in the future to figure out what the post is about.

    In this case it would be something like:

    [import data from excel file...

  • RE: How to import data from excel file into mysql

    Bru Medishetty (11/27/2009)


    I think so, coz he said so.

    amitsingh308 (11/27/2009)


    Hi every body

    Can anyone help me to guide how can i import data from excel file to mysql table.

    ....

    Please...

Viewing 15 posts - 4,696 through 4,710 (of 5,504 total)