|
Long story short, what do you folks use to update a database in unison with a given software release? We have a 10+ year old in house tool that's ending it's life (SQL Server is ending SQL-DMO support). This is a company-written tool to move a DB from Version N to N.N in unison with a software release.
Do you guys write your own, or what links can you send me? I've been playing with RedGate's SQL Source Control, but our DB is big enough that it chokes on it. Small DBs seem to fly, but ours is a big, multi-year multi-product suite type of db.
Apex? What do you use or do you build your own? Ten years is a nice life cycle for this product so if we write one that's good for another ten, okay. I'd rather buy one first.
thanks for the input.
Think of how stupid the average person is, and realize half of them are stupider than that. - George Carlin
|
|
|
|
|
Backup/restore on a new server, I'm pretty sure you can restore an older version into a current database. Not sure if the version range is too wide though. Unless you have a pressing need to update the code in your database.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi
Using SQL Server 2008 R2. I have a stock table, with the following fields: warehouse, product, long_description, physical_qty.
All products exist in warehouse '01'. Some of the products exist in warehouse '03' Faulty (or NG) goods get transferred to warehouse 03.
I need a query to show distinct(product), long_description, physical_qty (for warehouse 01), physical_qty (for warehouse 03)
Example data:
warehouse product long_description physical_qty
01 00-00001 Item 1 100
03 00-00001 Item 1 5
01 00-00002 Item 2 200
Desired Result:
Product Description Stock_Qty NG_Qty
00-00001 Item 1 100 5
00-00002 Item 2 200
I have tried this, but don't get distinct products (i.e. Item 1 appears in two rows)
Select distinct(product), long_description, case warehouse when '01' then physical_qty else 0 end as [Stock_Qty], case warehouse when '03' then physical_qty else 0 end as [NG_Qty] from vektron2.scheme.stockm group by product, warehouse, long_description, physical_qty order by product
|
|
|
|
|
|
Thanks Mycroft - will give it a try tonight
|
|
|
|
|
I would like to search all User defined tables in a database for given condition.
Say for example my condition is (playerid = 10000052 or tripid = 10000124 ) and TripDtm =
'2013-02-03 00:00:00.00 +00:00'
I would like to get result from the tables which return at least one record for the condition.
How to achieve this? Please do assist.
|
|
|
|
|
Have a look at this article - it seems to do what you are looking for
Search for a Value Throughout Your Database[^]
It's well known that if all the cat videos and porn disappeared from the internet there would be only one site left and it would be called whereareallthecatvideosandporn.com
|
|
|
|
|
Hi i created a web service in PHP using mysql now i wan to change the same into SQL is there any option.
---------------------------------------------------------------
-- phpMyAdmin SQL Dump
-- version 3.1.3.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 21, 2013 at 11:46 AM
-- Server version: 5.5.16
-- PHP Version: 5.2.9
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `lt`
--
-- --------------------------------------------------------
--
-- Table structure for table `user_details`
--
CREATE TABLE IF NOT EXISTS `user_details` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`First_Name` varchar(255) NOT NULL,
`Last_Name` varchar(255) NOT NULL,
`Middle_Name` varchar(255) NOT NULL,
`Door` varchar(255) NOT NULL,
`Street` varchar(255) NOT NULL,
`Building` varchar(255) NOT NULL,
`Area` varchar(255) NOT NULL,
`Theil` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table `user_details`
--
|
|
|
|
|
MySQL is basically SQL. Just try it out and correct the errors you stumble upon.
|
|
|
|
|
Aren't there any tools for migrating the data from MySQL to Microsoft SQL Server? That would be the easiest thing.
You cannot just load the backup from MySQL into SQL Server: all table/column names are escaped with ` - SQL Server uses [] . E.g. `user_details` => [user_details] . If the name does not contain spaces or is a reserved word, you could remove the quotes.
And before loading the data into the table, you must do a SET IDENTITY_INSERT [user_details] ON (and switch it off afterwards).
I'd also suggest to change the varchar into nvarchar: that safely allows for national characters.
|
|
|
|
|
Hi I want to set Sql server R2 with sql server mode,but I can not find it in Sql server R2 mode.it have only 2 mode window Authencation or Mix mode.do you have an idea about this? thank in advanced
|
|
|
|
|
This article [^]seems to imply that sql only authentication is not recommend. MS want you to use AD authentication!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
a.stateId=b.stateId and a.districtId=c.districtId and b.stateId=c.stateId"
|
|
|
|
|
What? Your question title and the content does not look anywhere near. Please elaborate more on what are you trying and where are you stuck?
|
|
|
|
|
I'm not sure what you mean, but...
It's not "connectivity", it's JOIN[^] specification. Join hints specify that the query optimizer enforce a join strategy between two (or more) tables, based on a relationship between certain columns in these tables.
In your example you have joined 3 tables on stateid and districtid fields.
More: http://www.w3schools.com/sql/sql_join.asp[^]
|
|
|
|
|
hi i am disabling all past dates and remaining dates in green color with the following code
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
if (e.Day.Date < DateTime.Today)
{
e.Day.IsSelectable = false;
e.Cell.ForeColor = System.Drawing.Color.Gray;
}
else
{
e.Cell.ForeColor = System.Drawing.Color.Green;
}
}
i have two dropdownlists ddlFrom and ddlTo.i vil select dates from these dropdownlists to book a room in a hotel.the dates fromdate to todate should appear in red color...any help is appreciated
|
|
|
|
|
try this .First get from and to date in two variable then compare them
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
DateTime FromDate =Convert.ToDateTime(ddlFrom.SelectedValue);
DateTime ToDate =Convert.ToDateTime(ddlTo.SelectedValue);
if(e.Day.Date >= FromDate && e.Day.Date <= ToDate )
{
e.Cell.BackColor = System.Drawing.Color.Red;
}
}
|
|
|
|
|
|
it is working!!!!!!....have u set dropdownlists autopostback property to true...for this code it is required
|
|
|
|
|
now i have been instructed to use textboxes...
now i am using the following code
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{if (e.Day.Date < DateTime.Today)
{
e.Day.IsSelectable = false;
e.Cell.ForeColor = System.Drawing.Color.Gray;
}
else
{
e.Cell.ForeColor = System.Drawing.Color.Green;
}
if (e.Day.Date >= FromDate && e.Day.Date <= ToDate)
{
e.Cell.ForeColor = System.Drawing.Color.Red;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
FromDate = DateTime.ParseExact(txtFrom.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture);
ToDate = DateTime.ParseExact(txtTo.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture);
}
when i run the application the dates which user enters are appearing in red color in calender...but the pbm i am facing is i vil stop running the application & once again re-run application...this time user entered dates are not in red color....they are in green color. the same pbm i faced when i was using dropdownlist....even now also, the same issue i am getting...even when i stop & rerun the application user entered dates should appear in red color...by seeing red color in calender user comes to know that those dates are already booked...so he vil enter other dates..when the user clicks on calender image ,all past dates shoud be disabled....and booked dates in red color and rest of the dates in green color...at the bottom of the page indication is given to user that gray colored dates are not selectable,red colored dates are already booked and green colored dates are available for booking....this is the concept i am using...pls guide me how to solve my issue....
|
|
|
|
|
is it possible to check e.Cell.ForeColor in if then ur problem may solve.. try it for example
and u have store this booked dates in database ..use this link for help http://msdn.microsoft.com/en-us/library/ms228044(v=vs.90).aspx[^]
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
if (e.Day.Date < DateTime.Today)
{
e.Day.IsSelectable = false;
e.Cell.ForeColor = System.Drawing.Color.Gray;
}
else
{
if(e.Cell.ForeColor != System.Drawing.Color.Red)
e.Cell.ForeColor = System.Drawing.Color.Green;
}
if (e.Day.Date >= FromDate && e.Day.Date <= ToDate)
{
e.Cell.ForeColor = System.Drawing.Color.Red;
}
}
modified 26-Mar-13 4:21am.
|
|
|
|
|
Hello my friend's
I have a question in part of my DB,Please check it:
-------------
****operator
idoperator
.
.
****role
id Role
title
.
.
****operator_role
idoperator
idRole
...
****capability
idCapability
title
.
.
****role_capability
idCapability
idRole
....
****operator_Capability
idOperator
idCapability
value
-----------------
is this true solution???
Best Regards
|
|
|
|
|
If I'm not mistaken you have the fifth normal form here. I see nothing wrong in that.
"The ones who care enough to do it right care too much to compromise."
Matthew Faithfull
|
|
|
|
|
I'm hunting around for a negative comment - nope can't find one, oh wait underscores, hate underscores. Design is fine.
Never underestimate the power of human stupidity
RAH
|
|
|
|