Viewing 15 posts - 6,001 through 6,015 (of 7,636 total)
The only way to pass something back from Dynamic SQL is through a Table: temporary or permanent (table vars will not work).
You can pass limited info back through an Error...
August 7, 2008 at 2:18 pm
Yes. In the SSMS Explorer pane, right-click on the database and pick "Tasks > Generate Scripts". From these script drops for all of your tables, and include "Dependent...
August 7, 2008 at 2:06 pm
kevriley (6/24/2008)
Anyone...
August 7, 2008 at 1:55 pm
Actually, it's a different error now. This should do it:
SELECT
DATEADD(minute,(convert(bigint,lastlogon)*100.0/POWER(10, 9) - (CONVERT(bigint, DATEDIFF(minute, '1/1/1801', '1/1/1953')) * 60))/60, '1/1/1753') AS date
from dbo.smx_empdirectory
August 7, 2008 at 12:45 pm
You wrote your stored procedure to require 5 parameters and you are not passing any to it.
How can we help you with that?
August 7, 2008 at 12:12 pm
Actually, I think that this will fix Jack's original code:
SELECT
DATEADD(minute,(convert(bigint,lastlogon)*(100/POWER(10, 9)) - (CONVERT(bigint, DATEDIFF(minute, '1/1/1801', '1/1/1953')) * 60))/60, '1/1/1753') AS date
from dbo.smx_empdirectory
August 7, 2008 at 12:07 pm
Folks:
For What It's Worth: I sincerely doubt that I would have gotten this question right myself. I am pretty sure of that because I have actually tripped...
August 7, 2008 at 11:57 am
Melville (8/7/2008)
August 7, 2008 at 11:51 am
Andy DBA (8/7/2008)
RBarry,...
I'll say it again: Great article!
I'll bet you never thought it would generate so much discussion!
Thanks, Andy. And yeah, I thought that hardly anyone would even be...
August 7, 2008 at 11:36 am
August 7, 2008 at 9:04 am
GilaMonster (8/7/2008)
rbarryyoung (8/7/2008)
Downloaded RTM last night, can't install it until tomorrow though...
I started downloading it last night, stopped when I noticed the size. 3 GB download will use my entire...
August 7, 2008 at 8:43 am
Festeron (8/7/2008)
There are problems with the question, though.Why is @b-2 declared and never used?
Where is @b-17? Answer B cannot be correct
Yikes! You are right, "@b" shouldn't be...
August 7, 2008 at 8:38 am
You can however, use Schemas to have a similar naming and organizational format. But it is still a lot different.
August 7, 2008 at 8:28 am
Viewing 15 posts - 6,001 through 6,015 (of 7,636 total)