Forum Replies Created

Viewing 15 posts - 166 through 180 (of 301 total)

  • Reply To: Performing String Split on items which have been String Split

    There are of course several ways to do this, but since the format is pretty fixed, you could use this:

    DECLARE @TestString VARCHAR(MAX) = N'B0AF47E9-E161-4EAD-A690-99C06E80A4B4_11, 441D9F5D-D4AA-416F-8F09-F70DE5D36644_12';
    With sp_data as...
  • Reply To: What am I doing wrong with this subquery?

    It would obviously be easier to offer help if you'd only provide some kind of test data for us to play around with, and the desired outcome for the test...

  • Reply To: How to group the data by student name and display data in multi level

    kaj wrote:

    Looks like you already have all the data connected. Now you only need to have the data presented in the right way. That task is for reporting tools or...

  • Reply To: How to group the data by student name and display data in multi level

    Looks like you already have all the data connected. Now you only need to have the data presented in the right way. That task is for reporting tools or other...

    • This reply was modified 4 years, 2 months ago by kaj. Reason: typo
    • This reply was modified 4 years, 2 months ago by kaj.
  • Reply To: AND syntax

    Using your own syntax, the query could be:

    SELECT [VALUE] 
    FROM dbo.TABLE_1 t1
    WHERE
    IDMEASURE=(
    SELECT max(IDMEASURE)
    ...
  • Reply To: What am I doing wrong with this subquery?

    You might also want to investigate the aggregate function STRING_AGG(), which should make what I think you want very easy.

    https://docs.microsoft.com/en-us/sql/t-sql/functions/string-agg-transact-sql?view=sql-server-ver15

     

  • Viewing 15 posts - 166 through 180 (of 301 total)