question

datacrunch avatar image
datacrunch asked

Marking Parent record in Table

Hello, I have a table that I need to replace the blank rows with the ID above. My table looks like this image. ![alt text][1] I need it to look like this. ![alt text][2] Here is the table data. Thanks! CREATE TABLE dbo.TestTable ( Order_ID VARCHAR(50) NULL, Jurisdiction_Level VARCHAR(25) NULL, INSERT INTO dbo.TestTable (Order_ID, Jurisdiction_Level, Jurisdiction_Name VARCHAR(300) NULL) ON [PRIMARY]; Jurisdiction_Name) VALUES ('114-7990291-5393019', 'State', 'CA'), ('', 'City', 'Not Applicable'), ('', 'County', 'Ventura'), ('', 'District', 'OJAI Tourism Imporovement District'), ('111-3040051-3581839', 'State', 'CA'), ('', 'City', 'Cerritos'), ('', 'County', 'Los Angeles'), ('', 'District', 'Metropolitan Transit District(LAMT)'), ('', 'District', 'Transit District (LACT)'), ('', 'District', 'Transportation Commission(LATC)'); INSERT INTO dbo.TestTable (Order_ID, Jurisdiction_Level, Jurisdiction_Name) VALUES ('114-7990291-5393019', 'State', 'CA'), ('114-7990291-5393019', 'City', 'Not Applicable'), ('114-7990291-5393019', 'County', 'Ventura'), ('114-7990291-5393019', 'District', 'OJAI Tourism Imporovement District'), ('111-3040051-3581839', 'State', 'CA'), ('111-3040051-3581839', 'City', 'Cerritos'), ('111-3040051-3581839', 'County', 'Los Angeles'), ('111-3040051-3581839', 'District', 'Metropolitan Transit District(LAMT)'), ('111-3040051-3581839', 'District', 'Transit District (LACT)'), ('111-3040051-3581839', 'District', 'Transportation Commission(LATC)'); [1]: /storage/temp/4276-image1.jpg [2]: /storage/temp/4277-image2.jpg
cursorcte
image1.jpg (43.6 KiB)
image2.jpg (42.9 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.