I'm trying to design some tables to store some data, which has to be converted to different languages later. Can anybody provide some "best practices" or guidelines for this?
Thanks
...
I want to insert say 50,000 records into sql server database 2000 at a time. How to accomplish this?
...
Earlier this week I ask a question about filtering out duplicate values in sequence at run time. Had some good answers but the amount of data I was going over was to slow and not feasible.
Currently in our database, event values are not filtered. Resulting in duplicate data values (with varying timestamps). We need to process that data ...
This
SELECT * FROM SOME_TABLE WHERE SOME_FIELD LIKE '%some_value%';
is slower than this
SELECT * FROM SOME_TABLE WHERE SOME_FIELD = 'some_value';
but what about this?
SELECT * FROM SOME_TABLE WHERE SOME_FIELD LIKE 'some_value';
My testing indicates the second and third examples are exactly the same. If that's true, my question ...
I always felt that expecting exceptions to be thrown on a regular basis and using them as flow logic was a bad thing. Exceptions feel like they should be, well, the "exception". If you're expecting and planning for an exception, that would seem to indicate that your code should be refactored, at least in .NET...
However. A recent scen...
I would like to know the best way to use a datagrid control linked to a combination (join) of data tables in a way that both simply allows both display, creation of new rows in underlying tables and deletion.
The datagrid appears to offer the latter capabilities but I have not found a way that I am happy with to do more than just displa...
How would I be able to get N results for several groups in
an oracle query.
For example, given the following table:
|--------+------------+------------|
| emp_id | name | occupation |
|--------+------------+------------|
| 1 | John Smith | Accountant |
| 2 | Jane Doe | Engineer |
| 3 | Jack Black | Funnyman |...
I have a table that holds only two columns - a ListID and PersonID. When a person is merged with another in the system, I was to update all references from the "source" person to be references to the "destination" person.
Ideally, I would like to call something simple like
UPDATE MailingListSubscription
SET PersonID = @DestPerson
WHER...
I have a problem in a query in Acess 2003 (SP3).
I have a query that includes some tables and a sub query. The sub query and tables are all joined to a main table. The query uses some aggregate functions and there is a HAVING clause that filters the result on the primary key (PK).
Under these conditions, a memo field of the main table ...
I have an index on columns A, B, C, D of table T
I have a query that pulls from T with A, B, C in the WHERE clause.
Will the index be used or will a separate index be needed that only includes A, B, C?
...
I have some tables that I build as a part of my report rollup. I don't need them afterwards at all. Someone mentioned to truncate them as it would be faster.
...
Is there such a thing as too many stored procedures?
I know there is not a limit to the number you can have but is this any performance or architectural reason not to create hundreds, thousands??
...
What are the different types of indexes, what are the benefits of each?
I heard of covering and clustered indexes, are there more? Where would you use them?
...
OK, First let me state that I have never used this control and this is also my first attempt at using a web service-- My delima is as follows. I need to querry a database to get back a certain column and use that for my autocomplete. Obviously I dont want the querry to run everytime a user types another word in the textbox, so my best gu...
Is there a similar way in SQL to achieve the following, but with sql server agent jobs instead?
here's how I do it for stored procedures..
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[storedproc]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[storedproc]
GO
CREATE PROCEDURE [d...
Hi,
2 tables:
Employees
- EmployeeID
- LeadCount
Leads
- leadID
- employeeID
I want to update the Employees.LeadCount column by counting the # of leads in the Leads table that have the same EmployeeID.
Note: There may be more than 1 lead with the same employeeID, so I have to do a Distinct(SUM(employeeID)).
...
What are the patterns you use to determine the frequent queries?
How do you select the optimization factors?
What are the types of changes one can make?
...
I have a SQL query (MS Access) and I need to add two columns, either of which may be null. For instance:
SELECT Column1, Column2, Column3+Column4 AS [Added Values]
FROM Table
where Column3 or Column4 may be null. In this case, I want null to be considered zero (so 4 + null = 4, null + null = 0).
Any suggestions as to how to accomplis...
I was wondering if there was a way to use "find_by_sql" within a named_scope. I'd like to treat custom sql as named_scope so I can chain it to my existing named_scopes. It would also be good for optimizing a sql snippet I use frequently.
...
I use several referenced tables with integer primary keys. Now I want to change ints to GUIDs leaving all references intact. What is the easiest way to do it?
Thank you!
Addition
I do understand the process in general, so I need more detailed advices, for example, how to fill new GUID column. Using default value newid() is correct, bu...