SQL Random Select Rows from Multiple Columns

--The table has 3 Rows of random words and one row of file extensions

--Goal is to create a random file name and extension for our HoneyPot

    select a.FilePart1 + ' ' + b.FilePart2 + ' ' +  c.FilePart3 + '' + d.FilePartExr   from

     (SELECT TOP 1 FilePart1 FROM  [YOUR TABLE HERE].[dbo].[HoneyPot_filename examples] ORDER BY NewID()) a,

     (SELECT TOP 1  FilePart2 FROM  [YOUR TABLE HERE].[dbo].[HoneyPot_filename examples] ORDER BY NewID()) b,

     (SELECT TOP 1  FilePart3 FROM  [YOUR TABLE HERE].[dbo].[HoneyPot_filename examples] ORDER BY NewID()) c,

     (SELECT TOP 1 [FilePartExr] FROM  [YOUR TABLE HERE].[dbo].[HoneyPot_filename examples] ORDER BY NewID()) d

    

Table Definition (CREATE)

--Table definition  

USE [YourDatabase]

GO

/****** Object:  Table [dbo].[HoneyPot_filename examples]    Script Date: 5/3/2016 8:35:21 AM ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

SET ANSI_PADDING ON

GO

Table Definition

CREATE TABLE [dbo].[HoneyPot_filename examples](

    [FilePart1] [varchar](1000) NULL,

    [FilePart2] [varchar](1000) NULL,

    [FilePart3] [varchar](1000) NULL,

    [FilePartExr] [varchar](1000) NULL

) ON [PRIMARY]

GO

SET ANSI_PADDING OFF

GO