Forum Replies Created

Viewing 14 posts - 1 through 15 (of 15 total)

  • RE: Parameters that are empty

    Cool will look into that. I am using 2005.

  • RE: splitting a parameter on delimiter

    I TOTALLY agree about this database but....it was brought over from access which was created by a non DBA or webdeveloper and I was hired to get a site up...

  • RE: Parameters that are empty

    It would be but I am passing in a delimited parameter. These Params are filled from the user making multiple selections from the listbox or if no selection is...

  • RE: splitting a parameter on delimiter

    Got it....did a OR and that worked.

    AND (PM1.PM70.Projects.Project_Manager = (case when @PM is null

    then PM1.PM70.Projects.Project_Manager END)

    OR

    CHARINDEX('~' + PM1.PM70.Projects.Project_Manager + '~', @PM ) > 0)

  • RE: splitting a parameter on delimiter

    Here is the whole sp....I think its something else in it but I can't figure it out. I am sooooo close.

    USE [PM1Time]

    GO

    /****** Object: StoredProcedure [dbo].[GET_Hour_Info_NULL_MJH] ...

  • RE: splitting a parameter on delimiter

    I got same error with convert. I could send my whole sp if you would like?

    AND PM1.PM70.Projects.Project_Manager =

    (case when @PM is null then PM1.PM70.Projects.Project_Manager

    ELSE convert (char(1),...

  • RE: splitting a parameter on delimiter

    Ok. Did this.

    AND PM1.PM70.Projects.Project_Manager = (case when @PM is null then PM1.PM70.Projects.Project_Manager

    else CHARINDEX( '~' + PM1.PM70.Projects.Project_Manager + '~', @PM) > 0 end)

    But still receive error Incorrect syntax...

  • RE: splitting a parameter on delimiter

    Like this? else CHARINDEX( @PM,'~' + PM1.PM70.Projects.Project_Manager + '~' ) > 0) end)

    Cause it still gives the error. Incorrect syntax near '>'

  • RE: Parameters that are empty

    I think I got it figured out. Kind of using DUAL in Oracle. I found this thread while searching some more after posting. http://www.sqlservercentral.com/Forums/Topic776445-9-1.aspx and utilized the...

  • RE: Parameters that are empty

    Normal environment. The @PM is a nvarchar(I set to 4000) just in case a person selected quite a few from the listbox. I can post the whole sp...

  • RE: alias then join

    SWEET! That worked...Pretty easy now that I look back at it. Thanks a MILLION!! 😀

  • RE: alias then join

    Cool! That worked...now how do I keep it from selecting NULL in the MJH_Number column? Its over 160852 rows and takes a while but if I eliminate the NULL's that...

  • RE: alias then join

    No. It compiles fine but when it runs it does not match whats in the MJH_Number column. I get NULL's nor does it concat the [worked task] column.

  • RE: Random Number Generator in SQL Server?

    Hi I am a noob to sql and am creating a random number generator on sql 2005.  I got some code from a old proc but dont understand one portion.

    SET...

Viewing 14 posts - 1 through 15 (of 15 total)