Forum Replies Created

Viewing 15 posts - 2,746 through 2,760 (of 2,894 total)

  • RE: converting varchar to datetime in spacific format

    to convert string YYYY/MM/DD (which is close to safe ISO8601 format) into datetime you don't need anything other than:

    SET DATEFORMAT ymd

    DECLARE @date AS VARCHAR(10)

    SET @date = '2010/01/29'

    SELECT...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Subquery in Join Vs Subquery in Where Clause

    You can wrap you subquery into CTE or you can use cross apply like this:

    SELECT L.LogTableKey

    ,L.CreateDate

    ...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Invalid length parameter passed to the SUBSTRING function.

    Your error clearly states that it did happen in TRA_BrokenSalesPROCV2

    How you think providing the TRA_BrokenSalesPROCV6 noodles will help to identify the problem, it does not use the SUBSTRING function...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Views

    Have you heard about table partitioning?

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Combining Two Tables or Question

    :w00t::w00t::w00t:Cursor?:w00t::w00t::w00t:

    Why would you need to use a cursor here?

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Combining Two Tables or Question

    You don't want to display the same login multiple times? Try:

    -- SETUP:

    /*

    CREATE TABLE USER_SESSION(

    USER_NUM int NOT NULL,

    LOGIN_DT datetime NOT NULL,

    LOGOUT_DT datetime NULL,

    USER_LOCATION varchar(4000) NULL,

    )

    INSERT INTO USER_SESSION values(228,'2009-10-21 15:37:35.000','2009-10-21 16:34:26.000','192.168.3.126')

    INSERT INTO...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Reject duplicate Time within 01 minute

    Test your code before posting it!

    try:

    CREATE TABLE #Test

    (

    EmployeeID Int,

    LogTime DateTime

    )

    INSERT INTO #Test

    select 1001, '01/01/2010 10:22:36'

    union select 1002, '01/01/2010 10:24:37'

    union select 1003, '01/01/2010 10:24:38'

    union select 1001, '01/01/2010 10:24:39'

    union select...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Duplicate records in the table

    And what is wrong with query I've posted? It does exactly that, if not show the example of data it misses.

    If you don't want to waste yours and others time....

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Need help creating TSQL to indicate 'Multiple Jobs' in a one-to-many relationship

    You are welcome!

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: How to split the column into sql data

    He must be the best student in his year if he provides the homework made by SSC community... :hehe:.

    Having such DBA in the company helps a lot! As it...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Struggling to calculate a percenatge value

    2Tall (6/15/2010)


    Hi. I am trying to display a value as a percentage.

    In the formula below the values calculated manually are as follows:

    SUM of ActualCapacityMinutes = 1010

    SUM of ActivityCentreCapacity = 3465

    =IIF(Sum(ROUND(Fields!ActualCapacityMinutes.value/Fields!ActivityCentreCapacity.Value,0))*100...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Duplicate records in the table

    Both of the solutions givenm whould produce list of duplicates. If it's not what you wanted it is due to your question is unclear as posted.

    Please provide table setup script,...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Need help creating TSQL to indicate 'Multiple Jobs' in a one-to-many relationship

    try:

    ;WITH JobSum

    AS

    ( SELECT t1.GroupID

    ,t1.WeekEnding

    ,SUM(t2.TotalHours) as...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Duplicate records in the table

    ;WITH Dups

    AS

    (

    SELECT productname, colorcode, categoryname, brandname, colorname

    FROM [dbo].[productscolortb_withsize]

    GROUP BY productname, colorcode, categoryname, brandname, colorname

    ...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Mentor

    scott.pletcher (6/15/2010)


    Jeff, you can over-engineer, I'll give you that. Huge amounts of wasted I/O to no purpose. But you feel good about it, and obviously for you that's...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

Viewing 15 posts - 2,746 through 2,760 (of 2,894 total)