Click here to Skip to main content
15,849,829 members
Home / Discussions / Database
   

Database

 
AnswerRe: SQL Server 2010, smalldatetime insert Pin
Victor Nijegorodov1-Jun-21 22:49
Victor Nijegorodov1-Jun-21 22:49 
AnswerRe: SQL Server 2010, smalldatetime insert Pin
jkirkerx2-Jun-21 9:47
professionaljkirkerx2-Jun-21 9:47 
QuestionGet columns name Pin
_Flaviu28-May-21 0:55
_Flaviu28-May-21 0:55 
AnswerRe: Get columns name Pin
Victor Nijegorodov28-May-21 1:22
Victor Nijegorodov28-May-21 1:22 
GeneralRe: Get columns name Pin
_Flaviu3-Jun-21 6:57
_Flaviu3-Jun-21 6:57 
GeneralRe: Get columns name Pin
Victor Nijegorodov3-Jun-21 21:13
Victor Nijegorodov3-Jun-21 21:13 
GeneralRe: Get columns name Pin
_Flaviu3-Jun-21 21:37
_Flaviu3-Jun-21 21:37 
GeneralRe: Get columns name Pin
Victor Nijegorodov3-Jun-21 22:48
Victor Nijegorodov3-Jun-21 22:48 
I'd implement such a "trick" in a stored procedure that gets a query as an argument, then creates the temporary View, uses
SQL
SELECT [TABLE_NAME]
      ,[COLUMN_NAME]
  FROM [INFORMATION_SCHEMA].[COLUMNS]
  where TABLE_NAME = <your_temp_view>
to return the recordset with the tables/columns names,
then delete the temp view.

PS: this should work with SQL Server 2008 and above.
GeneralRe: Get columns name Pin
_Flaviu4-Jun-21 0:33
_Flaviu4-Jun-21 0:33 
GeneralRe: Get columns name Pin
Victor Nijegorodov4-Jun-21 1:55
Victor Nijegorodov4-Jun-21 1:55 
AnswerRe: Get columns name Pin
Gerry Schmitz4-Jun-21 8:02
mveGerry Schmitz4-Jun-21 8:02 
GeneralRe: Get columns name Pin
Victor Nijegorodov4-Jun-21 8:21
Victor Nijegorodov4-Jun-21 8:21 
GeneralRe: Get columns name Pin
Gerry Schmitz4-Jun-21 8:54
mveGerry Schmitz4-Jun-21 8:54 
GeneralRe: Get columns name Pin
Victor Nijegorodov4-Jun-21 9:02
Victor Nijegorodov4-Jun-21 9:02 
GeneralRe: Get columns name Pin
Gerry Schmitz4-Jun-21 10:01
mveGerry Schmitz4-Jun-21 10:01 
GeneralRe: Get columns name Pin
Victor Nijegorodov4-Jun-21 10:47
Victor Nijegorodov4-Jun-21 10:47 
AnswerRe: Get columns name Pin
Mycroft Holmes4-Jun-21 13:43
professionalMycroft Holmes4-Jun-21 13:43 
AnswerRe: Get columns name Pin
mverbeke31-Aug-21 4:59
mverbeke31-Aug-21 4:59 
SuggestionRe: Get columns name Pin
Richard Deeming31-Aug-21 5:50
mveRichard Deeming31-Aug-21 5:50 
QuestionSQL statements Pin
Erick Kaira27-May-21 9:09
Erick Kaira27-May-21 9:09 
AnswerRe: SQL statements Pin
Victor Nijegorodov27-May-21 9:40
Victor Nijegorodov27-May-21 9:40 
AnswerRe: SQL statements Pin
SeanChupas27-May-21 10:02
SeanChupas27-May-21 10:02 
QuestionRe: SQL statements Pin
David Crow27-May-21 10:12
David Crow27-May-21 10:12 
AnswerRe: SQL statements Pin
Mycroft Holmes27-May-21 13:19
professionalMycroft Holmes27-May-21 13:19 
QuestionSQL query dilemma Pin
David Crow20-May-21 11:31
David Crow20-May-21 11:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.