|
It sounds like your dataset is not that large, so storing the data in Access sounds fine.
You will be amazed at how easy it is to develop queries in Access to get the results you need, if you find the data to be too large or you need to share this database with others, you may have to upgrade to something more substantial, ie MS-SQL.
Start with Access, it should give you enough to prototype with ... maybe even solve your problem completely.
Good luck.

|
|
|
|
|
Thanks for your response.
I think each set will have at most 500 elements and the super set will have at most 2000. And the set count may be about 100 in all. So I might be able to use Access.
Could you please give some pointers on the design? Some brief thing about tables etc will surely help me.
|
|
|
|
|
1. if setting up servers for transactional replication, is it possible for the subscriber server to delay the publisher server?
For example, the publisher server is under heavy load and inserting/deleting a large amount of rows; I realize that the publishing server will be a little slower due to sending these updates to the subscriber server(s), but does the publishing server have to wait or stop processing while the subscribing servers are committing the same transactions?
Or are the sent transactions to the subscriber queued and processed at its own pace - not impacting/stopping the publishing server? I understand that a distributor server cab queue these commands to the subscribers, but does the action of queuing ever pause the production/publisher server in any way?
2. When doing queries on a subscriber database (since it's read only), does the database become unavailable while committing transactions sent from the distributor or publishing server(s)?
Thanks for any help. Just looking to gain some insight on replication.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
1. Technically No. Although if the distributor is in the same server, there'll be the inevitable resource waits. The publisher DB transactions themselves are not delayed per se, but the underlying resource contention can delay the transaction as a whole. Queuing is managed by the distributor. The publisher actually does nothing. The distributor will monitor the DB log of the publisher and replicate those changes to the subscribers. If the distributor is located in a separate physical server, there wouldn't be any waits.
2. Nope
SG
Aham Brahmasmi!
|
|
|
|
|
I have made one class library in that lib I have a function where I am changing the parameters for the dataset query.
|
|
|
|
|
I'm using Oracle SQL Developer for all of my Oracle database development currently. Do you recommend any other tools out there? Prefer free, but willing to pay for a great dev tool.
Thanks!
|
|
|
|
|
|
Maybe I have been at it too long today, but am I missing something simple here?
DECLARE @SomeLongName VarChar(100) = 'Some long text'
DECLARE @temp TABLE(
someCode VarChar(10)
)
DECLARE @Sql VarChar(1000) =
'INSERT @temp SELECT MAX(SomeCode) ' +
'FROM MyTable ' +
'WHERE [Name] LIKE''' + LEFT(REPLACE( @SomeLongName, ' ', ''), 3) + '%'''
EXEC (@Sql)
I get 'must declare the table variable @temp' when I try to run this?
Please put me out of my misery...
(edit: Small typo in Sql)
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
modified on Wednesday, October 13, 2010 3:52 AM
|
|
|
|
|
This way should works:
DECLARE @SomeLongName VARCHAR(100)
SET @SomeLongName = 'Some long text'
CREATE TABLE #temp
(
someCode VARCHAR(500)
)
DECLARE @Sql VARCHAR(1000)
SET @Sql = 'INSERT into #temp SELECT MAX(SomeCode) FROM MyTable WHERE [Name] LIKE ' +
CHAR(39) + LEFT(REPLACE(@SomeLongName, ' ', ''), 3) + ' %' + CHAR(39) +
' select * from #temp drop table #temp'
EXEC (@Sql)
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.
www.aktualiteti.com
|
|
|
|
|
My sinvere thanks.
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|
|
You are welcome
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.
www.aktualiteti.com
|
|
|
|
|
Now, what if i want to do this in a UDF? (Can't use temporary tables in a UDF )
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|
|
I think you'll find you can't use dynamic sql in a UDF so the temp table is moot.
As the boy was useful it is polite to up vote his answer [edit] I must have missed the vote [\edit].
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Because you are using the execute the temporary table needs to be in the database tempdb.
I have even had to use CREATE TABLE ##Temp... to make an execute work.
|
|
|
|
|
This works fine in a SSMS query - it wont work in a UDF because of the dynamic sql.
I think I may have to look at using a trigger or something...as I want to use the result to create a field when a new row is added to a table.
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|
|
This one does execute.
DECLARE @SomeLongName VarChar(100) = 'Some long text'
DECLARE @Sql VarChar(1000)
SET @Sql='DECLARE @temp TABLE( someCode VarChar(10) )'
SET @Sql=@Sql+
'INSERT @temp SELECT MAX(SomeCode) ' +
'FROM MyTable ' +
'WHERE [Name] LIKE''' + LEFT(REPLACE( @SomeLongName, ' ', ''), 3) + '%'''
EXEC (@Sql)
The problem here is the scope in which the sql statement executes. The @temp table variable declared is different from the @temp variable used in the inline query as the scope of both the queries are different. To make the query work we need to run the query in same scope ie declare the table variable using the same SQL satements as one used for the query.
When you fail to plan, you are planning to fail.
|
|
|
|
|
SELECT Col1, Col2, Col3 FROM MyTable ORDER BY Col1, Col2, Col3;
6582 row(s) affected
SELECT DISTINCT Col1, Col2, Col3 FROM MyTable ORDER BY Col1, Col2, Col3;
6473 rows(s) affected
How can I get just the 109 rows that are duplicates? ie: the opposite of DISTINCT?
Thanks
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Try to union all by three selects like:
select distinct col1 from mytable
union all
select distinct col2 from mytable
union all
select distinct col3 from mytable
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.
www.aktualiteti.com
|
|
|
|
|
Thanks for the help, but unfortunately this does not give me the results I am looking for.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
You can do this using a Group By clause
SELECT Col1,Col2,Col3, COUNT(*) as DuplicateCount
FROM MyTable
GROUP BY Col1,Col2,Col3
ORDER BY DuplicateCount DESC
At this point you will have all the records, with the duplicates (Those with a count>1) at the beginning of the list.
Interestingly, you can reduce this to JUST the duplicates by replacing the ORDER BY with a HAVING clause
SELECT Col1,Col2,Col3, COUNT(*) as DuplicateCount
FROM MyTable
GROUP BY Col1,Col2,Col3
HAVING COUNT(*)>1
Now you only have the duplicates.
|
|
|
|
|
Thanks, this is exactly what I am looking for.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
You're next question will be how do I remove the duplicates?
Look into row_number() and partition over in BOL
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Actually not. Using the results I got using J4amieC's answer I am going to try and figure out which other column in the table will make these rows unique.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
hi i'm lookin for changing a scheme of my table
who can i do it
I already have a table with 20,000 record I created a new partition with a new shceme I want applied to my table
thanks
modified on Tuesday, October 12, 2010 10:26 AM
|
|
|
|
|
Use ALTER TABLE[^]
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.
www.aktualiteti.com
|
|
|
|