|
How should i check the positive value in sql server 2005 except the following?
declare @f varchar(2000)
set @f = '788'
print charindex( '-' , @f )
|
|
|
|
|
It would be nice if we could actually understand what you are trying to accomplish.
|
|
|
|
|
Check if it's larger than 0
DECLARE @f INT
SET @f = 788
IF @f > 0
BEGIN
PRINT 'It is positively positive!'
END
ELSE
BEGIN
PRINT 'That''s A negative there, Toto'
END
I are troll
|
|
|
|
|
i am using SQL 2000 server. i have created one user .
i want that this user have following rights:-
Select,Insert,Update,Delete on Tables. so i gave the user as DDLAdmin,Read acess and Write Excess.
this is ok with my tables part. but for Stored Procedure i got a problem.
I want that my user can execute and modify the Stored Procedure.
For the execution part i ran Grant exec on <sp_name> to <user_name>.
but please tell me How should i give the user rights to modify the procedure???
I don't want to make user as DB_Owner.
Kindly suggest any solution.
Thanks in Advance.
|
|
|
|
|
I had a project in MS access 2003 now I converted that to SQL server where there is some fields
in each table which has the hyperlink link to a scanned pdf file. while converting the files
the database is running very well but I can not get to my scanned files and the hyperlink is not coming in SQL server to click to get to the specified scanned files.just the path is coming in text format only
could you anyone help me.
|
|
|
|
|
Saleem Tahiri wrote: just the path is coming in text format only
Because that is what is stored. You cannot (as far as I know) store a hyperlink in sql, just text so you need to build the hyperlink when you retrieve the data.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
If you are still using the Access front-end, just pass the text as a parameter to the VBA FollowHyperlink function and it will open.
|
|
|
|
|
Hi,
When i installed Rational clearcasetool and restarted system..and when im trying to build my vc++ application in VS 2005 im able to see the below error..
error result returned from 'cl.exe'.
Please help me out..
|
|
|
|
|
This error is due to improper setup of VS or OS update problem.
It also comes when u install windows update patch KB925902. try uninstalling, if u hav one.
Ravie Busie
Coding is my birth-right and bugs are part of feature my code has!
|
|
|
|
|
plz giv me the connection string to connect ms access database in asp.net web page
|
|
|
|
|
Look here[^] for connection-strings.
plz = Please
giv = give
I are troll
|
|
|
|
|
Dim strConn as string = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath(".\northwind.mdb") & ";"
Ravie Busie
Coding is my birth-right and bugs are part of feature my code has!
|
|
|
|
|
Hi everybody
Actually i created a table in sql+, and inserting data using sql+ itself.But after i log out off the screen and log in again i see the data gone. How can i prevent the data from getting vanished without writing commit or set autocommit commands on everytime.
skd
|
|
|
|
|
During interactive usage with sqlplus, Oracle also supports an AUTOCOMMIT option. With this option set to ON each individual SQL statement is treated as a transaction an will be automatically commited right after it is executed. A user can change the AUTOCOMMIT option by typing
SET AUTOCOMMIT ON or
SET AUTOCOMMIT OFF
whereas by typing
SHOW ALL
a user can see the current setting for the option (including other ones).
This was taken from the website:
http://infolab.stanford.edu/~ullman/fcdb/oracle/or-nonstandard.html[^]
|
|
|
|
|
neoghy wrote: How can i prevent the data from getting vanished without writing commit or set autocommit commands on everytime.
This is like asking how I can eat my cake without opening my mouth.
Cheers,
Russ
|
|
|
|
|
Dear Friends,
Client database is in the form of "database.Dat" they don't which version they are using, i want to restore it i sqlserver 2000 with service pack 4
Following error occured
Error:3169 The backed up database has on-disk structure version 611. The server supports version 539 and cannot restore or upgrade this database. Restore filelist is terminating abnormally.
Please give a solution
Thanks & Regards
JK
|
|
|
|
|
Hi JK,
It looks to me like you client is using SQL 2005, which isn't backwards compatible with SQL 2000.
Ryan
|
|
|
|
|
is it possible to convert sql 2005 database to sql 2000 sp4
|
|
|
|
|
Just using the file you have, not as far as I know. If you had access to the database, I'm told that you could export the data from SQL 2005 and then import it into SQL 2000, but I haven't done this before and so I can't really tell you exactly how to go about it.
|
|
|
|
|
For open database *.mdb I use ADO-construction
try
{
hr = m_pConnection->Open(_bstr_t(lpstrConnection), _bstr_t(lpstrUserID),
_bstr_t(lpstrPassword), NULL);
return hr == S_OK;
}
catch(_com_error &e)
{
}
When mdb-file has not attribute "ReadOnly", Open returns S_OK.
But when I set this attribute, exception is generated with
ErrorNumber = 0x80004005 and NativeError = 0xfffff88f ("Not a valid password").
I don't undenstand why. Pls., explain me this situation.
And other question: what are error codes concerned with error password (for ODBC and SQL-Server)? Or in other words: How may I detected that in connection string invalid password for opened database?
Thanks
|
|
|
|
|
Can someone answer why the following isnt returning anything?
string strGetPeriodeSQL = String.Format("SELECT * FROM {0} WHERE SDate BETWEEN {1} AND {2} ORDER BY SDate", strTableName, dtStart.ToShortDateString(), dtEnd.ToShortDateString());
I left out the rest of the funktion, just the SQL part is here.
Lars
Resistance is futile - Data (ST:First Contact)
|
|
|
|
|
Are you saying strGetPeriodeSQL does not get populated?
Does the SQL string not execute?
Is no data returned from SQL?
I suspect the latter so:
Take the content of strGetPeriodeSQL to Management Studio and see what the results are.
If you get results then there is a problem with your connection.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks for the answer. But I figured out what was wrong. Insted of converting to ShortDateString I needed to convert to ToOADate.
Sorry for the trouble.
Lars
Resistance is futile - Data (ST:First Contact)
|
|
|
|
|
or you can use this way:
<br />
string strGetPeriodeSQL = String.Format("SELECT * FROM {0} WHERE SDate BETWEEN {1} AND {2} ORDER BY SDate", strTableName, dtStart.ToString("yyyy.MM.dd"), dtEnd.ToString("yyyy.MM.dd"));
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
I want to store string character to be stored as password in Oracle table.
|
|
|
|