|
AFAIK Peter is right, your UI is up for a rewrite and rightly so. Your database should be converted to something current and I am betting only the table structure will be transportable. You may need to fiddle with the drivers to get a valid connection, we had to use the FoxPro drivers on the last xbase app we moved.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
The above error occurs, while trying to merge table1 data(from db1 to table1 data of db2.
Thanks in Advance.
|
|
|
|
|
|
I have a problem, i need to protect a database(Sql or access), TDE is a good choice but only(Enterprise and Developer Edition), and i use Sql 2008 Express, any suggestions ?
|
|
|
|
|
You could put the database on a virtual drive[^] and crypt that. When moving the database, move the virtual drive.
Bastard Programmer from Hell
|
|
|
|
|
Hi can someone help me to solve a foreign key constraint problem? I’m using using Web Developer 2010 Express with mvc3. When my view loads I can create an object by clicking on the Create button but on the edit page, I click on save button and get an error message: That says my UPDATE statement conflicted with the FOREIGN KEY constraint giving the tables relationship and the column.
Here’s what I’ve tried so far: I researched and found that this error is a bug in SQL Server 7.0. but I'm using Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1
I found another tip that suggested that the id field in the main table is perhaps being called before the id fields of the associated table(s) was created. I tried changing the order by seeding all the other tables with data before my main table in my DBInitializer class. I also changed the order in my DBContext class… same error. Finally I decided to change the relationship directly in the database. I removed the relationship and created a new one (had to add fields in the main table to match the number of columns in the associated table). Nothing worked. I then removed the SetInitializer line from my Global.asax and created all tables from scratch directly in the database and as I created them, I found that I had to add data to the associated tables before adding stuff to my main table which seems to support an earlier suggestion but I still got the error message.
I then changed my SetInitializer back to seed the tables still got the same error. I have no problems when I click the “Create” button, only “Save” on the Edit page.
Any help would be greatly appreciated.
|
|
|
|
|
To really understand how to solve this problem, you must know what commands are executed against your database. One way to solve this issue is to turn on CASCADE UPDATE in your foreign key definition.
|
|
|
|
|
I am running a report in SQL SERVER 2008 that I inherited from a past co-worker in another state. The code is accessing two different servers, but SQl Server management studio seems to be only recongzing only one server/database/table at a time. Is it possible to access two servers while running one report in SSMS/ Below is the server names and databases:
ELMO.[HBS Patient Information].dbo.ECS_Plan_Information E (NoLock)
(Getting invalid oblect name when I hover over this)
[167.211.200.214].Billing03990.dbo.pclaim P
Ed English
|
|
|
|
|
You can link[^] servers within SSMS. Once set up, you can query both servers in a single statement, by prefixing the server-name before the database-name.
Bastard Programmer from Hell
|
|
|
|
|
I need one column from the table1 which need not be used comparassion but I need the colume (ID colum in this case)to get lised in the query result.
Ex :
<pre lang="SQL">select ID a,b,c from table1 except select a,b,c from table2
in the above example ID color of Table1 need not be compared with table to but just required in the query result for each rows.
Thanks in advance
modified 3-Feb-12 7:37am.
|
|
|
|
|
I think some of your post was truncated.
As a guess if you are suggesting that you want to return rows from two tables where there is no common columns between them then the answer is simple - use two queries.
|
|
|
|
|
If you are looking for records in table 1 where A,B,C records are not in table 2 then the following should help
Select * from table1 T
where not exists(Select * from Table2 TT where T.A = TT.A and T.B = TT.B and T.C = TT.C)
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Gr8 sir .. it worked .. you made my weekend ... I wish you a wonderfull weekend.
|
|
|
|
|
Here is a strange result that I am getting with Oracle. Unless I wrap the select from TABLE1 as shown (specifying "rownum > 0"), the query never seems to complete. However, when it is included, it only takes a second or two.
It doesn't make any sense to me, because all that it seems to do is force Oracle to evaluate the nested select with the alias "a" before performing the join. I had thought that placing it in parenthesis would do that automatically. Perhaps the Oracle optimizer does something wonky that this compensates for..? Scratching my head here, because all that the "where" condition adds is basically saying "give me any rows that you find".
select COUNTRY_NAME, count(*) TALLY from
(
select * from (
select IP_SOURCE_NUM from TABLE1
where log_date between '01-JAN-2012' and date '01-FEB-2012'
and IP_SOURCE_NUM > 0
) where rownum > 0
) a
JOIN ip_geo b on b.ip_from =
(
select max(ip_from) as ip_from_match from ip_geo
where ip_from <= a.IP_SOURCE_NUM
)
group by COUNTRY_NAME
order by count(*) desc
|
|
|
|
|
While passing up the opportunity to make sarcasic remarks about a 'wonky' Oracle you might be better served by asking Tom[^] as it sounds like a rather deep and very specific Oracle issue.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I think your link is broken.
|
|
|
|
|
As you already realized yourself, the paranthesis doesn't define in which order the query is executed, only what data the result is built from.
But by specifying Rownum > 0 you're forcing the optimizer to change the order of execution.
But I would use an optimizer hint instead. Like Select /* +materialize */ * from...
|
|
|
|
|
I suspected something like that was happening. I've never used optimizer hints before; I will look into that.
Thanks for the tip.
|
|
|
|
|
What is the wrong in this query
insert into tbTasks_New( AssignedToId)
values('Employee')
where
Owner = 'Seema'
|
|
|
|
|
1. It isn't a query
2. An insert is an insert - 'where' doesn't apply (not for the form given.)
It is also possible that 'Employee' is not a valid value for 'AssignedToId'
|
|
|
|
|
By Owner do you mean the schema owner of the table? I don't think I've ever seen an insert statement with a 'where' clause before.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
As jschell said.
If Owner is a column in a table an insert might be like:
INSERT INTO tbTasks_New(AssignedToId)
SELECT column1
WHERE owner = 'Seema'
If you use the value command you cannot use the where (you do not need to!)
|
|
|
|
|
your queary is like this...
insert into tbTasks_New( AssignedToId)
values('Employee')
where
Owner = 'Seema'
and your solution will be like this...!
Update tbTasks_New set='Employee' where Owner='Seema'
-----------------------------------
Actually u have to use update statment insted of insert statment...! and then u will get ur expected output.!
Dnyanesh Wahiley....
|
|
|
|
|
I need to Find un identical rows from two table based on combination of 3 columns. Both table has same structure. Using SQL Server 2005
Ie Table1 and Table2 to has the columns Type,ID,Parent
1. Query the rows from Table1 which are not matching in Table2 with respect to columns Type,ID,Parent (ie. Need not required the rows which are matching combination of Type,ID,Parent in both table)
2. Query the rows from Table2 which are not matching in Table1 with respect to columns Type,ID,Parent (ie. Need not required the rows which are matching combination of Type,ID,Parent in both table)
Please help!!
|
|
|
|
|
Here's[^] some nice basic info about joins and how to do them. It even has pictures
|
|
|
|