Viewing 15 posts - 376 through 390 (of 1,156 total)
Duh, of course, exec. My mind is focused on weekend now
Mine too 😀
March 7, 2008 at 11:25 am
For example, say you use sp_executesql and you have 2 parameters name and city. If you execute this statement
set @sql = 'select * from my table where name =...
March 7, 2008 at 11:23 am
If you use the exec method, SQL server cannot reuse query plans. This means that everytime the code is run SQL server must generate a new query plan. ...
March 7, 2008 at 11:17 am
After briefly looking at the function. I would still use the proposed solution for performance benifts, but will acknowledge that openquery can accomplish the task.
March 7, 2008 at 11:11 am
I'm not so sure that's true, Adam. I believe you can use OPENQUERY for this.
This is what I get for speaking in absolute :hehe:. Well on a...
March 7, 2008 at 11:05 am
You can only select the results of a stored procedure by dumping the results into a table. You have to make sure that your table has the same number...
March 7, 2008 at 9:46 am
Thanks a bunch - it worked! I tried that earlier with parenthases around the select and it failed.
Sorry for the confusion. I put the parenthases to show...
March 7, 2008 at 9:41 am
You can do something like
INSERT INTO TABLE1
SELECT MY COLUMNS
FROM TABLE2
--WHERE IF NEEDED.
You should be careful that keys and/or unique fields do not overlap.
edited to remove ()
March 7, 2008 at 8:50 am
Hi,
As long as the column on the table has the identity property turned on, this will autogenerate a value for each row imported.
You still need the format file, so...
March 7, 2008 at 8:37 am
BUT... does having an 'exec' embedded in my @strExec string defeat the purpose of using sp_executesql? I am not worried about sql injection in this case so should I...
March 7, 2008 at 8:33 am
I found this procedure from the code repository on this site :).
/*
Server Backup History Report
(Full DB Backups only)
1.lists all databases with no backup history
2.lists last backup for other...
March 6, 2008 at 10:49 am
somehow I posted above the previous post.... :hehe:
March 6, 2008 at 9:33 am
This post is strange because it does not have a question at the beginning.
I need to be able to set a flag from 0 to 1 when the...
March 6, 2008 at 9:32 am
You are right, I was refereing to the report designer in BIDs. You are refereing to the ad-hoc report builder. There should be a similar option for ad-hoc reporting.
March 6, 2008 at 9:07 am
Does the row in question contain anything else or just the one character?
It sounds like your field/column terminator is set incorrectly.
March 5, 2008 at 6:06 pm
Viewing 15 posts - 376 through 390 (of 1,156 total)