I'm pretty perplexed... I've got 5 different test computers, all relatively blank Windows XP machines running similar hardware specs. I run a silent install of the FireBird (Classic) database and my application. Some computers require "localhost:" (or 127.0.0.1) before the database location to make a connection, and some simply don't wor...
DUPLICATE: http://stackoverflow.com/questions/467176/generating-sql-server-db-from-xsd
And here
http://stackoverflow.com/questions/263836/generating-sql-schema-from-xml
I have loads and loads of xml files with data, and a schema-file (.xsd) which describes the structure of the xml.
I want to store the data in a MSSQL-database so th...
In Oracle 10g, I have this SQL:
select dog.id as dogId from CANINES dog order by dog.codename asc
which returns:
id
--
204
203
206
923
I want to extend this query to determine the oracle rownum of a dog.id in this resultset.
I have tried
select rownum from
(select dog.id as dogId from CANINES dog order by dog.codename asc)
wher...
Hi guys
I need, if possible, a t-sql query that, returning the values from an arbitrary table, also returns a incremental integer column with value = 1 for the first row, 2 for the second, and so on.
This column does not actually resides in any table, and must be strictly incremental, because the ORDER BY clause could sort the rows of ...
Often I find myself working on a new project with a giant RDBMS whose schema I don't yet understand. I want to be able to mark a checkpoint in the database, do something in the app, and then go back to the database and ask it which tables changed (and ideally, what records changed).
Is there a way to do something like this with SQL? I...
I have a search screen in a Visual Basic .Net App that has text boxes for:
First Name Varchar(50)
Last Name Varchar(50)
Middle Name Varchar(50)
DOB DateTime
Home Phone Varchar(10)
Work Phone Varchar(10)
How would I create a stored procedure in SQL Server 2000 that would allow me to be able to searh on all/some/one of the fields. If ...
I have been asked to create a function in SQL Server 2005 that is a CLR hosted function I have created in .NET 3.5. Do CLR functions hosted in SQL have access to App.Config files or do all config options need to be passed as paramaters?
...
Hi,
I'm a Lotus Domino programmer who is in between consulting jobs - not by choice the consulting job market really sucks right now.
With some extra time on my hands I would like to receive some SQL training as a resume booster and to expand my skill set.
SQL is something I have used in the past, but I need a way to document my knowl...
I have inherited an Excel spreadsheet which contains an external data query. I can edit the query, which provides a list of the columns returned, but it does provide the table that this data comes from. Is there any way to retrieve the actual SQL behind the query?
...
As a database architect, developer, and consultant, there are many questions that can be answered. One, though I was asked recently and still can't answer good, is...
"What is one of, or some of, the best methods or techniques to keep database changes documented, organized, and yet able to roll out effectively either in a single-deve...
Hi,
I have to write code to clone a database entry with associated data in other tables and assign it a new ID. Simplified I have a MAIN Table with a key of ID and sub table say SUB1 with FK of ID and multiple records for each entry in MAIN.
I want to copy the data for a specific ID in MAIN to new records updating the ID to a new value...
I have some data in my user database that I would prefer to be encrypted. Most of the data will need to be decrypted when requested, but there are also passwords that can stay encrypted (in the old days we would use pwdcompare but I believe this is obsolete now).
I have followed the steps here, so I have now successfully encrypted my da...
I have a Comment table which has a CommentID and a ParentCommentID. I am trying to get a list of all children of the Comment. This is what I have so far, I haven't tested it yet.
private List<int> searchedCommentIDs = new List<int>();
// searchedCommentIDs is a list of already yielded comments stored
// so that malformed data does not ...
Hello!
Is it possible, by using a stored procedure, to fetch a column value from resultset into a local variable, manipulate it there and then write it back to resultset column? The column datatype is integer.
How would the syntax to write the value back look like?
Thanks in Advance... :-)
...
How would you model the references and citations to publications (articles, books, chapters, etc...)?
A publication can be an article, book or a chapter and it has many references to other publications and other publications refer to it (call these citations)
I need to be able to list the relationships among the publications: The refer...
This query seems to be running incredibly slow (25 seconds for 4 million records!) on Sybase v10 at a clients database:
Select max(tnr) from myTable;
With tnr being the primary key.
If I run it 1000x on our server however, it seems to go fast (15 ms...) which makes me think it's because the query result is cached. Is there a way to d...
Hi,
Is there any way in which i can clean a db in SQl Server 2005 i.e by dropping all the tables and deleting stored procedures, triggers, constraints and all the dependencies in one sql statement.
REASON FOR REQUEST:
I want to have a db script for cleaning up an existing db which is not in use rather than creating new ones, specially ...
Is it possible to create a database such that there are 2 tables across 2 different schemas within the database who reference each other?
I would like to clarify my question with an example.
Consider the tables, EMPLOYEE (empID, empName, deptId) and DEPARTMENT (deptId, deptName). We can impose a foreign key constraint on the EMPLOYEE.d...
I want to change a value from int or string format to datetime format. There is any function in SQL like the following?:
Function: Result
TimeAdd( nextrundate,"sec",45) 00:00:45
TimeAdd( nextrundate,"min",45) 00:45:00
TimeAdd( nextrundate,"hour",4) 04:00:00
But:
TimeAdd( ne...
Scenario:
I load some data into a local MySQL database each day, about 2 million rows;
I have to (have to - it's an audit/regulatory thing) move to a "properly" administered server, which currently looks to be Oracle 10g;
The server is in a different country: a network round-trip current takes 60-70 ms;
Input is a CSV file in a denorma...