|
hi
i am writing a quert to select all the columns from a table just like that
select Eaton.* from Eaton
eaton is my table name but some colums has blank spacesin left and right so i want to eliminate them so i use
select Trim(Eaton.*) from Eaton but its not woking
Whast i do if any body know Please help
Thank in advance
Thanks
|
|
|
|
|
Use ltrim or rtrim
as below:
select lTRIM('Eaton.* ')
between (')
|
|
|
|
|
hi all...
i have a problem that how to show a date in access table.. can someone please help me..
areon25
|
|
|
|
|
Hi There
This has got to be an easy one... I am coming to ADO.NET from an ADO background, so i appologise if it comes across as totally stupid!
All i want to do is insert a new row into a table and pull back the autonumber primary key assigned to it.
What i don't want to have to do is:
1) Fill a Dataset in order to get a DataTable definition.
2) Use stored procedures.
Anybody know the answer off the top of their head? Guess i really need to buy a good ADO.NET book.
Thanks In Advance
Rich
|
|
|
|
|
|
this is my query
query="SELECT studenti.Nume, studenti.Prenume, cursuri.denumire_curs, note.nota, note.data " +
"FROM studenti INNER JOIN " +
"(profesori INNER JOIN " +
"(cursuri INNER JOIN [note] ON cursuri.id_curs = note.id_curs) " +
"ON profesori.id_profesor = cursuri.id_profesor) ON studenti.id_stud = note.id_stud " +
"WHERE profesori.user_name = '" + user + "'";
i want to give a name to the result table so i can put it in a DataSet
dadapter.Fill(ds,"table name");
Thanks
|
|
|
|
|
You don't need to know the name to put the results into a dataset. Just look at the overloads available.
|
|
|
|
|
In SQL Server: What is "ntext"? What is it for? How to use?
It is difficult for me to understand. A example will help me better.
For example: I have a Web page. I need display the content of news,include texts that larger than data type of ntext for a column.
What must I do now?
Thanks!
|
|
|
|
|
From bol
ntext: Variable-length Unicode data with a maximum length of 2^(30 - 1)(1,073,741,823) characters. Storage size, in bytes, is two times the number of characters entered. The SQL-92 synonym for ntext is national text.
If your news content will always be less than 8000 characters you can use varchar or nvarchar. Otherwise you will have to use text, ntext or image datatype.
http://msdn2.microsoft.com/en-us/library/ms190258.aspx[^]
http://msdn2.microsoft.com/en-us/library/ms191262.aspx[^]
--
Don't take life seriously because you can't come out of it alive.
-Warren Miller
(From Monty2[^] bio)
|
|
|
|
|
I am trying to creat a function in SQL Server where it returns a the value of a column in a table where the column is passed as a parameter.
Below is the function where I want to return the value in the user table for column @field. Thanks for your help.
CREATE FUNCTION [dbo].[USER_RETURNCOLUMN] (@userid decimal, @field varchar(200))
RETURNS varchar(2000)
AS
BEGIN
DECLARE @RETURNVALUE varchar(100)
SELECT @RETURNVALUE = ''
SELECT @RETURNVALUE = @field
FROM USER_TABLE
WHERE USER_ID = @userid
RETURN @RETURNVALUE
END
|
|
|
|
|
If you ask me no chance to do this in a user defined function. You would need dynamic SQL with exec( @stmt ) and that is not allowed in UDFs. Can't you use a stored proc? You can use dynamic SQL there.
Regards,
Rainer.
Rainer Stropek
Visit my blog at http://www.cubido.at/rainers
|
|
|
|
|
i want to sort a table by string column
this column contains data in this format ddd/dddd (ex: 100/2006 or 6/2006)
so when i order the table by this column, it will sort like this:
1/2006
11/2006
111/2006
2/2006
22/2006
but i want to sort like this
1/2006
2/2006
11/2006
22/2006
111/2006
so, is there any why to sort like this on a vb.net application not in the database?
Faris Madi
Nothing Comes Easy (N.C.E.)
|
|
|
|
|
|
SELECT *<br />
FROM MyTable <br />
ORDER BY REPLICATE('0',8-LEN(mycolumn)) + mycolumn
----------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
i'm using SQL SERVER 2000 with .net 2003
my problem is when i connect to the other computer that has the database
it keep telling me "Login faild on Computername\Guest"
and i've installed the SQL SERVER 2000 on the other computer on mixmode authentication.
Why he want to login to Guest Account... while Guest account is off.
i'm using this connection string:
Me.SQLConnection_Search.ConnectionString = "packet size=4096; Trusted_Connection=true; Persist Security Info=true; SERVER= 192.168.0.1; User ID= sa; Password=sa;initial catalog=aqar; "
so where is the problem.
Faris Madi
Nothing Comes Easy (N.C.E.)
|
|
|
|
|
|
Hi
I need to modify the excel export feature in Reporting Services... The issue is that client needs to have chart in excel format after exporting so that user can manually change the values in excel sheet to check the effect in the chart dynamically. Can anybody tell me how I can do that? I know it would require the creation of chart in BIFF format. But could not find out how?
If someone knows any .NET library that can help me in that please let me know. I don't want to go for SoftArtisian Office Writer as it has certain limitation as it doesn't supports the grouping of data in RS.
Thanks
-- modified at 3:29 Saturday 17th June, 2006
|
|
|
|
|
I'm considerind adding database capabilities to my software. First step is selecting the proper database. The database should have 0 maintenance, be light weight. I would also appreciate a single file binary database and not BDF/Paradox like ASCII files.
At the moment I think SQLite could make it.
Once you made a choice - especially with small companies like mine - it is difficult to switch to another one. So since I'm not a database specialist, I would appreciate advices or suggestions on other candidates, and possibly pros and cons.
Thanks,
Yarp
http://www.senosoft.com/
|
|
|
|
|
SQLite is a proprietary format embedded database .. that sort of works against 'switching to another one' unless, you use a database abstraction layer in between your code and the database layer.
The most obvious one I can think of is ODBC, and there is an (?experimental) ODBC driver for Sqlite. You're still not off the hook with ODBC, because of SQL variations (Ie SQLite doesnt support all of the SQL-92 Standard) , but it could make it 'easier' to use ODBC
There is a database abstraction layer (cant remember the name off-hand, will look it up and try and post back), that MAY (memory is a bit dim) let you select between different database 'back-ends' - my guess is you would still have to stick to fairly basic SQL unless its translated somewhere for each potential database back-end.
.. but thats the approach I would use if there was any hint of having to change the database back-end ..
(if it counts for anything, I use SQLite in some projects - I also use SQLite and Oracle 9i in other projects)
hth, 'g'
ps .. your p3DO explorer looks great - wish I knew how to do some of that stuff - not enough time ....
-- modified at 2:10 Saturday 17th June, 2006
|
|
|
|
|
Thanks for your detailed answer Garth,
Since my needs are rather basic I will most probably only use SQL basic commands. So I think I can cope with those SQLite limitations.
Also although I will design it for multi-users use it'll mostly be used by single user.
For the driver, yes it is a choice in itself but the thiner layer, the better.
> your p3DO explorer ... - wish I knew how to do some ... - not enough time
Yes it takes a lot of time, fortunately (or not I'm single and I love 2D/3D graphics. This gives me the will to go ahead.
Looking for the proper library/component is a hard part of the project (I made severall costly mistakes in the past).
Yarp
http://www.senosoft.com/
|
|
|
|
|
You can try out Firebird. It can be used both as standalone or as a full server. I think you can convert a standalone database to a server very easily. For more check http://www.firebirdsql.org/[^]
--
Don't take life seriously because you can't come out of it alive.
-Warren Miller
(From Monty2[^] bio)
|
|
|
|
|
Thank you for your advice. I already used Interbase in the past, it is a good database but not light enough for what I intend to do.
I would most probably choose it for professional clients running on a network (I've read SQLite is not good for transactionnal network access), but my needs are too basic even for Interbase.
Note - I don't say for FireBird since I don't know it.
Yarp
http://www.senosoft.com/
|
|
|
|
|
Hi,
I have a problem with and app that is connected to an SQL 2000 database
The user got a new server dual CPU 3.2 GHz Pentium 4 with 2G memory and the app is slower compare with the old machine a dual CPU 755 MHz Pentium 3 with 512 memory.
If you use the TCP/IP connection in ODBC driver, the new machine is very slow.
If you use Name Pipe in ODBC, both machine a doing well.
The old machine it is working well with both TCP/IP and Pipes.
Does anybody have any idea why it is such a big difference between TCP/IP and pipes for the new machine? The different is from 1 minute to 10 minutes for an operation.
Any thoughts are welcome
Thanks,
Florian
-- modified at 15:01 Friday 16th June, 2006
|
|
|
|
|
my guess is Named-Pipes and ODBC are better at buffering, while TCP/IP works to a point then TCP/IP becomes saturated and network performance decreases.
(but there's a lot of variables here)
'g'
|
|
|
|
|
I have a table "tbl_order" with to the fields "customer_number" and "date". there can be multiple rows with the same customer_number, but the date fields are allways unique.
these or potential rows in my table:
cust_no | date | item
---------------------------
21 2006-01-06 shovel
21 2006-03-05 axe
21 2006-05-05 widget
45 2006-05-01 fish tank
45 2006-05-02 ...
For every cust_no i want to retreive only the row with the earliest date. How can this be done?
what i want is this:
------------------------
21 2006-01-06 shovel
45 2006-05-01 fish tank
Any help would be greatly appreciated
/ Stefan
|
|
|
|