|
<< Click to Display Table of Contents >> Navigation: iVend Database Database > Stored Procedures > uspGetSQLSchemaInfo Stored Procedure |
Navigation: iVend Database Database > Stored Procedures >
iVend 6.6 Database Help
uspGetSQLSchemaInfo Stored Procedure
Collapse All Expand All
iVend Database Database : uspGetSQLSchemaInfo Stored Procedure |
Properties
Creation Date |
9/18/2015 10:23 AM |
Encrypted |
|
Ansi Nulls |
|
Parameters
Parameter |
Direction |
Description |
Data Type |
Size |
@SQLSatement |
In |
|
VarWChar |
1073741823 |
@RETURN_VALUE |
Return Value |
|
Integer |
4 |
Procedure Source Code
-- [uspGetSQLSchemaInfo] 'Select * from customer,address' CREATE PROC [dbo].[uspGetSQLSchemaInfo] @SQLSatement nvarchar(max) AS Begin if(@SQLSatement='') return Declare @ColumnSQLStatement nvarchar(max) SET @ColumnSQLStatement='Declare cursorGetSchemaInfo Cursor For ' + @SQLSatement + ' FOR READ ONLY SELECT Object_Name(objectid) as table_Name, column_name FROM sys.syscursorrefs scr, sys.syscursorcolumns scc WHERE scr.cursor_scope =2 and scr.reference_name = ''cursorGetSchemaInfo'' and scr.cursor_handl = scc.cursor_handle AND scc.data_type_sql NOT IN (34, 165, 173, 189, 241) --Image, varbinary, binary, timestamp, xml ORDER BY 1 Deallocate cursorGetSchemaInfo' Exec Sp_executesql @ColumnSQLStatement End |
See Also
© 2019 All Rights Reserved.
Send comments on this topic.