i want sql query

  • i have 3 tables

    1st table name tagtable in that columns are tagname,tagindex,tagtype,tagdatatype

    2nd table name floattable in that columns are dateandtime,millitm,tagindex,val,status,marker

    3rd table name stringtable in that columns are dateandtime,millitm,tagindex,val,status,marker

    i want to take output like this

    tagindex val

    0 dgf

    1 fdsf

    2 dfgd

    3 tert

    4 rtret

    5 ret

    6 rtret

  • Please follow the second link in my signature on posting code & data, but we will need DDL, sample data, logic and expected outcome.

    With that information we will be able to help you.

  • we are looking for something like this, that anyone on the interwebz can copy and paste so we can build sample queries for you to test with:

    CREATE TABLE [dbo].[TAGTABL] (

    [TAGNAME] VARCHAR(max) NULL,

    [TAGINDEX] VARCHAR(max) NULL,

    [TAGTYPE] VARCHAR(max) NULL,

    [TAGDATATYPE] VARCHAR(max) NULL)

    CREATE TABLE [dbo].[FLOATTABL] (

    [DATEANDTIME] VARCHAR(max) NULL,

    [MILLITM] VARCHAR(max) NULL,

    [TAGINDEX] VARCHAR(max) NULL,

    [VAL] VARCHAR(max) NULL,

    [STATUS] VARCHAR(max) NULL,

    [MARKER] VARCHAR(max) NULL)

    CREATE TABLE [dbo].[STRINGTABL] (

    [DATEANDTIME] VARCHAR(max) NULL,

    [MILLITM] VARCHAR(max) NULL,

    [TAGINDEX] VARCHAR(max) NULL,

    [VAL] VARCHAR(max) NULL,

    [STATUS] VARCHAR(max) NULL,

    [MARKER] VARCHAR(max) NULL)

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Side note - Think I have just found my new avatar

  • Awesome...

    Jared
    CE - Microsoft

  • Can you also please add expected results to the placard the gentleman holds? :w00t:

  • Done!

    I made this because i really do feel we are begging for the same thing all the time!

    ColdCoffee (7/18/2012)


    Can you also please add expected results to the placard the gentleman holds? :w00t:

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Lowell (7/18/2012)


    Done!

    I made this because i really do feel we are begging for the same thing all the time!

    I concur 100% and thank you, Lowell 🙂

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply