Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Evening,
I'm trying to exec a stored procedure into a temporary table so i can join some bits from another table.
Obviously the ideal solution would be to add the join into the SP however this is currently not an option.
Here's what i'm trying to run in my controller action:
db.Query<HomeLatestTradesViewModel>(Sql.Builder .Append("INSERT INTO #tmp_trade") .Append("EXEC get_trade_data_latest") );
Which hits me with:
Invalid object name 'HomeLatestTradesViewModel'.
I believe this is because i need a ; before the EXEC however that just throws an error telling me it shouldn't be there!
Any help getting this to work is appreciated.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Stored procedure to temp table - Patapoco
Evening,
I'm trying to exec a stored procedure into a temporary table so i can join some bits from another table.
Obviously the ideal solution would be to add the join into the SP however this is currently not an option.
Here's what i'm trying to run in my controller action:
Which hits me with:
I believe this is because i need a ; before the EXEC however that just throws an error telling me it shouldn't be there!
Any help getting this to work is appreciated.
is working on a reply...