For the purpose of organizing streamlined database timer-based polling, with every updating of database table I need to update a timestamp field in a SQL Server 2008 database (then poll, read its value, compare with the value in front-end and making decisions about reading the whole table).
Regarding all this, how I could read system ti...
Is a disconnected architecture too complex for the following story line? I'd be grateful if anyone could share any opinions or experiences that they may have.
There is a business application that runs inside the office network which consists of a desktop application and a SQL Server database. Some of the data is exposed to the general p...
How many records are considered normal for a typical SQL sever database table? I mean, if some of the tables in database contain something like three or four million records, should I consider replacing the hardware, partitioning tables, etc? I have got a query which joins only two tables and has four conditions in its WHERE clause with ...
Hi, here in this query I want to replace the values in Person.Contact of Adventureworks database with some new values. The below query case statement is working fine for other values but I am not able to change the values those are in NULL. I am using SQL Server. Any help is appreciated.
select contactid,Title,FirstName,MiddleName,
cas...
I have a table with an identity field. What the best SQL query to get the Ids of all the deleted records from this table?
...
How can I protect my PL/SQL source code.
...
There are lots of discussion about using MONEY or DECIMAL datatypes in SQL Server for holding financial data. It seems all it is about possible lost of precision when using MONEY datatype.
If I understand it right, this situation may take place when we do calculation with these values in stored procedures using T-SQL.
Do I assume righ...
ALTER PROCEDURE ReadNews
@CategoryID INT,
@Culture TINYINT = NULL,
@StartDate DATETIME = NULL,
@EndDate DATETIME = NULL,
@Start BIGINT, -- for paging
@Count BIGINT -- for paging
AS
BEGIN
SET NOCOUNT ON;
--ItemType for news is 0
;WITH Paging AS
(
SELECT news.ID,
news.Title,
news.Description,
news.Date,...
here is the table
and data like:
id name
1 test1
2 test2
3 test3
4 test4
5 test5
6 test6
From above data i want the data like
if i pass the id as parameter and return the data from from up and gown by order
Example if i pass the id as parameter = 4 then it should be return
upline 2 row and downline 2 row for particular id,...
In SQL Profiler 2005, is it possible to capture a result set in a SQL trace, so that I could see corresponding queries with result sets? ...Or is it only a one way trace?
Thanks!
George
...
Here's a brain-twister for the SQL guys - can anyone think of a reason why the first of these functions performs fine, and the second one runs dog-slow?
Function A - Typically finishes in ~5 ms
CREATE FUNCTION dbo.GoodFunction
(
@IDs UniqueIntTable READONLY
)
RETURNS TABLE
AS RETURN
SELECT p.ID, p.Node, p.Name, p.Level
FROM...
I have a table name Overtime Hours which have the following columns
Ot_ID, Shift_Date, Employee_ID, Hours.
What I need to do is insert a set of values in these tables on the 1st date of every month, automatically.
for example, I need to add values('1/1/2010',12345,4.6) for january,
values('2/1/2010',12345,4.6) for february and so on fo...
I am redeveloping the front end and database for a medium size products database so that it can support categories/subcategories, product lines, manufacturers, supported software and product attributes. Right now there is only a products table. There will be pages for products by line, by category/subcategory, by manufacturer, by suppo...
SQL Server 2008 again. I have a primary key pt_id and a datetime column order_dts for each id. I want to count the number of keys in each year from 1996-2008 and return eight results - a count for each year. For a single year
SELECT COUNT pm.pt_id AS '1996'
FROM dm.medications pm
WHERE (pm.order_dts BETWEEN '1/1/1996' and '12/31/1996')
...
We have an application, consisting of an MS Access frontend (2007, mdb format), a few .net libraries and an SQL Server (2008) backend. I am working on an installer, which automatically installs the MS Access Runtime, our application, our libraries, SQL Server Express and configures everything.
Clearly, the MS Access application and the ...
How do I list all the databases for a given sql server 08 instance using sqlcmd?
...
I have the custom forumla in my record seletion formula editor in Crystal reports 8.5
{_v_hardware.groupName} =
{?companyname} and
({_v_hardware.DriveLetter} = "C" or
isNull({_v_hardware.Driveletter})
I'm trying to list all records with a drive letter C or has a Null value and it currently lists all records with the drive le...
I've set up a msSQL remote connection on a GoDaddy shared hosting account (known as Direct Database Access).
I'm doing some javascript/HTML/css work on the site and don't need/want to have to download/manage a separate database.
The remote connection works and the pages load as expected. However, each time I request a DB driven page in...
I need to create a hash key on my tables for uniqueness and someone mentioned to me about md5. But I have read about checksum and binary sum; would this not serve the same purpose? To ensure no duplicates in a specific field.
Now I managed to implement this and I see the hask keys in my tables.
Do I need to alter index keys originally cr...
I posted this at ServerFault and was told this would be a better spot for it.
I have some experience as a developer but am a complete novice when it comes to SQL administration and database design.
I'm converting my company's ordering and quoting process from a excel spreadsheet to something a little more robust using an ASP.NET applic...