|
thanks man................. i rectified
|
|
|
|
|
Hi All,
I have one strange problem working with my sql server express edition. I have MS SQL Server Express Edition 2005 installed in my computer. When I try to connect to a remote database via Windows authentication I am able to connect to that server successfully. When I try to access the user created database I get an error message –
“The server principal "username" is not able to access the database "dbName" under the current security context”.
But I am successfully able to access all system databases such as master. Also the icon just at the bottom corner of the database server name also does not turn green even after connecting. One more interesting thing is, this problem is happening only to my user id. Rests all in my team are able to access the database using windows authentication with their login id.
I don’t find any problem in working with local database.
Thanks in advance,
Krishnaraj Barvathaya B
|
|
|
|
|
If login to SQL Server via different Windows identified ID than rest of your team, open your login from server and from mapping delete yourself from the database "dbName" , click ok and then add yourself as a user to the database "dbName". Also remember to add relevant roles in the database.
This way your user id should be reset in target database.
|
|
|
|
|
I found answer for this. The reason why I was not able to access the remote data base via Windows authentication was because my user account was not been added as a local admin in the remote computer.
Krishnaraj Barvathaya B
|
|
|
|
|
I have to developed Database comparator tool,i found some source code in .net in this site but not able to find in java.....help required for finding same project in java and oracle is database to compared
|
|
|
|
|
Samarinder wrote: very very urgent ....plz see with high priroty....
No its not, not to me anyway.
Samarinder wrote: I have to developed Database comparator tool,
or did you?
Samarinder wrote: i found some source code in .net in this site
Sounds like you used copy paste
Samarinder wrote: but not able to find in java.....
so you can claim to have written it in java too?
Try google.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi ,
How to use a variable which consists of the sql statement to be used for my cursor . At present the following code gives error
create PROCEDURE spGetAssetRecords
@sSQL varchar(8000)
As
DECLARE c2 CURSOR READ_ONLY
FOR
@sSQL
regards
Vijay
|
|
|
|
|
got it
set @sSQL='declare c2 cursor READ_ONLY for ' + @sSQL
exec(@sSQL)
|
|
|
|
|
hi,
i have a team_standing_table that is ordered by points and wins etc.
i would like to know the row number or position of a particular team.
what is the row number that has man utd? or chealsea?
(How to get the team in 1st,2nd, 12th etc i already know not the issue here)
Thanks
nelsonpaixao@yahoo.com.br
|
|
|
|
|
assuming SQL Server 2005, add the following column
ROW_NUMBER() OVER(ORDER BY Points)
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
SELECT ROW_NUMBER() OVER (ORDER BY team_name ASC) AS ROWID, * from teams
where team_name like '%man utd%'
ROWID will give u the row number
chilll
remember me in your prayers
take care
FEEAMANALLAH
AHSAN SARFRAZ
UNIVERSITY OF ENGINEERING AND TECHNOLOGY TAXILA PAKISTAN
COMPUTER SYSTEM ENGINEERING DEPARTEMENT
|
|
|
|
|
For each group I wants to set an UniqueId like this.
ID UniqueId
3 1001
3 1001
4 1002
4 1002
5 1003
5 1003
6 1004
6 1004
7 1005
7 1005
How can I.
Thanks in advance.
G Nathan
|
|
|
|
|
I don't understand you!
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you then save my time by voting my post.
|
|
|
|
|
|
Hi all,
I have a table containing a 4-byte int column, the largest value of which is 1354552. If I read that value into a C++ int using Carlos Antollini's ADO library here on CP, it returns -21704. The column started out as a bigint but got cut back, but none of the values in it were too big for an int.
Any ideas please?
Solved - there's already a patch on the project page. Note to self: search first, ask later.
Last modified: 40mins after originally posted --
|
|
|
|
|
Hi,
I am working in an application, where only select statement can be used. This is to create a report.
I need one column, where the data should be calculated according to a formula.
Base salary * no of months.
If the salary is same throughout the year it is base salary * 12.
If it changes in b/w, say 4 months, then it is (base salary * 4) + (new base salary * 8)
Another report has the details of the salary of all the months for that person. I can pull that column in this report. But the final report should have only one row for one person
Please help me with this.
Thanks a lot in advance...
|
|
|
|
|
Try creating a function to return the value. The performance won't be great, but it will do the job.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
You can do it as a sub select. Trying to do it the way you describe is the most difficult methos and wuld require the UDF.
(Select Sum(Salary) from Table where Year = 2007) Salary
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
I am using virtual tables a lot (declare @my_table ...). Sometimes i have columns that accept null so inner join don´t work because doesn´t appear all values that are suposse to appear, and sometimes not either isnull() cleans that, if you know what i mean.
So, other day i got a +200 store procedure by use of virtual table. But it worked fine.
Now i have to copy a part of it to use in a bigger one.
Can anyone help me here
nelsonpaixao@yahoo.com.br
|
|
|
|
|
You want someone to do your coding? Or do you need instruction on copy paste?
I don't understand the 200+ reference (lines?)
Why don't you try breaking the proc down to sub procs. The bit you need to copy, cut it out of the original and make it produce the same results as the current code calling it as a sub proc. Then just include it in the "bigger" proc, you can also do this as a UDF that returns a table used by multiple procs.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: You want someone to do your coding?
That's the OP's usual M.O.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I did not understand the main problem but try using left join or right join to show all values.
|
|
|
|
|
that not what i asked. the sp work. just wanted a comment to know if it happens to other people as well
nelsonpaixao@yahoo.com.br
|
|
|
|
|
nelsonpaixao wrote: to know if it happens to other people as well
All the bloody time - extracting a part of a process from a large proc so it can be reused is a fundemental part of the development cycle. Identifying the bits that can be reused is where the art of development come into play.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
In c# i do this like everbody
routineA(string mystring, int myint);
routineB();
...
There is any equivalent to this in sql server?
I try to trigger some store procedures inside others but i can´t call variables inside.
create procedure C
as
begin
exec procedure B here i create a @table and fill it
...
...here i can´t do select´s or anything else
...
end
go
thanks
nelsonpaixao@yahoo.com.br
|
|
|
|