Forum Replies Created

Viewing 15 posts - 3,706 through 3,720 (of 4,087 total)

  • RE: How to Left Justify Results

    Jnrstevej (6/21/2011)


    I'm under the impression that if i could get the column(item) to align to the LEFT in the select statement when its exported this should in theory solve my...

  • RE: How to Left Justify Results

    Justification is a presentation issue and T-SQL is not designed to be a presentation layer, so it has no support for presentation, although you can use string manipulation functions to...

  • RE: Need help in writting SQL

    Garadin (6/17/2011)


    Here's one way. This is assuming that ItemName can uniquely identify the items.

    The fact that he's COPYING the records including the ItemName guarantees that the ItemName cannot uniquely...

  • RE: Best way to alias column names

    Phil Parkin (6/17/2011)


    If you write a lot of T-SQL, consider doing yourself a favour and omit the readability words (AS is one) - it soon becomes second nature and as...

  • RE: Displaying week by week(only week days not weekends) between two dates

    You're very long if structure can be replaced with a simple formula.

    SELECT DateAdd(Week, DateDiff(Week, 0, GetDate()), 0)

    The formula takes advantage of the fact that date 0 fell on a Monday.

    The...

  • RE: SQL Query for MI Report

    A couple of things that I wanted to point out.

    * You use this formula repeatedly in your query DATEADD(MINUTE,-@interval,DATEADD(MINUTE,N*@interval,@starttime)) I moved it into the CTE so that I...

  • RE: Replace data in View Query

    bpmosullivan (6/14/2011)


    Got the following query to run but it is not applying the case argument. Any ideas appreciated ?

    WITH CTE AS (

    ...

  • RE: Selecting Rows Based on condition

    It's not clear what order you want to apply your criteria, and it will affect the exact query used.

    When you have multiple records, do you want to find the last...

  • RE: Verify my warning trigger

    This came up in another thread recently, but I can't find it right now.

    If it requires user interaction, it really belongs in the front end. Triggers are about as...

  • RE: Modify trigger

    There are far deeper problems with the trigger than the multiple subselects.

    If you are only inserting one record, this trigger does ABSOLUTELY NOTHING. If you update column A in...

  • RE: Insert query generating error

    SKYBVI (6/8/2011)


    The index key columns are

    attribgroup asc char (21)

    itemattrib asc char (21)

    seqnumber asc int

    Are these columns NULLABLE? Do they have DEFAULTs?...

  • RE: Date conversion help

    npeters 86796 (6/7/2011)


    I have the query below which will be used in ssrs.

    the problem i have is that i need to query data using the month in the where clause...

  • RE: Insert query generating error

    Did you change this in the main query or the subquery? Changing this in the subquery won't have any real effect on the outcome.

    Drew

  • RE: Extracting the db name from log file

    The last parameter in SUBSTRING() is number of characters, not the ending position. If the length of the string is 30, you're asking for 28 characters from an 8...

  • RE: Insert query generating error

    You probably have duplicate values in your IV00101 table, so even though they don't exist in your target table, they produce duplicate values when they are both inserted. Try...

Viewing 15 posts - 3,706 through 3,720 (of 4,087 total)