Skip to content
Advertisement

Tag: c#

Create XML from SQL select query

I am trying to create a xml from a SQL select, but I can not insert “:” (like cac:PartyTaxScheme), neither can put 2 data in one element, look element “cbc:CompanyID” (<cbc:CompanyID schemeName=”31″ schemeID=”0″ schemeAgencyID=”195″>900711000</cbc:CompanyID> ), how can I do it ? Next is the example I want to expect: Thanks a lot Answer Using Xml Linq :

Insert into select SQL with windowsForm

I want to insert some data in Table1 in my database selecting it from another Table2 but the Table1 has another attribute for username (ComputerName). What I have tried: Answer I think you are looking for something like this :

How to calculate employees working hours in sql

My company business hour is 7:30 to 18 and 13:00 to 15:00 is lunch time. Important part is about lunch time that should not calculate as working time of employee at all. So imagine employee start working at 8:30 and exit at 15:00 so the time of 4:30 hours should be calculate for him. actually I want to remove lunch

SQL query with dynamic parameters

I tried to get some data from DB. I need get account information from my table – this type of information will depend on User. If he/she will insert account type = 1 -> he will get this information. How could I create query if it will depend on user: for example user could choose one or more account types

Advertisement