Viewing 15 posts - 541 through 555 (of 5,502 total)
You would need to mofiy the application that is used to delete the row. E.g. query the log table you mentioned.
March 3, 2012 at 1:52 am
I would use a stored procedure to get the list of users, select the results into a temp table and, using a *cough* while loop, send the sproc per...
March 2, 2012 at 3:19 pm
Replace A.TOTAL with A.TOTAL*1.00 to avoid an integer divsion (usually resulting in a zero value in such a scenario).
Example:
SELECT 1/2*100, 1/(2*1.00)*100
March 2, 2012 at 3:01 pm
March 1, 2012 at 12:01 pm
I would use a separate database just to make it easier for backup and restore.
A join would simply be
SELECT t1.col1, t2.col2
FROM table1 t1 INNER JOIN YourOtherDatabase.Schema.Table2 t2 ON t1.col1=t2.col2
As...
March 1, 2012 at 11:53 am
I would use an auxiliary table to hold the call information:
CREATE TABLE calls
(
callid INT IDENTITY(1,1),
appId INT,
callTime DATETIME,
...
February 29, 2012 at 4:20 pm
agustingarzon (2/29/2012)
...So, knowing this, what would you suggest ?
I would use a web site that would allow to define a table name and a list of columns with data...
February 29, 2012 at 2:23 pm
If users will be allowed to create tables, they should know how to design a database (e.g. build an ERM based on business requirements).
The issue with a separate schema vs....
February 29, 2012 at 12:26 pm
@dwain:
What query do you refer to when you write:
Also, the first solution is a bust because it doesn't return the correct row set in this scenario.
February 29, 2012 at 10:50 am
Please provide some ready to use sample data as described in the first link in my signature together with your expected result.
(Having more than 20 reads on no reply usually...
February 28, 2012 at 1:46 pm
Would you please clarify the scenario you're dealing with:
If it's a web app, you should be the one hosting the database. In that case, the question is: who don't you...
February 28, 2012 at 12:38 pm
Looks like a classic CrossTab problem (see the related link in my signature for details).
SELECT
T.Name,
MAX(CASE WHEN t.id=1 THEN T.Title ELSE NULL END) AS Title,
MAX(CASE WHEN t.id=2 THEN T.Title ELSE...
February 28, 2012 at 12:24 pm
Are you looking for something like a self-join?
DECLARE @tbl TABLE
(
Recordid INT , contact_date DATE
)
INSERT INTO @tbl
VALUES (1,'20110401'),(2,'20110501');
WITH cte AS
(
SELECT *, ROW_NUMBER() OVER(ORDER BY Recordid...
February 28, 2012 at 12:06 pm
Looking at the execution plan it seems like the statistics for PostingYTD are "slightly" off (estimated 43k rows vs. actual 2.000k rows).
Is there any index maintenance performed regulary?
February 28, 2012 at 10:17 am
Engr Shafiq (2/27/2012)
I am writing sqlserver queries from a long time....can you help me how to write insert/update and delete queries in a good and professional way?
New question - new...
February 27, 2012 at 11:30 pm
Viewing 15 posts - 541 through 555 (of 5,502 total)