Client Management Suite

 View Only
  • 1.  Conversion failed when converting from a character string to uniqueidentifier

    Posted Jul 11, 2011 09:30 AM

    ns6.9 r13

     

    Hi there guys when i run a query in sql it works, but when adding to ns it fails, saying "Conversion failed when converting from a character string to uniqueidentifier"

    query below:

    SELECT AeXInv_AeX_OS_Internet_Explorer.Version, AeXInv_AeX_AC_Identification.Name, AeXNSVCollectionMembership.CollectionGuid

    FROM AeXInv_AeX_AC_Identification INNER JOIN

    AeXInv_AeX_OS_Internet_Explorer ON AeXInv_AeX_AC_Identification.WrkstaId = AeXInv_AeX_OS_Internet_Explorer.WrkstaId INNER JOIN

    AeXNSVCollectionMembership ON AeXInv_AeX_OS_Internet_Explorer.WrkstaId = AeXNSVCollectionMembership.WrkstaId

    WHERE (AeXInv_AeX_OS_Internet_Explorer.Version LIKE N'8.%') AND

    (AeXNSVCollectionMembership.CollectionGuid = '{91834f88-66b8-4d20-b657-81f5f7e21824}')

     

    when i add it to ns = change the  {91834f88-66b8-4d20-b657-81f5f7e21824} to " _collection" to the query and add an item picker to filter by collection...

    but it keeps on spitting out the error:

    my parameters for the item picker are : NAME: _Collection

                                                             PARAMETER TYPE: item picker

                                                             CLASS FILTER: collections



  • 2.  RE: Conversion failed when converting from a character string to uniqueidentifier
    Best Answer

    Posted Jul 11, 2011 10:00 AM

    Your parameter and variable (in the query) need to be the same case (upper or lower). Also, you need to put a % at the open and close of the parameter.

     

    SELECT AeXInv_AeX_OS_Internet_Explorer.Version, AeXInv_AeX_AC_Identification.Name, AeXNSVCollectionMembership.CollectionGuid   
       
    FROM AeXInv_AeX_AC_Identification    
    INNER JOIN AeXInv_AeX_OS_Internet_Explorer ON AeXInv_AeX_AC_Identification.WrkstaId = AeXInv_AeX_OS_Internet_Explorer.WrkstaId    
    INNER JOIN AeXNSVCollectionMembership ON AeXInv_AeX_OS_Internet_Explorer.WrkstaId = AeXNSVCollectionMembership.WrkstaId   
       
    WHERE (AeXInv_AeX_OS_Internet_Explorer.Version LIKE N'8.%') AND   
       
    (AeXNSVCollectionMembership.CollectionGuid = '%_collection%')



  • 3.  RE: Conversion failed when converting from a character string to uniqueidentifier

    Posted Jul 14, 2011 07:19 AM

    thanks j......

     

    was staring at the code so long, could not see anything anymore.... thanks again.