Hello,
I'm having an issue with LINQ-SQL not updating an XML column. I've run in debug and all values are correct, and when checking the table data I find out that the XML has not been updated.
Also any suggested reading on DataClassesDataContext vs DataContext?
Code:
///TEST LINQ MIHAI NEW XML
protected void testLINQ()
{
using...
Here is the situation. I have 3 tables, one super type, and two sub types, with a relationship between the sub types:
|----------------| |-------------------| |-------------------|
| Post | | Top_Level | | Comment |
|----------------| |-------------------| |-------------------|
| PK | ID | ...
Hi,
I have two tables (Management and Employee).
The management table tracks the different management teams that have managed company X in past few years. Each management team is given an ID (i.e: managementnr), and each team has a CEO (namely ceoname).
The employee table tracks employees working for company X (basically just their ...
I have a select statement which will return me 5 values as val1,val3,val5,val2,val4
I have another select statement which is going to return a set of records with one of the column having values from the above set (val1 to val5)
Is it possible to sort the second select statement with the result of the first select statement?
I mean i...
In SQL (specifically MySQL, but the question is generic enough), what is the most efficient way to query time-series data when I have multiple tables across disjoint time ranges? For example, if my tables are as follows:
router1_20090330( unixtime integer unsigned,
iface1_in integer unsigned,
iface1_...
When the SQL Server (2000/2005/2008) is running sluggish, what is the first command that you run to see where the problem is?
The purpose of this question is that, when all the answer is compiled, other users can benefit by running your command of choice to segregate where the problem might be.
There are other troubleshooting posts rega...
The Query I'm writing runs fine when looking at the past few days, once I go over a week it crawls (~20min). I am joining 3 tables together. I was wondering what things I should look for to make this run faster. I don't really know what other information is needed for the post.
EDIT: More info: db is Sybase 10. Query:
SELECT a.id, a.da...
I've been looking at the SqlPubWiz.exe command to write a batch file so that I can keep my script up to date in my source control. But what I need is for the command line tool to allow me to pick specific tables to include (and that I can exclude others).
I think SqlPubWiz.exe won't do that for me (let me know if I'm wrong) but if someon...
Hello Everyone,
Fortunately, I know how to fetch data from the database, That's not a problem.
For my object oriented application I would have a table with users / persons.
I also have a person class.
The case:
I would like to show to the end user a list with all the persons. What is the correct way to show do this?
using mysql_fe...
In an extract I am dealing with, I have 2 fields. One field stores the dates and another the times as shown.
How can I query the table to combine these two fields into 1 column of type date?
Dates
2009-03-12 00:00:00.000
2009-03-26 00:00:00.000
2009-03-26 00:00:00.000
Times
1899-12-30 12:30:00.000
1899-12-30 10:00:00.000
1899-12-30...
I am trying to select data containing four percentage signs in a row. How can I escape the percentage signs so my LIKE condition works?
Thanks
...
I am trying to replicate a database from SQL server 2000 to 2005 they are located on two different servers both running Windows Server 2003 R2. Im am using SERVER1(SQL2000) as the Transactional publisher and distributor and SERVER2(SQL2005) is the subscriber. I can set up the publication and subscription but when I try to syncronize them...
Just speaking to a colleague of mine. He was walking with a hop in his step, on the way to the coffee machine.
I asked him "what's with the 'swarmy' walk?", he said, "I just reduced a two hour long query down to 40 seconds! It feels so good".
He altered a stored procedure, that was using cursors and introduced a temp table, that was re...
I am working with MS SQL 2005.
I have defined a tree structure as:
1
|\
2 3
/|\
4 5 6
I have made a SQL-function Subs(id), that gets the id, and returns the subtree table.
So, Subs(3) will return 4 rows with 3,4,5,6, while Subs(2) will return one row, with 2.
I have a select statement that returns the above Ids (joining this t...
Is there any way in MySQL to put the name of the database into a variable?
For example, when I have a database called 'db1', can I do something like this:
set @db= 'db1';
select * from @db.mytable;
EDIT: There is another example of what I want to do:
set @dbfrom= 'db1';
set @dbto= 'db2';
insert into @dbto.mytable (col1,col2,col3) sel...
My table called TimeList with 2 columns SlotID(int identity) and SlotTime(varchar) in database is like this.
SlotID SlotTime
1 8:00AM-8:15AM
2 8:15AM-8:30AM
3 8:30AM-8:45AM
4 8:45AM-9AM
5 9AM-9:30AM
likewise up to 6:45PM-7:00PM.
if i pass 2 parameters starttime and endtime as 8:00AM and endtime as...
I have the following Sql Query that returns the type of results that I want:
SELECT b.ID, a.Name, b.Col2, b.COl3
FROM Table1 a
LEFT OUTER JOIN Table2 b on b.Col4 = a.ID AND b.Col5 = 'test'
In essence, I want a number of rows equal to Table1 (a) while having the data from Table2 (b) listed or NULL if the condition, 'test', doesn't exis...
My goal is to get a query written. I have three tables, A, B and C. The tables are written such that A.bID = B.bID, and B.cID = C.cID. This basically allows me to write a query where I link a record from a to b, and link the b record to a record from c. So far so good, simple query.
What my problem is... one of the columns included in t...
I want to create something similiar to a facebook wall on my social site. I want to store the posts in an sql database and that should be rather simple. What I am looking for is a good way to display the posts? I guess I don't even really know where to start, as I can only think of using a loop to display asp:textboxes. Which obviously i...
Is the a way to generate an arbitrary number of rows that can be used in a join similar to the oracle syntax:
SELECT LEVEL FROM DUAL CONNECT BY LEVEL<=10
...