Because you have stored you MSNUM as a comma separated string (idiot) you are going to have to split the string. For this you need a split function that will return a table with the date and 1 ID per row. You then use this table to join you 2 existing tables.
This is the direct result of crappy design where someone is too bloody lazy to create the additional table to store the Date/MSNUM as discreet records.
We are just switching over to SQL Server 2012 from SQL Server 2008 and we are having some trouble with an XML Source (from a URL dontcha know).
It works fine on 2008, but always reports that it can't find the file on 2012 -- even though it is able to find the file to generate an XSD.
Even on the same server under the same user.
The file exists and the user has access to it.
Has anyone else seen this? Any ideas? A quick search didn't turn up any clues.
I'm relatively new to sql and need help to accomplish what should be a straight forward task.
I need to insert record templates in a database table. The records are identical except for IDfield which is a sequence from n to n+count. I can't use Autoincrement because I want to be able to enter different templates where I can define the base index n.
I'm currently using transactions to insert records in batches but need a faster method using a single SQL statement.
2000 Apple Fruit Granny Smith
2001 Apple Fruit Granny Smith
2002 Apple Fruit Granny Smith
2900 Apple Fruit Granny Smith
A different fruit may have a base index of 6000 and so on.
I can't use Autoincrement because I want to be able to enter different templates where I can define the base index n.
Well technically his design is wrong, the ID field should be stupid bejond identifying the record. What you are calling an ID field is actually your CODe field and may be edited by the users. What happens if they want to change the code for Granny Smith Apples to 7 series?
You could always write a scrip/code for the loop passing in the start series and the product. You cannot avoid a loop somewhere.
Never underestimate the power of human stupidity
///In the getid.aspx page
<pre><%@PageLanguage="C#"AutoEventWireup="true"CodeBehind="authenticate1.aspx.cs"Inherits="hokm.Admin.authenticate1"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><scriptrunat="server">protectedvoid salam(object sender, EventArgs e)
Session["field1"] = sh1.Text;
Please enter your id number
so I put the Id in session["field1"];
and in the editinformation.aspx
I have a database named information and every row in this database has a unique id!
I want to update the row with the special id(that I have stored that id,for example it is in "ID" variable), but I dont know how should I use the select and update command to do this!
plz help me!