2
Contributors
5
Replies
7
Views
8 Years
Discussion Span
Last Post by sknake
0
IF OBJECT_ID('TestTable', 'U') IS NOT NULL DROP TABLE TestTable
Create Table TestTable
(
  Col1 varchar(30),
  Col2 varchar(30)
)
Insert Into TestTable (Col1, Col2) Values ('a', 'b')
GO

IF OBJECT_ID('tempdb..#Temp', 'U') IS NOT NULL DROP TABLE #Temp
Create Table #Temp
(
  Col1 varchar(30),
  Col2 varchar(30)
)

GO 

--Now we have our test data setup

Insert Into #Temp (Col1, Col2)
Select
(Select Top 1 Col1 From TestTable) As Col1,
(Select Top 1 Col2 From TestTable) As Col2

Select *
From #Temp
0

I got unspecified error
this is my code:

("insert into Results (cnt, a_q1) select(select count (*) from Answers) as cnt, (select count(*) from Answers where answer_q1='ضعيف')as a_q1")

0

Good deal

Please mark these threads as solved as you have found an answer to your question and good luck!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.