Viewing 15 posts - 9,196 through 9,210 (of 9,399 total)
Another thing to consider is that the foreign key needs to be the same data type as the primary key.
When considering what to make your primary key, you should take...
June 11, 2013 at 12:43 pm
Right - using this approach, if the procedure has multiple active result sets (I think this is called MARS) only the first one is inserted into the output table. ...
June 11, 2013 at 7:17 am
When you get your full solution done, please post it if you don't mind. I, for one, am interesting in seeing how you did it.
June 11, 2013 at 6:56 am
It worked with no parameters, but since sp_spaceused has multiple active result sets, only the first one was inserted into TempSomeTable.
SELECT *
INTO TEMPSomeTable
FROM OPENROWSET ('SQLOLEDB','Server=server_name,9999;TRUSTED_CONNECTION=YES; Initial...
June 11, 2013 at 6:14 am
Krishna1 (6/11/2013)
create table remarks ( remark varchar(1000)
The code above couldn't be the code you actually ran, since the statement is an error and the procedure isn't telling us anything. ...
June 11, 2013 at 5:57 am
You know, SELECT INTO...EXECUTE or EXECUTE...INTO seems a lot more intuitive. Maybe in a future version?
June 11, 2013 at 5:44 am
Right - the SELECT INTO is for tables, but not procedures. I would definitely use SELECT INTO...EXECUTE if it existed. I'm glad I didn't just miss it.
June 10, 2013 at 10:04 am
I've never tried to SELECT INTO with the results of a stored procedure. How would you go about doing that?
June 10, 2013 at 9:46 am
No problem. Glad I was able to help.
June 10, 2013 at 8:16 am
This is a duplicate post of http://www.sqlservercentral.com/Forums/Topic1457697-391-1.aspx.
June 10, 2013 at 8:02 am
This is a duplicate post of http://www.sqlservercentral.com/Forums/Topic1461260-391-1.aspx.
June 10, 2013 at 7:54 am
The COUNT function above is excluded because it's commented out with a --.
Let's first strip the query down a bit. What does this return?
SELECT COUNT(*)
FROM load_sched t1
...
June 10, 2013 at 7:45 am
I've always done this by first creating a table to receive the data from the stored procedure. Then populate it like this:
INSERT INTO table_name EXECUTE sp_name;
Since the results generated...
June 10, 2013 at 7:31 am
However the columns are named, you can use the query from the first structure to discern the query for your actual table structure. Also, don't discount Jeff's post about...
June 7, 2013 at 10:48 am
Excellent - thanks very much for the tip. I'm going to have to try this one.
June 6, 2013 at 12:45 pm
Viewing 15 posts - 9,196 through 9,210 (of 9,399 total)