|
Ok, thanks for your clear reply.
|
|
|
|
|
http://www.projectdmx.com/tsql/sqlarrays.aspx
The link above gives you three examples of how you could do this.
|
|
|
|
|
Hi all,
I have a problem in a project using MySQL/C# which is: i have some users and news board such that each user has his own news (which is a huge number) and the news board is refreshed each 30 seconds for each user. so for example, i have to go to DB every 30 seconds to return about 700 records (news) for each user which makes the system very slow. these news are divided among pages (each page have 20 news) so now i want to know if there is a method to reduce number of records returned or something in paging or something to refresh current page only or ... ? i don't know. can anyone help?
Thank you
|
|
|
|
|
|
What is the TEXT datatype? How should it be used? Is it good or bad?
I have to save a long text to the database. I don't know the size that should be saved. Is it better to use the TEXT dataType or the VARCHAR datatype.
|
|
|
|
|
quiteSmart wrote: What is the TEXT datatype?
A data type for storing text - up to 2Gb
quiteSmart wrote: How should it be used?
When you have large amounts of text to store
quiteSmart wrote: Is it good or bad?
Like anything it depends. If you pull the TEXT data out on each query whether it is required or not it is bad. If you are careful it is very good.
quiteSmart wrote: I have to save a long text to the database. I don't know the size that should be saved. Is it better to use the TEXT dataType or the VARCHAR datatype.
If the text data is going to be over 8K a TEXT data type is your only option.
|
|
|
|
|
i have read an article that says that i can use the VARCHAR to arround 2 billion characters. They say in this article that i should write the dataType like this:
VARCHAR(max)
i am trying it but it doesn't work.
the link for the article is this:here
One more question concerning the TEXT dataType,
Does it have any problems concerning the storage capacity? or Is it like the varchar? meaning that it only takes the space it needs for saving not more?
Thanks for the reply
|
|
|
|
|
Which version of SQL Server are you using?
|
|
|
|
|
andyharman wrote: Which version of SQL Server are you using?
Microsoft SQL Server Management Studio Express 9.00.2047.00
|
|
|
|
|
quiteSmart wrote: Microsoft SQL Server Management Studio Express 9.00.2047.00
That is the IDE, not the version of the database engine. If you are using this IDE and it is the only version of SQL Server you have installed then you are using SQL Server 2005
|
|
|
|
|
|
I don't have access to SQL-Server 2005 from this machine, but you should be able to create tables like:
create table MyTable(
Id int identity(1,1) not null,
MyBigColumn varchar(max) null
) I believe that Microsoft are recommending use of "varchar(max)" instead of the "text" data-type.
Regards
Andy
|
|
|
|
|
andyharman wrote: MyBigColumn varchar(max) null
I read on MSDN that i can do this, but when trying it; it doesn't work
i don't have any clue why that is happening
|
|
|
|
|
What error message do you get?
|
|
|
|
|
andyharman wrote: What error message do you get?
Syntax Error newr 'max'
|
|
|
|
|
quiteSmart wrote: i have read an article that says that i can use the VARCHAR to arround 2 billion characters.
If you are using SQL Server 2005 (I forgot about that - I'm not yet using SQL Server 2005)
|
|
|
|
|
BLOB data is stored separately from the record in the underlying data structure by the RDBMS
File Not Found
|
|
|
|
|
Respected sir,
I have some of the questions related to sql queries
1.what is the sql server query for having the 3rd max salary record from the following table
EmpId Empname EmpSal
1 Joseph 1000
2 rahul 299
3 Rahim 4000
4 John 350
5 kate 2000
2.what is the sql server query for arraning the records with latest date for the following table
EmpId Empname EmpSal Date
1 Joseph 1000 21may2005
2 rahul 299 12 june2004
3 Rahim 4000 3may2006
4 John 350 5april2001
5 kate 2000 8june1998
3.how to sort the particular coloumn with out affecting to other coloums like
Empnam empSal
Joseph 1000
rahul 299
Rahim 4000
John 350
kate 2000
the above table has to be translated as given below in which only the salary is sorted in descending order with out disturbing empnames
Empname Empsal
joseph 4000
rahul 2000
rahim 1000
john 350
kate 299
4.In stored procedures how to jump to required line,
for example we have 1 stored procedure in which it contains 20 lines of code,but during accessing if we want to execute 8th line directly jumping from 2line of code.how to make it possible
please suggest me
Thanking you in anticipation
|
|
|
|
|
MD12 wrote: what is the sql server query for having the 3rd max salary record from the following table
SELECT TOP 1 FROM (SELECT TOP 3 FROM MyTable ORDER BY Salary ASC) ORDER BY Salary DESC
MD12 wrote: what is the sql server query for arraning the records with latest date for the following table
It depends what you mean by "arraging the records with the latest date"
SELECT * FROM MyTable ORDER BY SomeDateColumn
MD12 wrote: 3.how to sort the particular coloumn with out affecting to other coloums like
I have never come across a situation where that was useful.
MD12 wrote: 4.In stored procedures how to jump to required line
Use GOTO - or better would be to create a proper conditional structure with an IF block.
|
|
|
|
|
I have a the following table structure
t_entity
entity_id
connect_date
disconnect_date
t_entity_info
entity_id
property_name
value
Let's say I have the following data in the tables
t_entity
1 | 1/1/2005 | 12/1/2005
2 | 1/1/2006 | 12/1/2006
t_entity_info
1 | application | ds3
1 | subapplicaiton | wan
2 | application | voice
2 | subapplicaiton | phone
I want the following results with one query (using Oracle)
1 | 1/1/2005 | 12/1/2005 | ds3 | wan
2 | 1/1/2006 | 12/1/2006 | voice | phone
Anyone got any ideas? Thanks in advance.
Mike Lasseter
|
|
|
|
|
Hi all .
I wanna know ... :
1. What is the difference between Sqlserver2000 and SqlServer2005 ??
2. Which one is more useful ?
3. Which one works better and is more compatible with Asp.net2003 ?
Thank you very Much.
|
|
|
|
|
"4"
Sorry, could not help myself.
Our developers never release code. Rather, it tends to escape, pillaging the countryside all around.
The Enlightenment Project (paraphrased comment)
|
|
|
|
|
My calculator gives 5, but I have my doubts.
Chris Meech
I am Canadian. [heard in a local bar]
I agree with you that my argument is useless. [Red Stateler]
Hey, I am part of a special bread, we are called smart people [Captain See Sharp]
The zen of the soapbox is hard to attain...[Jörgen Sigvardsson]
I wish I could remember what it was like to only have a short term memory.[David Kentley]
|
|
|
|
|
Calculated starting from zero. OOps. That only works if you are worried about a context out of range error!
Any suggestions for this guy. I prefer 2005 because of SMO and SQL Server Express is free. Plus, nifty serialization and inside out CLR.
Our developers never release code. Rather, it tends to escape, pillaging the countryside all around.
The Enlightenment Project (paraphrased comment)
|
|
|
|
|