Forum Replies Created

Viewing 15 posts - 541 through 555 (of 1,923 total)

  • RE: Select Statement with multiple logic

    jonmoli (2/3/2012)


    Hmm...Product Code 1003 has the below possible descriptions, so 1003 will not be retrieved. 🙂

    "Item 3 X Large"

    "Item 3 XX Large"

    Well then OP does not know what (s)he...

  • RE: Select Statement with multiple logic

    jonmoli (2/3/2012)


    Or maybe this? 😎

    select [Product Code], Description, Cost from Table1

    where Description = 'Item 1 X Large' or (Description='Item 1 XX Large' and Cost=25)

    This will retrun both 1001 and 1003....

  • RE: Need a Help

    How about this?

    DECLARE @Message Table ( ContenID INT , ContentMessages VARCHAR(2000))

    INSERT INTO @Message (ContenID, ContentMessages)

    SELECT 1, 'We have not received a payment for your loan account. this is debt collecor.'

    INSERT...

  • RE: Max Value from 3 columns

    How about this?

    ; With EachRowMaxCol AS

    (

    SELECT CASE WHEN ID1 >= ID2 AND ID1 >= ID3 THEN ID1

    ...

  • RE: Help with DatePart or Dataadd view script?

    You cannot create parameterized views. You may either create a Stored Procedure or Table-valued function to do the task.

  • RE: Help with DatePart or Dataadd view script?

    Then Loundy's post will help you 🙂

  • RE: Help with DatePart or Dataadd view script?

    Data from an excel file? You mean, SQL query to retreive data directly from excel file?

    Or do u have a staging table (which is the loaded with data extracted from...

  • RE: Help me

    vantuan02t1 (1/30/2012)


    but can you write sql select for me, please.

    Unfortunately, i can't mate , cuz i'm not getting paid for that :w00t:

    I have given u an algorithm, cant you...

  • RE: Help me

    Algorithm:

    1. Join Category and CategoryDetail on CategoryID

    2. Use ROW_NUMBER on CategoryDetails's ID column ascendingly parititioning by CategoryID

    3. Put them in a CTE

    4. Retreive only row_number = 1 rows

    Now that...

  • RE: Trimming data from cells.

    How about this?

    DECLARE @Table TABLE ( EmailID VARCHAR(100) )

    INSERT INTO @Table (EmailID)

    SELECT 'Blah@blah.blah,0011'

    UNION ALL SELECT 'Lol@lol.lol,0078'

    UNION ALL SELECT 'Rofl@rofl.rofl,0023'

    SELECT REVERSE(...

  • RE: displaying x y into 5x5 result set

    If it is 50x50, then we may need to little tweaks in determining the vertical and horizontal boundaries. If you need assistance, please PM me with sample data 🙂

  • RE: displaying x y into 5x5 result set

    kevmck (1/24/2012)


    What you gave me ran quickly, and seems to work fantastically with my test data thanks - I'm going to build this into my bigger real world solution and...

  • RE: Select based on date

    Anish..

    Welcome to SQLServerCentral.com aka SSC.com..please take a look at this[/url]article by Jeff Moden on how effectively you can ask a question. You have put your business requirement but not the...

  • RE: displaying x y into 5x5 result set

    kevmck (1/20/2012)


    I'm out of my office till Monday, but I'll definitely give this one a try then and reply when i run it.. thank you!

    Did the query work for you?

Viewing 15 posts - 541 through 555 (of 1,923 total)