How can I use check constraint in sql server 2005.
i want to check for a particular set of values. eg check columnname should be between 1 to 5 check columnname should be either 1 or 2 or 4 ...
i want to check for a particular set of values. eg check columnname should be between 1 to 5 check columnname should be either 1 or 2 or 4 ...
In a [member] table, some rows have the same value for the email columns. login_id | email john [email protected] peter [email protected] johnny [email protected] ... Some people used different login_id but the same email address, no unique constraint was set on this column. Now I need to find these rows and see if they should be ...
Context: I notice that the major databases support only the Gregorian calendar. Thus, it would seem difficult to build a database app with anything other than the Gregorian calendar. If you have ever used a non-Gregorian date in a database app, I would be curious to know the context of your use case. For example, if you live in India, ...
the value buf has a datatype varbinary(max) and the value is 0x0000002D string buF = "0x" + BitConverter.ToString((byte[])dt.Rows[i]["BuF"]).Replace("-", ""); Label3.Text = buF; i use the value to find the fileid DataTable dt = new DataTable(); SqlConnection connection = new SqlConnection(); connection.Connec...
Hey SO, I'm making a website with two different databases. Let's say one is DB1, and the other is DB2. I've set up my database.php in the config folder, so they each have the correct host/password/username/database etc with db['DB1']['hostname'] and the other db['DB2']['hostname'] etc, so I'm pretty sure I've got that part right. Acc...
i'm a beginner user of microsoft visual studio 2008 and i want ask of what would be the initial code to connect a visual basic 2008 form to a sql server compact 3.5. i want to create an add new account program using the above applications. ...
OK. I am using the C# programming language to access a simple database (on Microsoft SQL Server) Currently, I am using the DataReader object to access the database. So here is my question: is it possible to do a binary search (in C#) for a particular piece of data so that i can make the search faster? Currently, I'm using a simple whil...
Hi. I am about to start building a new site in Wordpress on the same domain as the old site. I need the old site to stay live until the new one is launched and I also need to develop online. What is the best way to go about this? Should I create a subdomain or subfolder? How would I go about migrating the Wordpress site & database fro...
Is it possible for certain models to be in one database and other models in another (using the same connection)? I have a number of read-only tables that I want shared between multiple installations of my system. Other tables need to be per-installation. For the sake of example, let's say users is the shared table, and posts is per-inst...
Hello, I've around 1GB of structured text data, (which is currently stored in database MySQL, mroe than 1million records) used by software. I've to ship this data along with the software. I also need to protect this data. This data shouldn't be not accessible for users for other purposes. This software is just like an interface to data...
hi all How can I send session[table] to database in php ? like that. session_start(); session_register('table'); $qty=$_POST[txtQty]; $pid=$_REQUEST[pid]; $data=@mysql_query("SELECT * from products where productid=".$pid,$con) or die(mysql_error()); $table=$_SESSION[table]; while($row=@mysql_fetch_array($data)) { $table.='<tr>...
I am a MySQL fan , however i want to know in which situations choosing Oracle over MySQL seems like the way to go .. like what would be the indicators which would make you say .. "I need Oracle for this project" Update: As another fellow SOer pointed out, dont limit your answers to Oracle ... if you know of something better , please poi...
SELECT db1_t1.userid as userid , db1_t1.customer_id as vw_customer , db2_t1.customers_id as customer , db2_t1.orders_id as order FROM database1.table1 db1_t1 LEFT JOIN database2.table1 db2_t1 ON db1_t1.customer_id = db2_t1.customers_id It gives me this error: You have an er...
I would like to know if it's possible to use django over existing db tables that defines the models. Instead of defining models in order to create db tables ...
This is my current query $sel = "SELECT db1t1.userid, db1t1.customer_id, db2t1.customers_id, db2t1.orders_id, db2t2.products_price FROM database1.table1 db1t1 LEFT JOIN database2.table1 db2t1 ON db1t1.customer_id = db2t1.customers_id LEFT JOIN database2.table2 db2t2 ON db2t1.orders_id = db2t2.orders_id WHERE db1t1.use...
hi *, I need to trace changes on a record in database. I have some triggers on different tables that calls one stored procedure and this sp updates records in certain table (table1). I will trace records in table1 to find when and from where data are changed. Actually I use sybase 12.5 and I would know how to read LOG file by SQL qu...
I have the following tables... Tasks People tasks_people ... and I want to get a list of tasks, with a count of people assigned to them. Note that a person can be assigned to a task more than once (on different dates). For some reason I dont seem to be able to manage it. Thanks for any help! ...
I need to write a program. A part of the program is to write to an sql database (.mdf). I had a lot of trouble trying to add a new row to my table (called: "Data"). Here is the code: ... DataSet ds = new DataSet(); System.Data.SqlClient.SqlDataAdapter da; DataRow dRow; string sql = "SELECT * From Data"; da = new System.Data.SqlClient.Sq...
Hi, We are building a webapp which is shipped to several client as a debian package. Each client runs his own server. But the update and support is done by us. We make regular releases of the product, with a clean version number. Most of the users get an automatic update (by Puppet), some others don't. We want to keep a trace of the ve...
I've been looking for PHP, SQL open scripts on retrieving data from DB according to search terms. Now, every script I stumbled upon would not go well at this: say I'm looking for "barack obama's gay rights policy" ok? but in the DB there's "the obama policy on gays and their rights - an honest article". Albeit this is a pertine...