Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [SqlFunction(
- DataAccess = DataAccessKind.Read,
- FillRowMethodName = "List_FillRow",
- TableDefinition = "Date datetime, Quantity int")]
- public static IEnumerable ListCount(...)
- {
- using (SqlConnection con = new SqlConnection(connectionStringToSERVER2))
- { ... }
- return list;
- }
- CREATE PROCEDURE [dbo].[sp_Reports_NumaraSpalariJetWash]
- BEGIN
- DECLARE curs CURSOR
- LOCAL STATIC READ_ONLY FORWARD_ONLY
- FOR
- SELECT ...
- OPEN curs
- FETCH NEXT FROM curs
- INTO ...;
- WHILE @@FETCH_STATUS = 0
- BEGIN
- INSERT INTO ...
- (...)
- SELECT Date, Quantity
- FROM dbo.ListCount(...)
- FETCH NEXT FROM curs
- INTO ...;
- END
- END
Add Comment
Please, Sign In to add comment