Viewing 15 posts - 10,981 through 10,995 (of 18,923 total)
Yup, but a little counter-intuitive for someone with speed in mind. It does appear that the data is agregated twice when in fact it's done only once
November 22, 2006 at 10:52 am
Also this would run MUCH MUCH faster :
Insert into DbName.dbo.Tablename (col1, col2, coln) Select Col1, Col2, Coln from Db2.dbo.TableName.
November 22, 2006 at 9:51 am
Open up the profiler and run this code. Grad the insert statement sent by access. Then rerun it in query analyser. You should get a more usefull error message.
I would...
November 22, 2006 at 9:49 am
You can't refference the count(*) using the column name. You must do something like this :
Select count(*) AS Cnt, sum(ColName) As Total, sum(ColName) / Count(*) as Average
from...
November 22, 2006 at 9:46 am
Please do not cross-post. We lessen your chances of getting the right answer faster by doing so.
Finish this thread here :
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=145&messageid=324845
November 22, 2006 at 7:59 am
What authentication mode are you using?
What login are you using in the connection string??
I use the user_name method and it doesn't give dbo for all the users (for me only...
November 22, 2006 at 7:13 am
Does this answer your question?
IF NOT EXISTS (SELECT * FROM dbo.SysObjects WHERE Name = 'TestIDIns' AND XType = 'U')
BEGIN
CREATE TABLE dbo.TestIDIns
(
ID INT NOT NULL IDENTITY(1,
November 22, 2006 at 7:09 am
Maybe this will work :
set @abc = 'USE ' + @databasename + ' EXEC sp_grantdbaccess ' + @Loginname + ', ' + @UserName
November 22, 2006 at 7:01 am
Lol, why do we always forget about the simplest solution !?!?
November 22, 2006 at 6:46 am
The real question now... why did he design the code that way (business need)?
November 21, 2006 at 2:28 pm
Thanx for letting everyone know
.
November 21, 2006 at 2:26 pm
The cast rounds the value. If you convert to float or decimal you will see 39040.5.
November 21, 2006 at 2:09 pm
Viewing 15 posts - 10,981 through 10,995 (of 18,923 total)