|
Just to be picky, if your using SQL 2005 or later i would use VARCHAR(MAX)
As TEXT has been decpreciated and should be removed in the next version of SQL
Marc Clifton wrote: That has nothing to do with VB. - Oh crap. I just defended VB!
|
|
|
|
|
Thank you for the information. I am currently using SQL Sever 2008 R2, so I'll change it.
Glenn
|
|
|
|
|
hi iam using sql server 2000
i have a table with fields
itemkey nvarchar(50)
amount money
i want the querry when user enters any number like 1000 or 750
i want to display what are the itemkey and the amount equals to exactly
1000
can you give example which helps me
|
|
|
|
|
I hope that I misunderstood your question or that you have simply never written sql before:
SELECT itemkey, amount
FROM a_table_with_fields
WHERE amount = 1000
My advice is free, and you may get what you paid for.
|
|
|
|
|
Your question is not exactly clear.
However, from what I think it means, what you need is one of the most basic of SQL statements SELECT ......WHERE ......
See here[^] for syntax etc.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
hi , i want the querry for a given parameter how much items amount equals to given parameter
|
|
|
|
|
In that case the answer given by Johan should do that.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
The number of matching items can be obtained using the COUNT function:
SELECT count(*) FROM a_table_with_fields WHERE amount = 1000
|
|
|
|
|
Hello,
I have the following sql
SELECT stocksymbol,tradedate, sum(qty )
FROM TradingTransactions where stocksymbol="HINDALCO" group by stocksymbol,tradedate having sum(qty)>1000
In the above query I get the SUM of qty but how do I know which records or record Nos were selected.
Thanks
Pritha
|
|
|
|
|
Just look at the where and having clauses. It is very exact actually. If you want to see which records were used, just run the query without the where and having clauses, and without the sum function, export the whole thing to Excel, and perform the same logic there, using subtotals and auto filters.
My advice is free, and you may get what you paid for.
|
|
|
|
|
thanks for your reply
So do you mean to say that I cant know which records were included in the function through SQL in my database .And will have to go to Excel to find the same.
Pritha
|
|
|
|
|
I think that maybe I do not understand your question.
The where clause determine which records are included and the having clause determines that you don't want to see any dates which' records do not add up to (at least) 1000. That is simple and clear logic.
So if you suspect that this query is not giving you the desired result, you can use Excel as a tool to check the outcome, and visually see each single record.
My advice is free, and you may get what you paid for.
|
|
|
|
|
|
This is a very common problem with MS SQL Server (all versions I think).
Because an Express edition was installed first, you are pretty much screwed. You are going to have to uninstall the express edition, manually delete all the folders it leaves behind, reboot, and install the new version with the advanced services, etc.
For what its worth, this has happened to me twice already. Looking for other solutions will only give you a headache.
My advice is free, and you may get what you paid for.
|
|
|
|
|
I was able to not delete all the folders but did a regedit to clear that.
|
|
|
|
|
But you did have to uninstall, right?
My advice is free, and you may get what you paid for.
|
|
|
|
|
Yes uninstall was necessary and a big pain as MS does not clean-up well.
|
|
|
|
|
That was my experience as well, but at least you managed to do it with one step less than me.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Well, as the title of the post can state, I'm trying to hide the taskbar and the desktop in vista and Seven. I already did it in Win XP and older OSes, but the real problem are these... In WinXP I used ShowWindow and FindWindow. If anyone could lend a hand, it would be great. Ah, almos forgot, I'm using VS2005
Thanks in advance,
Caio
|
|
|
|
|
This is not a database question, I think you need to move it to the apropriate forum.
|
|
|
|
|
Not a good Sh@rpShooter, you missed your target.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
|
|
|
|
|
|
Hi,
I've recently upgraded to VS2010 which includes SQL Sever Express. I also have access to every version of SQL Sever, but I'm not sure which version I should be running so let me explain what I'm doing.
I would like to develop applications that use SQL Server as the database engine and distribute these as commercially available. The applications are simple applications such as a Recipe Manager which also may hook into an food inventory manager. So I don't need something with lots of bells and whistles. I'm also going to develop some SQL Web Applications, which may use a few databases as well. I have an IIS Web Server on another machine.
Here's what I'm thinking but I could be totally off base.
On my development machine, I would run either SQL Express or SQL Developer, not sure which is the right choice here. Is setting up SQL Developer more complex than SQL Express? Also, does SQL Developer let you distribute SQL Express with the installer of your application?
On my Webserver, I was thinking of running either SQL Web, or SQL Enterprise, I'm not sure of the right choice here. Also, is one version more difficult to setup and configure than another?
Thank you for your input...
Glenn
|
|
|
|
|
Setup is similar for any version. Since Express is free so I would suggest using that, with the the end user having the option to connect to other SQL servers.
Also if you program using a different version than you plan to distribute you will have problems. We currently use 2008 for development and 2000 for production (working on upgrading), this has caused some problems.
As to distribution I cannot help you.
|
|
|
|
|
You can distribute SQL Express with your Application - the distribution licence is free.
I suggest developing with the tool the user will be using (or that your app wil be using) - SQL Express.
SQL Developer is a Full Enteprise version with user license restrictions I believe - 1 Developer, you will still have to Deploy your databases to another Production Server with the appropriate licensing.( I use SQL 2008 Standard as I don't need the Mirroring and some other stuff available in the Enterprise version).
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|