|
I was hoping someone had a fix for this. So annoying. Only with compact DBs.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
Hi all.., How to find refresh percentage of a database through QUERY?
D.Willington
|
|
|
|
|
What do you mean exactly? Your question makes no sense.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
i have an application to refresh a database. I have to select database, backup file path and all.., it is working well.., while the database in refresh i have to display this much percentage has fininshed and so on.
so i want to get the completed percentage of refresh database.
D.Willington
|
|
|
|
|
Well, while your database is restoring you can't run queries so you'll just have to show them a progress bar or something that runs on a timer.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
can't run the query from master database?
D.Willington
|
|
|
|
|
You can run a query from the master database, but the database you are restoring is being restored, so there is nothing to query - it doesn't do it table by table etc.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Ok.., Thank u very much
D.Willington
|
|
|
|
|
Hi,
I have a table (tblregfundprice) with the column name "Unit_Price, Fund_Code, and Date".
The table contains the following data.
Fund_Code.....Unit_Price.....Date
AF............0.1254.........10/17/2008
AF............0.5487.........10/16/2008
AF............0.2114.........10/15/2008
AF............0.8744.........10/14/2008
AF............0.1254.........10/13/2008
AF............0.5487.........10/12/2008
AF............0.2114.........10/11/2008
AF............0.8744.........10/10/2008
AF............0.1254.........10/09/2008
SC............0.5487.........10/14/2008
SC............0.2114.........10/13/2008
SC............0.8744.........10/12/2008
GH............0.1254.........10/11/2008
GH............0.5487.........10/10/2008
GH............0.2114.........10/09/2008
GH............0.8744.........10/08/2008
Now if you notice, the most recent date is 10/17/2008 and SC is having the most date of 10/14/2008. How can i do to create below result table for TOP 10 Fund_Code = "SC"?
Unit_Price.....Date
NULL..........10/17/2008
NULL..........10/16/2008
NULL..........10/15/2008
0.5487.......10/14/2008
0.2114.......10/13/2008
0.8744.......10/12/2008
0.1254.......10/11/2008
NULL..........10/10/2008
NULL..........10/09/2008
NULL..........10/08/2008
I need the NULL value to appear as i need it for my system to capture it... I hope there's a way for this.
Pls help....Many thx.
|
|
|
|
|
try this
SELECT *<br />
FROM (SELECT DISTINCT Date FROM TABLE) D<br />
LEFT JOIN (SELECT * FROM TABLE WHERE Fund = 'SC') SC ON SC.Date = D.Date
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
I am retreiving a data from a table by self join. I am getting all the clients of a doctor and and group them into pairs. I need to have a unique record for each pair that is pair clientAclientB is the same as pair clientBclientA.How can this be done please, since I am retreiving both records. The sql I am using is written be;low
Select Distinct c.id, c2.id
FROM Client c, Client c2
Where c.doc = c2.doc
And c.id != c2.id
Thanks for your time
|
|
|
|
|
A quick thought (not tested)
Select Distinct c.id, c2.id
FROM Client c, Client c2
Where c.doc = c2.doc
And c.id < c2.id --less than instead of not equal
Eslam Afifi
|
|
|
|
|
Can anyone tell me that how can I store images in database. I am using SQL 2005 and I want to store image in that. I know there is a image datatype but it is not working. Please remember I want to store the image not it's path.
|
|
|
|
|
I have already answered in C# forum
|
|
|
|
|
i use identity_insert for a column in one of my tables. when I first insert 5 rows, this column will show number from 1 to 5 (identity set as 1,1), but when I delete this 5 rows and re-insert this 5 rows, the number get incremented (6-10), how can I reset it and make it still start from 1 ??? can I run any simple query to do that?? thanks.
|
|
|
|
|
The intent of an identity column is that it uniquely defines a row in a table, FOREVER ! You can always create another row in that table with the exact other values, but it will never be known by an identity value previously assigned.
It may be possible to re-assign the identity sequence generator, but don't do it. Have you considered what would happen if another table was referencing your master table with this identity column ?
|
|
|
|
|
For example DBCC CHECKIDENT (Transact-SQL)
[^].
However, identity is used to generate surrogate key values so the number generated should always be irrelevant. The database does not quarantee anything but uniqueness.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
In case you did not get it - DO NOT CHANGE THE IDENTITY VALUES - this is a basic tennant of relational databases.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
again, I tried to run the following query
INSERT INTO table1 (SID, Time) VALUES (1, SYSDATE)
but got the error message as below:
Msg 128, Level 15, State 1, Line 1
The name "SYSDATE" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.
Can anyone tell me what the problem is? Thanks....
|
|
|
|
|
SYSDATE is an Oracle function. Use GETDATE().
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
i am working on SQL Server 2005(SQL Server Management Studio 2005).i want to ask that how can i import data from a text file into the table.i am really new to it,so please explain it in detail..
thanx..
|
|
|
|
|
Check out this link.[^] also check this google result[^]
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.
|
|
|
|
|
Asks the same question in multiple forums, can't use Google, and can't understand that I am MOCKING him.
Blog link to be reinstated at a later date.
|
|
|
|
|
i am working on Visual Studio 2005 n SQL server 2005.i have written some data value in random order in a table,now i want that,when i access that table in a DropDownList then those values should appear in ALPHABETICAL ORDER...
kindly help..thanx a lot..
|
|
|
|
|
From memory, the dropdown list has a sort property? Or maybe use ORDER BY in your select?
Bob
Ashfield Consultants Ltd
|
|
|
|