I have 3 tables:
users (id, name)
currency (id, name)
accounts (id, user_id, currency_id, amount)
And I want to read the data from accounts and present it in table-like view:
owner currency1 currency2 currency3
1 0 0 0
2 10 20 30
3 0 5 10
Where owner is ID of accounts.ow...
For ages I've been told not to store images on the database, or any big BLOB for that matter. While I can understand why the databases aren't/weren't efficient for that I never understood why they couldn't. If I can put a file somewhere and reference it, why couldn't the database engine do the same. I'm glad Damien Katz mentioned it on a...
What are the advanced Features With SQL2008 over SQL2005 Particularly with TSQL
...
I heard somewhere that declaring an Index on a date column is bad for performance, but I can't find any reference on the internet.
Suggestions?
...
I'm writing a high volume trading system. We receive messages at around 300-500 per second and these messages then need to be saved to the database as quickly as possible. These messages get deposited on a Message Queue and are then read from there.
I've implemented a Competing Consumer pattern, which reads from the queue and allows for...
I'm trying to do documentation on an SQL server 2008 database. This includes listing all tables, their columns, and the column types. I've been so far as to use "get-childitem | get-member" while browsing the table, the column, and the column's extended properties, and none of them return the data type of the columns. Is there a way to l...
I was just prototyping a new system for deferring certain operations until out of hours on one of our databases. I've come up with (what I think) a pretty simple schema. I was first prototyping on SQL Server 2005 Express, but have confirmed the same problem on 2008 Developer. The error I'm getting is:
Msg 8646, Level 21, State 1, Pro...
Hello Folks,
I have a field type varchar in sql server. It contains data like "010109" etc.
When I try to convert this to DATETIME it returns a value "9 Jan 2001" when the actual value should be "1 Jan 2009".
Does anybody have a fix for this?
Thanks for your help.
...
Hi,
I have 1 table with row data (No Primary Ky). and Another with Primary Key.
In row data table, i have multiple records on 3 perameters. And other 10 Field with same value in all the records on these 3 pereameters.
Eg.
aa bb cc dd ee ff gg hh ii p1 p2 p3 V1 V2 V3 V4
a1 b1 c1 d1 e1 f1 g1 h1 i1 zz 123 03-05-2009 5 2 3...
SQL Server 2008 Profiler always profiles all databases. I want to restrict profiling or output to a single database. How can that be done most easily?
...
After installing SQL Server 2008 Enterprise I received three error messages like this:
Setup has detected a non canonical discretionary access control list
(DACL) on directory 'c:\Program Files\Microsoft SQL Server\100\COM'.
Please verify your security settings and make corrections if needed.
What's going on or what I should do?
...
I have 2 tables
requests (ID, company_id, amount)
companies (ID, name)
with FK constraint (requests.company_id -> companies.id)
requests.company can be NULL
I need to get all requests and replace company_id with appropriated company name or left it blank if no company was specified.
I have next query:
SELECT R.[ID], C.[name] AS [c...
Hello,
I have just finished importing an ACCESS db (back-end) to a SQL Server 2008 db. My front-end is still ACCESS 2007 and the back-end is SQL Server 2008. What I've realized is that if I open a form (on a certain record) and then do some calculation which is supposed to fill in some text fields automatically on that form (for that rec...
I want to create a CLR Stored Procedure for SQL Server 2008 that references the System.Xml.Linq assembly. According to the documentation (http://msdn.microsoft.com/en-us/library/ms403279.aspx) this assembly is safe for use in SQL Server 2008.
However when I attempt to add a reference using Visual Studio 2008 (Team Suite with GDR R2 ins...
can anyone suggest Jobs that will improve database availablity and performance in sql server 2008?
...
Hi,
My company receives data from an external company via Excel. We export this into SQL Server to run reports on the data. They are now changing to PDF format, is there a way to reliably port the data from the PDF and insert it into our SQL Server 2008 database?
Would this require writing an app or is there an automated way of doing...
Edit: When I say "SQL Server", I'm really talking about the Management Studio. Sorry if that was confusing.
Oh I hate when things like this happen. I was working with SQL Server yesterday and trying out the PIVOT command to try to figure out how it worked. So I created a new table with four columns, and the first column was going to hav...
Hello,
I am an intern and was asked to do some research on SQL 2008 data compression. We want to store several parts of outlook emails in a table. The problem is that we want to store the entire email body in a field, but then want to compress it. Using Char() will not store the whole body, but will allow compression... using varchar() w...
I am creating a library management application with a membership form.
Types of Membership are:
Half yearly
Annually
Patron(For 15 Minutes)
Life Member
Now I have designed a table in SQL SERVER 2008 which consists of:
MemberId
Name
Joining Date
Expiration Date
Status
The status consists of either M for Member or E for Expired M...
I have created a new Schema in a database called Contexts. Now when I want to write a query, Management Studio doesn't recognize the tables that belong to the new Schema. It says: 'Invalid object name Contexts.ContextLibraries'...
Transact-SQL:
INSERT INTO [Contexts].[ContextLibraries] (ChannelId, [IsSystem])
VALUES (@ChannelId, 1)
W...