.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Kaviya Balasubramanian
Imran Ghani
Post New Web Links

MULTIPLE RECORDS SINGLE COLUMN SQL SERVER 2000

Posted By:      Posted Date: September 06, 2010    Points: 0   Category :WPF
 
Hi Friends, I am creating an application for a jewellery shop (MINOR PROJECT) in VB.Net but my problem is that I dont know how to insert multiple records for same bill number. consider the following condition Bill Number Customer Name   ............................................... Customer Address ................................................ S.No                 Item name                Rate    Qty                            Total 1                      abc                            5        5                                 25 2                 &nb


View Complete Post


More Related Resource Links

Need to link multiple External Content List items to a single document metadata column

  
I have an external content list - for my purposes, the data isn't any fancier than a list of terms provided by a web service (read only - I don't need update/delete functionality). I want to be able to link any subset of those terms to a single document metadata column (in other words, I need it to work like a normal content list that is defined to allow multiple values in a column) but SharePoint doesn't let me do that on an ECL. I need the content list to be externally driven since more values are going to be added to an outside system over time, but I think it's possible that I may not need a full-fledged ECL list to make this work this way in SharePoint. Just to clarify: I don't need the metadata values in my documents to maintain a PERSISTENT link to the web service (if someone changes an underlying value in the web service DB, it doesn't need to be updated in the document table too). I just want SharePoint to offer up an updated set of source values from the web service if somebody goes in and edits the document metadata. Any ideas for how I can make this work?

Inserting multiple records under the single query

  
Hi All,       I have to insert a multiple records under the single table.So i have to execute the command in the frontend for every records. Inorder to avoid i write the query like this   insert into table1(field1,field2) values('1','Test1'),('2','Test2'); and also i tried insert into table1(field1,field2) SELECT "1","Test1" Union all SELECT "2","Test2" But I am getting syntax error. How to insert a multiple records under the single query???...

what is stored the guidlocal column in MSmerge_genhistory table (MS SQL Server 2000)?

  
In MSmerge_genhistory table there is a column called guidlocal. I noticed that for a large subset of the records on both the publisher and the subscriber, the value in this column is '00000000-0000-0000-0000-000000000000'. What does it mean? BOL says that guidlocal is: "Local identifier of the changes identified by generation at the Subscriber." but I still can't make it out what does '00000000-0000-0000-0000-000000000000' mean?

SQL Server 2008 multiple lines in a varchar(MAX) column?

  

Hi,

I'm using varchar(Max) to store a text file content. It's not taking the newline character. I tried \n and char(13) etc.. whatever solution posted in the net.

ex : update test set f='This is line 1.' + CHAR(13) + CHAR(10) + 'This is line 2.' 

after updating it doesn't have any newline or linebreak. Can anyone help me in this how to have linebreaks in the varchar(max) field.

Thanks a lot.


Is it possible to save "Collections" to a single varbinary(MAX) field/column in a SQL Server 2008 da

  

I was thinking about the fastest way to retrieve a "set" of objects related to a specific user. For instance, if I was to create a website similar to Flickr where people upload lots and lots of photos(jpegs) what would be the fastest way to be able to retrieve those photos from the SQL Server database. Scenario 1: You store metadata about each file they upload to the website as a single row in a database table. Then when you want to retrieve a specific users uploaded files you simply scan the database file for every row matching the UserID and store them in memory.

SELECT PictureId, UserId, PathToFile, Caption, (etc.)

FROM Photos

WHERE UserId=@UserId

This, of course, gets all the information about all the photos a single user has uploaded. My concern with this approach is when the user activity goes from a few thousand to being in excess of a million.

This approach seems fine for a small website but does this method work for a million plus user website like Flicker or MySpace? When you have a million users and millions more photos does this approach still perform at acceptable speeds?

My idea was to actually attempt to create a collection in memory of "ALL" the PictureIds' for a single user and store them in-memory, in a collection and then save this collection as a single VARBINARY(MAX) field in the SQL

Convert NVARCHAR column data into DATETIME - SQL Server 2000

  

ExpiryDate column in Table Data Type is NVARCHAR , storing Dates ONLY without time as 2/10/2010 , 12/10/2010 IN DD/MM/YYYY FORMAT.

NOW IT IS REQUIERD TO RETRIEVE ALL RECORDS WHERE EXPIRYDATE BETWEEN USER PASSED START MONTH,START YEAR AND END MONTH, END YEAR.

USING SQL SERVER 2000

SUM(CASE WHEN CONVERT(datetime,a.expirydate,103) >= (CONVERT(datetime,'2010-01-07',103)) AND 
		CONVERT(DATETIME,a.ExpiryDate,103) < dateadd(month,1,(convert(datetime,'2010-01-09', 103))) THEN 1 ELSE 0 END) AS Expired

 

Your help is greatly appreciated. Spent hours to get this resolved.


A

EF: Add Multiple Records in Single Save

  


Hey guys,

I need to insert multiple records into a single table upon SaveChanges

I'm working with this.

        Dim NewContact As New Contact


        For i As Integer = 0 To (ContactDT.Rows.Count - 1)
            With NewContact
                .Id = Guid.NewGuid
                .Client = NewClient
                .Title = ContactDT.Rows(i).Item("Title")
                .FirstName = ContactDT.Rows(i).Item("FirstName")
                .LastName = ContactDT.Rows(i).Item("LastName")
                .PhoneHome = ContactDT.Rows(i).Item("PhoneHome")
                .PhoneWork = ContactDT.Rows(i).Item("PhoneWork")
                .PhoneMobile = ContactDT.Rows(i).Item("PhoneMobile")
                .PhoneFax = ContactDT.Rows(i).Item("PhoneFax")
                .Email = ContactDT.Rows(i).Item("Email")
            End With

            QCContext.AddToContacts(NewContact)

        Next


The loops pulls across the records stored in the DataTable... Is there an easier way to merge them?

You can probably figure out what is happening. The loop is replacing the values, rather than creating a new record in NewContact. 

I'm then applying that NewContact object to the Enquiry entity, but again - it's only applyin

Need to link multiple External Content List items to a single document metadata column

  

I have an external content list - for my purposes, the data isn't any fancier than a list of terms provided by a web service (read only - I don't need update/delete functionality). I want to be able to link any subset of those terms to a single document metadata column (in other words, I need it to work like a normal content list that is defined to allow multiple values in a column) but SharePoint doesn't let me do that on an ECL. I need the content list to be externally driven since more values are going to be added to an outside system over time, but I think it's possible that I may not need a full-fledged ECL list to make this work this way in SharePoint.

Just to clarify: I don't need the metadata values in my documents to maintain a PERSISTENT link to the web service (if someone changes an underlying value in the web service DB, it doesn't need to be updated in the document table too). I just want SharePoint to offer up an updated set of source values from the web service if somebody goes in and edits the document metadata.

Any ideas for how I can make this work?


HOW to write the one insertion Procure for multiple table Records in sql server 2008

  

i m facing the Proble

i want to insert values into multiple table in one insertion Procedure is it Possible?

see my info

Table name UserPersonal columns

            ([UserRegform_pkID] PK
           ,[UserPersonalDetails_FatherName]
           ,[UserPersonalDetails_MotherName]
           ,[UserPersonalDetails_Spouse]
           ,[UserPersonalDetails_OccupationType]
           ,[UserPersonalDetails_OccupationType1]
           ,[UserPersonalDetails_OccupationType2]
           ,[UserPersonalDetails_UpdatedDate])

 

second table userRegForm columns

            ([UserRegform_pkID] PK
           ,[UserRegform_FirstName]
           ,[UserRegform_SurName]
&n

how to create multiple dimensions on single parent column

  

How i cant create multiple dimensions on single parent column? 

This is the senario

 

Workflow fact table

Wf_id (int)

Source_Department_ID

Service_Department_ID

Created_Date

Etc

 

Department Dimension Table

Dept_id

DepartmentName

 

Now if i create dimension from dimdept , it have only one department name column, how i can use this same lookup to represent the service and source department names? Same senario pops up in sales fact tables as well , like manage_id and salesman_id both looks up to same parent table "Emp_id"


SQL Server 2000 Database in "single user mode"

  

Hi all,

I've an old production database server with SQL Server 2000 SP4, that runs from 6 years. Now sometimes I find that the production database goes in "single user mode". Why? My error logs don't help me.


Single shared "SQL Server Administrator" account or multiple accounts?

  

We have an environment where one of several admins might be asked to perform administrative tasks on a SQL Server 2008 running WS 2008 R2.

We are running mixed authentication and want admins to log in and administer SQL server and the database using their own admin accounts.

What I would like to do during installation, under "data base engine account provisioning" is add a domain security group to the list of SQL administrators and make sure that the admins who are allowed to administer SQL server and the database are in that group.

Is there a downside to doing that? for example the admin who runs the initial script to create the database might end up the owner of the DB... Will that be a problem, or is there some other approach we should take on this?

What I'm trying to avoid is having admins share a Windows account for DB administration. We mostly use remote desktop for admin tasks and that gets messy with a shared account.

thanks!

Display multiple Columns in Single Column in SQL CE 3.5

  

I have table with different columns

Ex. Device table

Columns : deviceid,devicetype,device1,device2,device3,device4

                    1  Swich board         D1      D2        D3       D4

                    2  Sensors              S1      S2         S3       S4

i want to display this  table contains in single row

Device Name

D1

D2

D3

d4

S1

S2

 

Please Help me

 

Thanks in advance

 

 



Multiple Column Dropdownlist for the ASP.NET DataGrid

  
Based on my previous control "Multiple Column DropDownList for ASP.NET", I received many emails asking for the same control to be used in the DataGrid for web applications. Here we go.. This control can be used as the regular MS DropDownList in the DataGrid and also as a regular dropdownlist. It has all the properties, like DataTextField, DataValueField, DataSource, SelectedIndex etc. The download file contains the samples both in VB.NET and C#. In this sample, I have used the Northwind database of SQL Server.

sql server 2000 vs 2005

  

i would like to ask what the difference between sql server 2000 and 2005 


merging multiple tables in a single dataset to single table

  

 i have a stored procedure which returns three tables to a dataset ..... now i need to merge all three tables to a single table from d same dataset 


like dataset1 has table1 table2 and table3 .... i want all the three tabels to be merged into dataset1 itself .... instead of three diffrent tables so that i can show all three table data in a single datagrid  as a compact data and combination of 3 tables from d single dataset.....



can some1 help me please.....


Data Points: XML Features in SQL Server 2000

  

SQL ServerT 2000 includes several XML features that let you transform relational rowsets into hierarchical XML documents, read XML documents, and bulk load data via XML. For example, you can pass an XML document to a stored procedure, join the XML to some tables and return a rowset, or even modify data in the database.

John Papa

MSDN Magazine June 2005


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend