|
lav naphade wrote: How to register custom dll into report.rdlc(report viewer)?
and how to custom function in to report.rdlc ?
Reading the documentation[^] would be a good place to start, no?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hi all
i have 3 tables as employees,medical,expenses
i need to take the information from all these 3 tables for the employees
Table1(employees)
EmployeeID DepartmentID
1 100
3 115
TAble2(medical)
EmployeeID ClinicID
1 7
3 11
4 15
Table3(expenses)
EmployeeID ExpenseID
1 5
3 10
now i should get all the details of the employees which is common in all the 3 tables
my answer should be like this:-
EmployeeID DepartmentID ClinicID ExpenseID
1 100 7 5
3 115 11 10
hw will i write a query to get these details?....
thanks in advance...
|
|
|
|
|
You just want a straightfoward inner join for that.
select a.Id, a.DepartmentId, b.ClinicId, c.ExpenseId from Table1 a join Table2 b on a.EmployeeId = b.EmployeeId join Table3 c on b.EmployeeId = c.EmployeeId
Regards,
Rob Philpott.
|
|
|
|
|
Hi all,
Can anybody knows the diffrence between CTE and Derived table ??
Thanks in advance
Rana Krishnraj
|
|
|
|
|
|
Aloha,
I'm doing a car related website, where I need to fetch 3 cars similar to the one currently viewed by the user.
I would like to fetch 3 cars of different brands, but I can't make it happen
My query looks like this. It returns 3 similar cars, but they might all be from the same brand. How can I change my query, so the 3 cars will be from 3 different brands?
<br />
SELECT brand, model, topspeed, acceleration, hp, ABS(987-hp) AS 'nearest' <br />
FROM cars WHERE hp <> 987 AND cars.type = 'FHC' <br />
AND brand != 'Bugatti'<br />
ORDER BY nearest LIMIT 3;<br />
Thanks, Mads
|
|
|
|
|
What database are you using? Is this going in a stored procedure?
I think you probably need to adopt an approach where do your query for just one car, then union it with a second query the same as the first by with an added condition to make sure the brand is different, and then again for a third time.
Make sense?
Regards,
Rob Philpott.
|
|
|
|
|
Makes sense. It's a good idea, but it's no secret that I would prefer a single query.
I use MySQL, it's a normal SQL string.
|
|
|
|
|
Is there a way grant the right to alter any existing table for the current database to a specific user?
Thanks.
|
|
|
|
|
You could use GRANT ALTER TO [username]. However, that grants alter permission to all objects within the database, including functions, stored procs and views. I tried using ALTER ANY TABLE, but it is not a valid command. So as far as I can tell you need to explicitly grant ALTER permissions for each table and you will need to do it every time you add a new table.
You could write a script which loops through sys.objects and grants ALTER permission on each user table. But other than that there doesn't seem to be a way to do it and you're still stuck adding permissions each time a table is created.
|
|
|
|
|
Mark J. Miller wrote: So as far as I can tell you need to explicitly grant ALTER permissions for each table and you will need to do it every time you add a new table.
I thought so, but I still had some hop left that I could avoid it.
Thanks for the explanation.
|
|
|
|
|
How do I get the second most expensive call from my database. Currently I am using a Max(amount) statement, but as it turns out the dump of data I was given was just that, a dump, and they have put the total of all calls in my data as well. Can anyone give me some script to select the max amount, but the second biggest amount?
Thanks
modified on Thursday, April 3, 2008 3:12 AM
|
|
|
|
|
|
Ok that's great ye, thanks, but how do I get it to NOT display the TOP 1 and only the Second one?
|
|
|
|
|
Try something like this:
declare @max int<br />
<br />
-- get the maximum value<br />
select @max = max(call) from table<br />
<br />
-- get the highest value below the maximum<br />
select top 1 * from table where call < @max order by call desc
Of course, if you have two calls which share the highest level, this returns the third.
Regards,
Rob Philpott.
|
|
|
|
|
yes thank you. I've done something similar. I selected the Top 2 and ordered them desc and then returned that value to another Top 1 sort and got the second highest. I do think yours is more effective though.
Thanks alot
|
|
|
|
|
hi all,
how to import data from excel to sql server 2005 either by using ado.net or asp.net 2.0 and c#
Ashok
|
|
|
|
|
Is Google[^] broken in India today? Or did it just not occur to you to use it?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
pmarfleet wrote: Is Google[^] broken in India today?
That's just class. Awarding you a 5 to bring the average up.
|
|
|
|
|
Hi, thanks for looking
I hace a case in my select statement (SoldOut), how could i fiilter rows depending on that field
I made it work by putting the case in my where
But how can i put the case in my select and apply use where to filter rows?
Thanks again
Alexei Rodriguez
|
|
|
|
|
|
hai
can any one plz tell me how to use urdu language in c# forms and through
form insert data into sql server when i i insert data in sqlserver it
show ???????? instead of actual data .this problem also caries with
crystal report 9
|
|
|
|
|
Use nvarchar[^] columns to store your data. This allows you to take advantage of the extended character set provided by Unicode encoding.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hello!
I am writing a stored procedure, and in my stored procedure, I need to work with a string.
I found some functions in SQL: DATALENGTH, and SUBSTRING. But I can't find information
about how to work with strings in SQL. What I need is to walk through a string, exemine
every character and make the string smaller depending on the characters.
First, how can I compare ntext strings?
And, second, maybe there are more string functions in SQL?
Thanks in advance!
Have a nice day!
|
|
|
|
|