|
Select columnA + columnB from someTable
This concatenates the column vakues. Have you tried using this in your pivot query?
|
|
|
|
|
There are some excellent articles [^]around on that subject.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: There are some excellent articles
Shameless plug, excellent. 5 for that.
And it is a very useful article.
|
|
|
|
|
Hey,
Sorry for the late response, I wasn't around a computer.
While article you added really shed some light about the topic, I still have a small problem.
the article showed how to concatenate to columns into one and then pivot the column, what I want to do is to pivot them both.
So if i refer to the article, instead of having a column for "1996-F" and one for "1996-M" I want two columns, one for "M" and one for "F" and "1996" wrapping them.
something like:
1996
M F
6 5
|
|
|
|
|
Now you are trying to put UI/presentation logic into the database operation. Adding the additional row with the year is not a database operation it needs to be done in your application.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Dears,
I have SQL Server table which includes contains follwing columns
File Name Telephone
MemeberName_TelephoneNumber_IDNUmber ,TelephoneNumber
I need to add one or more column named ID Number and get the value from column Filename.what is the query to get the result?
please help me
|
|
|
|
|
Not entirely clear what you are asking but this might set you in the right direction:
declare @Id int
set @Id = 999
select FileName from [table] where IDNumber = @Id
Hoep that helps.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Howdy!
I'm creating an application to keep track of people at an event. The app will run on a Windows 7 laptop, and have no network connectivity (I believe that means it's single tier?). The app is going to be written in C# 2008 Express, with the database in SQL Server 2008 Express.
Here's the security concerns for the app:
About 8 people (door volunteers) will use the app in a night, to register dancers when they arrive.
Every half hour, the volunteer changes.
The volunteers are highly computer challenged (or must be assumed to be so).
I don't want a windows login for each volunteer.
The app will prompt for the volunteer to "log in" to the app, as their shift starts.
I'm considering a single windows user for the whole app. The volunteer app "login" will just be a record of whose at the door at a giving time.
Here's my question:
Is the best way to set up the database security to create the app user in windows, or to use SQL Authentication from within the program? What considerations indicate the best choice?
Thanks,
Jess
|
|
|
|
|
That all sounds reasonable.
A concern I see is the amount of time spent changing users. If there's a line of dancers waiting to be checked in and out, you may not want to wait for Windows to log out and back in and restart the app. So I would have users as a feature of the application. A supervisor-type user can add and remove users. And a user would log into the app by menu or drop-down -- you may or may not ask for a password.
So, I would have a User table which contains the details of each user. The ID of the user can then be attached to the various actions (check-in, check-out) taken within the system.
|
|
|
|
|
Do NOT use windows logon within the database security. Create a "functional" id in sql server with a usedid and password, have the application use this ID as the credentials to connect to the database.
Manage the user security within the application rather than use windows/sql security. As Piebal suggested have a used table with credentials that can be managed from within your application by an administrator (you presumably)
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Q. Why do you need each volunteer to be separately logged in? Do you need to keep track of who let in whom?
Assuming you're not too concerned about someone trying to steal or knacker the database then the type of security doesn't really matter - integrated or not that is.
You could do something as simple as asking them to type in their name (selection from a drop down could be risky - what if someone volunteers in another user's place?) and then log that in the database.
Disable the entry of the name on a login/logout button and bob's your uncle.
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
How can I update my table every hour?please help me
|
|
|
|
|
You question is a bit open-ended, but I'll try to point you in the right direction.
If you are logged in as "sa" in SQL server Management Studio, look under "SQL Server Agent" and you will find "Jobs". Here you can create a job to execute with a Daily Frequency of every hour.
Does this help?
|
|
|
|
|
Thanks but I'm not logged in as "sa". please explain more about job?
I see it in sql server agent but I didn't work it.I should update table data every hour
|
|
|
|
|
If you don't have sa access, then I would write a windows command line utility (no GUI) which can be scheduled in the Windows Task Schedule to run every hour to update your table.
|
|
|
|
|
Thanks David
|
|
|
|
|
hi..
i'm using ssrs 2008 enterprice edition..
i want to send a report as email..
to my gmail address.. i want to schedule a report so that it can
deliver daily to my gmail address..
how to send the report to my gmail address..
i dont know anything about smtp server activation and services
and also in configuration of reporting services..
i dont know how to configure email settings..
please help me..
can anyone provide a step by step datails
for the above requirment..
|
|
|
|
|
vinu.1111 wrote: can anyone provide a step by step datails
It is unlikely you will get this, it is a fairly large subject to cover.
You need to set up a subscription that will process the report, the subscription can be set up to email the exported report to your gmail account.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello,
I would like to find a cheap (free) software package that I can use to output data from SQL Server. It does not need to be too fancy as all I am doing is connecting two tables (header and detail).
I do not do this often enough to purchase Crystal Reports.
Thanks
djj
Note I originally posted this in the Lounge as a reporting question. I guess I should have thought to put it in the DB area.
modified on Monday, January 31, 2011 9:08 AM
|
|
|
|
|
As a developer, can you not write your own?
|
|
|
|
|
I am not a developer! I do a little programming but am mainly a T-SQL person as a DBA.
I did think about it though
|
|
|
|
|
djj55 wrote: I am not a developer
Your profile says you are.....
If your not looking for anything fancy, then sometimes rolling your own can be the best option. Sometimes giving your brain that little challenge is enought to keep you ticking over nicely.
|
|
|
|
|
Actually my profile says I have been programming. That technically is not a developer as they generally (I hope) know what they are doing.
The number of programs being used by people that I have developed is very small and the programs themselves are simple.
Four years ago I could have knocked something out quickly but know I need to refresh my memory on how to do it which I like to do but the boss thinks I could use my time else where.
|
|
|
|
|
If you've got Server SQL, why not use Reporting Services (SSRS)?
Sarchasm : The gulf between the author of sarcastic wit and the person who doesn't get it.
|
|
|
|
|
Good question. Mainly I do not know how to. I guess I can get my book out and see what I come up with.
-- I have a quick and dirt report but need to figure out formatting.
modified on Monday, January 31, 2011 9:43 AM
|
|
|
|