Forum Replies Created

Viewing 15 posts - 31 through 45 (of 69 total)

  • RE: datename with varchar data type

    I thought I had that though.... with the 'DATENAME (MONTH...'

    🙁

    Michelle

  • RE: 'replacing' values in a select statement

    Hi GSquared! 🙂

    I could.... but I was hoping to get around that because I would need approval to create a new table. And then heads might...

  • RE: Can this be done????

    dcarpenter,

    If I'm understand correctly, you might want to try this....

    MAX(CASE WHEN table.column = 'value' THEN table.column ELSE NULL END) as [new column name]

    This will esentially pivot a static value that...

  • RE: datediff with numeric and datetime field

    Thanks guys! It works!

    Michelle 😀

  • RE: datediff with numeric and datetime field

    Sorry, John. I should've mentioned that I was trying to convert it to datetime already 'cuz I know that datediff only accepts dates.

    I have no problem convert from varchar,...

  • RE: Query Help

    Hi Allister,

    Here's the resolution with a slightly different approach, if you're interested.

    SELECT

    CRM_PartsLabor.TRANSACTION_ID as [Service Order ID]

    , CRM_PartsLabor.DESCRIPTION as [Part Desc]

    , CRM_Confirmations.POSTING_DATE as [Date Consumed]

    , CRM_StatusCodes.USER_STATUS as [Part Status]

    ,...

  • RE: Query Help

    Hi Allister,

    I took a look at it and there were a couple syntax errors that I fixed. But I'm still getting this error:

    (15333 row(s) affected)

    (15333 row(s) affected)

    SELECT [Service...

  • RE: Query Help

    Ah yes, of course!

    I gave it a try and here are my results:

    Service Order ID Part No Part Desc Date Consumed Part Status ...

  • RE: Query Help

    Yes, I tried it. But it doesn't give me an output, it just says, '(15333 row(s) affected)'. I know getting an output be very simple, but I'm feeling...

  • RE: Query Help

    Hi Allister, thanks for your advice!

    Yes, the CRM_Partners is known ahead of time.

    The error I get with the query is:

    Msg 156, Level 15, State 1, Line 16

    Incorrect syntax...

  • RE: Query Help

    I had another idea, I think I was missing something from Jeff's solution.

    This is the other script I came up with but I still get an error.

    --===== Conditionally drop, then...

  • RE: Query Help

    Thanks Allister, what you said made sense! And is now obvious to me, I think I was sitting in front of the screen way too long! :doze:

    But I'm...

  • RE: Input form to populate SQL table.

    Hi Jona,

    I would use Visual Studio, you'll want to make sure you have the BI package installed which will include the reporting services.

    Here are some steps that I hope will...

  • RE: Query Help

    Hmm Mmm, I tried that and read your comments very carefully. But when you re-iterated it again it started making a little more sense. I think I'm really...

  • RE: Query Help

    I checked the BOL too, it didn't help me with my current situation and it did help me understand a little better.

Viewing 15 posts - 31 through 45 (of 69 total)