DB2 how to get the last insert id from a table.
Hi, i want to get the value of the last id insert in a table. How i can do this? ...
Hi, i want to get the value of the last id insert in a table. How i can do this? ...
How do I convert a Hex color to and RGB color using T-SQL ...
I have one table called Orders PurchaseID VARCHAR purchaseDate DATETIME purchasePrice FLOAT I want to find the difference between the purchase price on one day versus another day - The puyrchaseID will be the same.(This is just an example table of course) SELECT a.purchasePrice AS purchasePriceDay1 , b.purchasePrice AS purchasePric...
Recently, I asked (and answered) a question on StackOverflow about why a unit test would work when run by itself and then fail sporadically when run with the whole batch of unit tests. See here: http://stackoverflow.com/questions/3072986/sql-server-and-transactionscope-with-msdtc-sporadically-cant-get-connection Unit tests passing when...
I want to build a product-search engine. I was thinking of using google-site-search but that really searches Google's index of your site. I do not want to search that. I want to search a specific table (all the fields, even ones the user never sees) on my data-base for given keywords. But I want this search to be as robust as possible...
I dont know how to explain what I want other then to give an example country prefix Argentina-Mobile 549 Argentina-Neuquen 54299 Argentina-Rosario 54341 Argentina-Salta 54387 Argentina-Santa Fe 54342 Argentina-Tucuman ...
Is there a way to include a blank row at the top of a sql query, eg if it is meant for a dropdown list? (MS Sql Server 2005 or 2008) Select * FROM datStatus ORDER BY statusName Where I want something like -1 (please choose one) 1 Beginning 2 Middle 3 Ending 4 Canceled From a table that is ordinarily just the...
I made a custom view for a group of three tables. How would I configure the view so that it can be edited by an application using it like a table? I am using SQL Server Studio Express. ...
I've got a settings table constructed with 'category' determining different products, 'varname' being the variable name, and 'info' being the value of the setting. so, for instance, select top 6 category, varname, info from settings_table where NODE_NAME='HTT-COMM-A' and section='Module Settings' and category in ('ProductA',...
I have an application in mind which dicates database tables be append-only; that is, I can only insert data into the database but never update or delete it. I would like to use LINQ to SQL to build this. Since tables are append-only but I still need to be able to "delete" data, my thought is that each table Foo needs to have a correspo...
In reference to my previous question: http://stackoverflow.com/questions/3082817/one-table-two-column-mysql-query-question The command: "SELECT hostname, GROUP_CONCAT(DISTINCT name) as name FROM comments GROUP BY hostname" returns the expected results: 192.168.0.1 user1,user2 192.168.3.5 user3 The same table "comments" also has a "t...
i have a table in which there are ids and resigning dates. a singlle id have more than one resigning date. how can i display the table in which one id have only one resigning date which is the latest ie the maximum date. can somebody help me plzz....thanx a ton ...
I have two tables like the below one in my DB. In the first table ITEM for evry DEPARTMENT_CODE there will be multiple ITEM_CODE. ITEM ---------------------------------------------------- "STORE_CODE" "ITEM_CODE" "DEPARTMENT_CODE" "011" "912003" "14" "011" "912004" "14" "011" "914001" "14" ----------------------...
Hello All: Can any body help me in understanding if the execution plan for functions cached in SQL server? Any online resource for this? Thanks Ashwani ...
I have following database structure, CREATE TABLE IF NOT EXISTS `analyze` ( `disease_id` int(11) NOT NULL, `symptom_id` int(11) NOT NULL ) ; CREATE TABLE IF NOT EXISTS `disease` ( `id` int(11) NOT NULL auto_increment, `name` varchar(10) NOT NULL, PRIMARY KEY (`id`) ) ; CREATE TABLE IF NOT EXISTS `symptom` ( `id` int(11)...
I want to filter out duplicate customer names from a database.A single customer may have more that one entry to the system with the same name but with little difference in spelling. So here is an example: A customer named Brook may have three entries to the system with this variations: Brook Berta Bruck Berta Biruk Berta let's assum...
Is it possible to make a row in MySQL inactive? So this row isn't used in the results of queries anymore? My client wants to keep the deleted members exists in the database, but I don't want to edit all the queries to check if the member is deleted or not. Or is there an easy way to move the entire row data into another "inactive" tabl...
I have job that runs every 15 minutes that uses robocopy to copy a backup of the tranaction logs to a different server. This job is failing USER has full access rights to both home folder and the destination folder. JOB SQL: robocopy "e:\Backup\SQL02$PROD" "\SERVER\DRIVE$\prod\sql\backup\" /MIR /E /Z /NS /NFL /NDL /NJH /NP /R:10 /W:...
Been doing a lot of searching and haven't really found an answer to my MYSQL issue. SELECT DISTINCT name, type, state, country FROM table Results in 1,795 records SELECT DISTINCT name FROM table Results in 1,504 records For each duplicate "name"... "type", "state", "country" aren't matching in each record. Trying to figure out ...
hi everyone, i want to compare between two times the first one is getting by the resultset of an sql query like the following: res = req.executeQuery("SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(timespent))) FROM dailytimesheet where trackingdate=CURRENT_DATE and matricule=36;"); res.first(); { retour.append("<td><label style=\"backgro...