But how do I make a LINESTRING with them?

Now this works below but notice it has just and X and Y coordinate.

INSERT INTO Wells.[Shapes](UWI,CompletionDate,GeomShape)

VALUES(05123050300000,'2016/05/05',geometry::STGeomFromText('LINESTRING (100 100, 20 180, 180 180)', 0))

The first table I have has many points that relate to one well id. The table has all three, x,y, and z. I can read all the points for that one well and then make a LINESTRING but the 'z' coordinate I have no idea where to put.

Is it this way::

INSERT INTO MinOwn.ihs.[297Shapes](UWI,CompletionDate,GeomShape)

VALUES(05123050300000,'2016/05/05',geometry::STGeomFromText('LINESTRING (100 100 99, 20 180 94, 180 180 77)', 0))

Where the extra 99 or 94 or 77 is the 'Z' coordinate?

Thanks!