|
Thanks guys... Will give i a try
I am still learning
|
|
|
|
|
Go into Google and look for ADO 2.0 tutorials sucg as W3 School and 15 seconds.
Blog Have I http:\\www.frankkerrigan.com
|
|
|
|
|
I want to create a new view in my database using SQLDMO com class.I encounter with a problem near my text property of the view .
If any one know about this dll.Please help me
Rupa
|
|
|
|
|
Hey first of all not sure if this is the right board so i apoligise now if it is not.
Any ways my question is I am using SQL with C#.NET and have a query:
SELECT groups FROM T_USERS
WHERE username = @USERNAME;
SELECT organisation FROM T_ORGANISATIONS
WHERE username = @USERNAME;
which i execute using cmd.ExecuteReader()
However does not seem to be returned in the form reader(0) reader(1).
How do i go about solving this problem (yes I know it is basic so sorry to bore you with it but i am not sure what to search for)
Any advise would be awesome
Thanks
Dan
|
|
|
|
|
One reader can return many result sets.
You use Read() to move to the next row in a result set (the result of a SELECT statement), you use MoveNext() to move to the next result set (i.e. to the result of the next SELECT statement)
Does this help?
|
|
|
|
|
Thats magic thanks remmber seeing that some where and when you said that it all fell into place.
Thanks again.
Dan
|
|
|
|
|
Hi - Is there a way we could return the result in above format - know of hours, minutes, seconds.
Thanks for your time.
Vani
|
|
|
|
|
VK-Cadec wrote: Is there a way we could return the result in above format - know of hours, minutes, seconds.
DateDiff returns the result in an internal format. It is merely the rendering of that data on the screen that gives it a format. The formatting of data should be the function of your application's presentation layer, not the database.
|
|
|
|
|
Hi,
I'm trying to get total of each row in my table. For eample, I have columns x, y and z (all int). To get total, i'm writing "select (x + y + z) As total from myTable".
It works fine as long as one of the colunm is not empty. If it finds any null data in x, y or z then total shows up null. How can i get total in such case?
Thanks in advance
|
|
|
|
|
|
Thank you very much! IsNull worked fine.
|
|
|
|
|
Any expression containing a null value will evaluate to null.
There are a couple of ways around this. You could define your database columns so that they are not allowed to contain null values, and assign them a default value of zero.
Another method would be to test each value for null, and use 0 for the value of that operand if the result is true.
Hope that helps.
|
|
|
|
|
Could try something like:
SELECT x,y,z,
COALESCE(x,0) + COALESCE(y,0) + COALESCE(z,0) as [Row Total]
FROM .............
|
|
|
|
|
without using linked server is there another method to do the linking between faxpro(.dbf) & mssql server
Gurudatta B. Shelke
|
|
|
|
|
Please stop reposting questions. People have already told you how to do this with linked servers. If you don't want to use linked servers (and to be honest, I can't see any reason why you wouldn't), you should reply to them on that post.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
can some one tell me how to create a sequence in sql server 2000. pls help me asap....
tilak
|
|
|
|
|
tilak.gummadi wrote: can some one tell me how to create a sequence in sql server 2000
In SQL Server IDENTITY property is the equivalent of the oracle's sequences. IDENTITY property can be set to the columns of the types tinyint, smallint, int, bigint, numeric, decimal. It is used in the form of IDENTITY(seed, increment)
Example,
CREATE TABLE abc(
f1 int IDENTITY(10,2),
f2 varhar(100)
)
Also have a look at this[^] for more details.
Regards
________________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
Thanks a lot uroojkhan....this thing realy helped me a lot...
tilak
|
|
|
|
|
i want to link foxpro file with mssql
for that somebody suggest me to use linked servers
but i dont know how to use linked server so pls
help me about how to use linked server
Gurudatta B. Shelke
|
|
|
|
|
|
Hi - I just have a general SQL server question I'm hoping someone can help answer.
I have a table with a column of datatype TEXT called NOTE. I am trying to trim those records in the text field to say, 10000 characters where datalength(NOTE) > 10000.
for example, normally i would do something like 'update notetable set note = LEFT(note, 10000) where length(note) > 10000', but of course i can't do this with this datatype.
This datatype is a pain..Does anyone know the syntax for this?
Thanks!
Marcus Spitzmiller
You will never hear me say, "I listen to pretty much everything." That is for people who don't care what goes in their ears.
|
|
|
|
|
|
No - it'll still ultimately reside in the same column - I just need to trim it.
any thoughts?
Marcus Spitzmiller
You will never hear me say, "I listen to pretty much everything." That is for people who don't care what goes in their ears.
|
|
|
|
|
I don't see why what PIEBALDconsult suggested will not work:
select cast(mytextcolumn as varchar(1000)) as MyTextColumnTrimmed from mytesttable
Try it out.
--EricDV Sig---------
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 guess I misunderstood the suggestion.
However, I did:
select cast(NOTE as varchar(16349)) as NOTE
from S_NOTE_ACCNT
WHERE datalength(NOTE) > 16349
and I get:
The size (16349) given to the type 'varchar' exceeds the maximum allowed for any data type (8000).
So really, I need to trim the field to 16349, but apparently I can't this way...any thoughts?
Marcus Spitzmiller
You will never hear me say, "I listen to pretty much everything." That is for people who don't care what goes in their ears.
|
|
|
|