Viewing 15 posts - 91 through 105 (of 919 total)
Just logging in to the domain doesn't get you anything in SQL Server. If your login gives you administrator rights on the box SQL Server is running on, you'd...
July 2, 2013 at 3:33 pm
So, you need to either get permissions to create tables granted to the account you're using, or use another account that already has those permissions. Both those messages indicate...
July 2, 2013 at 3:22 pm
Ok, so on to the next possible issue. Does the accout this is running under have permissions to create tables in the archive database? What is the exact...
July 2, 2013 at 3:11 pm
So it will try to create your archive table in db1, since that's the DB it's operating in. Is that what you want? If your source and your...
July 2, 2013 at 3:01 pm
The way your statement is written, the tables would be in the same database. You need to qualify them with db and schema:
'SELECT * INTO db1_archive.dbo.tbl1_' + @thruPeriod +
'...
July 2, 2013 at 2:45 pm
How about:
select airport,
thedate,
case when delay1 <> 0 then 'delay1'
...
July 1, 2013 at 4:15 pm
Sean has the best idea. His implementation will be far better behaved than the code I posted.
June 27, 2013 at 1:44 pm
Sis,
Provided you don't have '.' anywhere except as a decimal separator:
alter FUNCTION dbo.fnExtractDigits (@inString VARCHAR(8000))
RETURNS VARCHAR(8000) AS
BEGIN
DECLARE @X VARCHAR(100)
Select ...
June 27, 2013 at 1:11 pm
What else does the job do? Are there other tasks it performs or other parts of the script that invokes the stored proc?
June 24, 2013 at 4:48 pm
Sorry, I may have misread the OP. You can't, as has been previously stated, do the dynamic SQL inside a function. Does this have to be in a...
June 17, 2013 at 4:51 pm
One way is to put the result into an already created temp table and select it after the 'exec'.
DECLARE @sql varchar(max),@tablename varchar(max) = 'sys.syscolumns', @Results bigint
create table #temp2...
June 17, 2013 at 4:47 pm
What about giving them permissions to run sp_start_job?
June 17, 2013 at 10:34 am
How close to real-time does this have to be? Maybe you can just have the users post a 'request' to a table and have a job that runs frequently...
June 17, 2013 at 10:19 am
Not sure your join makes sense. You'll need to fill in the question marks below, but this removes the mixed join types:
FROM S_OPERATION
JOIN S_CUSTOMER SENDER
ON S_OPERATION.SENDER_ID = SENDER.C_CUSTOMER_ID
JOIN S_CUSTOMER...
June 5, 2013 at 3:44 pm
If the number of columns changes by row and the delimiters aren't constant, BCP is not really a good solution for this. You could bcp the whole row into...
May 30, 2013 at 10:01 am
Viewing 15 posts - 91 through 105 (of 919 total)