Abhilash J A

Abhilash J A

  • 530
  • 2.4k
  • 600.1k

Temp table creation issue in sql server

Jun 7 2016 2:22 AM
Hello Sir,<br /><div> How can I insert data without having null in each records using this temp table creation?</div><div> </div><div>&nbsp;</div><div> CREATE TABLE #InputIdTable (<br /> GradeId int,BrandsIds int,ItemsIds int,ProgramIds int,dayspar varchar(200)<br /> )<br /> <br /> INSERT INTO #InputIdTable (GradeId)<br /> SELECT DISTINCT<br /> *<br /> FROM SplitDelimiterString('15,2,3,8', ',')<br /> INSERT INTO #InputIdTable (BrandsIds)<br /> SELECT DISTINCT<br /> *<br /> FROM SplitDelimiterString('11,28,3,', ',')<br /> INSERT INTO #InputIdTable (ItemsIds)<br /> SELECT DISTINCT<br /> *<br /> FROM SplitDelimiterString('18,2,63,', ',')<br /> INSERT INTO #InputIdTable (ProgramIds)<br /> SELECT DISTINCT<br /> *<br /> FROM SplitDelimiterString('11,42,30,', ',')<br /> INSERT INTO #InputIdTable (dayspar)<br /> SELECT DISTINCT<br /> *<br /> FROM SplitDelimiterString('Sun,Mon,Tue', ',')&nbsp;</div>

Answers (1)