3,481 Topics
![]() | |
as title itself is saying what i am looking for over here. I formatted my pc and installed Sql server 2005. I detached db before formating the system and attached after formating. however after attaching i am getting Db in recovery/ readonly in object explorer. I tried to change properties … | |
Hi All, i have requirement like to Convert rows to columns in SQL server. i have retrieved data like below: MatchId SelectionName Odds 322 Home Win 1.33 322 Draw 5.00 322 Away Win 9.00 322 Under 2.5 2.40 322 Over 2.5 1.53 and want to convert like below: MatchId Home … | |
hi I tried to generate ageing reports in php. But I could not get result and even error. it is my code. Pls help me connection.inc.php try { $hostname = "server"; //host $dbname = "database"; //db name $username = "user"; // username like 'sa' $pw = "password"; // password for … | |
![]() | Need help! As you can see, I'm working with a crosstab report that will display the product's "Total Sales" or "Quantity Sold" on a particular year in a monthly basis. Now my problem is, I can't figure it out how I can display the monthly total sales or quantity sold … ![]() |
Hi All, I'm a little stuck with one table's design. I have a table called tblConference_Board that will be updated approximately 3 to 4 times per year. The following is my table design: `CB_ID int (PK)` `CB_Mnemonic_ID int (FK)` `CB_Value decimal (18,10)` `CB_Year int` `CB_Quarter int` This table is loaded … | |
Hi All, I have a table that holds monthly data in it. I need to average that data into Quarterly and Annual data but I'm not sure how to go about that. For annual I tried something like: SELECT TOP (100) PERCENT b.vSeries_Type as [Description],b.vSeries_Number as [CANSIM], Year(a.IPI_Ref_Date)as [Year], avg(a.IPI_Value) … | |
hi i am new to sql i want to get some values from different tables and i have made my own logic like that "SELECT course_name, course_id FROM tbl_course WHERE course_id = (SELECT course_id FROM tbl_enrollment WHERE student_id = '" + lbl_StudentID.Text + "')" what could the correct sytax for … | |
i am trying to make this code work with no success. Can anyone help me? ` $to = $_POST["credits"]; $messaging = $_POST["message"]; $sub = $_POST["subject"]; @mysql_query("INSERT INTO `mp_creditmail` (`Id`, `message`, `subject`, `read`) ('select Id from oto_members ORDER BY RAND() Limit $to;', '$messaging', '$sub', no");` i am trying to insert several … | |
please help me. i connected two system using a cross over cable, and was able to see the remote servers in both systems but i am experiencing a connection problem to the remote computer. how do i connect to the remote sql database server? and how do i replicate between … | |
I need to convert mysql class of one script to make a support for sqlite,but problem is sqlite dont have username/password thing nor database select as well,which means how some parts need to be removed.If i would convert to mssql one search and replace probaly would do the job.There is … | |
With the constant growth of NoSQL databases, wouldn't it be convenient if Daniweb had a nosql forum? Maybe not specialized forums like MSSQL, MySQL or Oracle, but a general forum for NoSQL database systems. | |
Hi All, I sort of want to get a "best practices" perspective regarding numeric values. First, I'll give my scenario: In my SSIS package, a CSV file is used for data extraction. Once extracted, a staging table is loaded with all the values from the CSV. One column, called "IPI_Value" … | |
Hi, Does anyone know how to pass table name as parameter in a cursor? ALTER PROCEDURE [dbo].[error_calculation] @tablename nvarchar(50) AS DECLARE @part_no nvarchar(50) --Current Year Cursor DECLARE db_cursorpartno CURSOR FOR select distinct part_no from @tablename ///This gives error OPEN db_cursorpartno FETCH FROM db_cursorpartno INTO @part_no | |
Can I get data from two databases (in same database server) to a c# project. How to include two edmx files? Or is there another way? Thank you in advance | |
Hi All, I'm working on filling a user variable called "EmailString" via a db connection with SSIS. I've created a script task to do this (the only way I can see how) and in it I have the following code: Public Sub Main() ' ' Add your code here ' … | |
Hi Group! I've created a stored SQL procedure that will need to be modified to lock the table, run the commands and then unlock the table. I need to do this because I want any other users/programs that will need access to "wait in line" until the procedure is finished. … | |
Hi I am not familiar with ajax. pls help me how i can do in script Below my script and using pdo and mssql 2005. Below script working fine. But everytime change the details, page refresh and display is delayed Pls help me --------------------------------------------------------------------------- index.php ---------------------------------------------------------------------------------------------- <?php include_once '../inc/connection.inc.php'; ?> … | |
I have a table called `DUTY` (columns: `dutyid, dutyname, staffid`) and a table called `STAFF` (columns: `staffid, staffname`) In order to be fair, each of the staff will be auto assigned to each duty entry (record). So what should I do whenever I would like to insert a duty entry, … | |
Hi Im working with a project, simple IM for our office... I have a Table in sql with column Status, if a user opens this application, the status column changes from 0 to 1, if it closes this app, the status turn back to 0. On my form load event, … | |
CAn i use 'waitfor' in t sql in sql server 2012 to wait in terms of days? eg. Wait three says after an event to do something else? Thankx in advance | |
I am moving from database from Microsoft Access to MS SQL and I have not worked with MSSQL before, can you recommend a good place to get some initial and then follow on training in SQL and MS SQL? | |
Hello! I need some help with a stored procedure for insert. I know this might sound stupid but I'm a beginner and I know the answer is there but I just can't find it. I've searched the site but I couldn't find an answer to clear me out ...or maybe … | |
I have a table with several columns, the two relevant columns for what I need to do are invoiceNumber and stockNumber. The scenario here is that it's a table of invoice information, so each invoice can have and will most likely have multiple rows in the table which represent each … | |
I was trying to update an existing data and this error message came up. Does anyone know what this error message means? Fatal error: Uncaught exception 'fSQLException' with message 'MSSQL error ([Microsoft][SQL Server Native Client 10.0][SQL Server]Violation of PRIMARY KEY constraint 'aaaaaPatient_PK'. Cannot insert duplicate key in object 'dbo.patient'. The … | |
Hi, Can anyone help me with my CASE statement update on a temp table. In my report I have the following case statement; 'STATUS' = CASE WHEN customer = 'BUS' AND country = 'GB' AND field_1 = 'X' THEN 'UK_BUS' WHEN customer = 'BUS' AND country <> 'GB' AND field_1 … | |
Hi Guys, I have a problem using the sqlsrv_connect function (in that it's failing!). I have been using mssql_connect on a server with an older verison of PHP where my connect string worked fine. But putting the information into the sqlsrv_connect doesn't let it connect. Here's my code that I … | |
while ( select AVG(Rate)+2 From HumanResources.EmployeePayHistory) <20 begin update HumanResources.EmployeePayHistory set rate=rate+2 From HumanResources.EmployeePayHistory if(select MAX(Rate)+2 From HumanResources.EmployeePayHistory)>127 break else continue end **I have Execueted this query but I am Not able to know what is this query working ? what is the use of this query ?? it will … | |
What is the procedure can be used in MS-SQL server 2012 in order to create a workflow as in dynamics CRM? Is there a way. Or what is the alternative? Thnakx in advance. | |
I have an assignment where i should demonstrate concurrency controls.In order to do that i should work with two sessions in the same database in ms sql server. How can i do that. | |
Hi, I want to copy records of a table say employee into the same table. For Example Table Employee contains 5 records. So i want to insert the same 5 records again into the same table Employee 20 times. I have tried the following Query (which is inserting records in … | |
Hi to all, As a newbie, I am not able to have the following columns into a datagrid. (see database diagram attached) (I don't want to select ID columns because users may not be able to identify the students). I don't master JOINS . Infact I want to select all … | |
Hi group, I'm still learning Visual Basic and SQL. Please overlook my inabilities. I'm writing a module that is meant to write a small amount of data to a database. I've named these fields 'PrinterID', 'PrinterName', 'PrinterNumber', 'PrinterLocation' and 'PrinterAddress'. The user will eventually have 30 or 40 records to … | |
Greetings, I have a table which contains product information called Products contains fields: ProductID, ProductName, and another table called UnitsInStores contains fields: StoreID, ProductID, UnitsNumber, UnitPrice My first question is: Is it better design to put the UnitPrice field within the Products table or to put it within UnitsInStores table … | |
Well i am having an interesting thing to discuss with you all people. i am having table in database where one column is having xml data with certain fields. I want to fetch those field using select query. So tell me if you can suggest something to me. Thanks a … | |
Hi, So i have a table called Resource in SQL in MS ACCESS,which has a field called Resource_Type which has values Permanent and Contract, what i'm trying to do is get the count of the number of permanent and contract employees so as to display it's ratio. This is my … | |
I have approx 80 rpt files ,the client want to convert them in to ssrs, is there any free tool?client using mssql 2008R2 ![]() | |
Hi to all, I want to install SQL SERVER 2008 on my XP 32-bit OS. After clicking on "New SQL Server stand-alone installation or add features to an existing " link unser installation tab, Setup Support Rules window shows success status of all rules except "Restart Computer". It neither directly … | |
Please help me im new in making database i dont know what tables will i create and its content pls.. 1. Develop a database design for a Student Attendance Management System. Create an ER Diagram to illustrate the relationship between the entities in your database. Below are the suggested list … | |
I am trying to implement a Login validation using C# 2005 in ASP.net 2.0 web application. The SQL Server database contains a table named "UserList" with columns LoginId, Password and Role. The Login webform should authenticate the LoginId and password and depending upon the Role assigned to that user/visitor should … ![]() | |
Hi, I would like to know how to find duplicate records based on exact match on some columns and slight difference on others... for example, I have a table with the following fields 1. Name nvarchar(50) 2. City nvarchar(50) 3. State nvarchar(50) 4. Age int(10) Now, I wish to search … | |
Hi all, I have a database with a set of relations created in SQL Server express. Is it possible to view or recreate the sql statements that created the database? Thanks for your time. Ryan | |
Hi. I have taken over the maintenance and development of an application created using C# in Visual Studio 2010 that makes use of an edmx file to provide mapping to a database (Microsoft SQL Server Compact 4.0). The database itself holds only tables with columns but no data at the … | |
Hi All I am upgrading a SQL 7 database to SQL2008 R2 and just cannot undestand why 2008 has a problem with the code for this view (my experience with SQL 2008R2 is limited): SELECT dbo.tbl_orgbusinessunits.BusAreaCode, dbo.tbl_orgbusinessunits.Region, dbo.tbl_orgbusinessunits.CompanyCode, dbo.tbl_orgbusinessunits.BusAreaCode & ' ' & dbo.tbl_orgbusinessunits.BusinessAreaName AS Branch, dbo.tbl_orgcompanies.CompanyCode & ' ' … | |
I have a trigger on insert CREATE TRIGGER [dbo].[InsertNewCustomersAsGroupMembers] ON [CustomerBase].[dbo].[Cutomers] AFTER INSERT AS BEGIN SET NOCOUNT ON; -- Insert statements for trigger here DECLARE @inserterdCustomerID uniqueidentifier UPDATE [CustomerBase].[dbo].[GroupMembers] ?---? END GO I want to get the values of the inserted record at [CustomerBase].[dbo].[customers] into the trigger inorder to update … | |
Hi to all, I try to insert a values in SQLSERVER 2005,It shows "Msg 544, Level 16, State 1, Line 1 Cannot insert explicit value for identity column in table 'designation' when IDENTITY_INSERT is set to OFF." BEGIN TRAN INSERT INTO DESIGNATION (ID,DESIGNATION) VALUES(17,'TEST') COMMIT Kindly Suggest How to Solve … | |
I have an entity named Country with fields: CountryID, CountryName where CountryID is a primary key. And i like to create a general stored procedure that does INSERT, UPDATE and DELETE operations. How can i do that? | |
SELECT Facility.[Facility Name] FROM Facility LEFT OUTER JOIN Reservation on Facility.FacilityID = [Reservation].FacilityID AND [Check-in time] = '" & Integer.Parse(cboHour.Text) & "' AND [Check-in date] = '" & lstDate.SelectedItem.ToString & "' WHERE Reservation].ReservationID Is NULL AND Facility.[Facility Type] = '" & cboFacilityType.Text & "' I have this sql statement which … | |
Hello, Im currently studying for Database Administration Fundamentals exam. I have bought Microsoft's official book but its really poor. At the end of every topic there is a test but there are no answers to those questions. Therefore, could someone go through my test and check it. https://docs.google.com/file/d/0B503TtEQXNHiX1U1UWVFdEZETUE/edit?usp=sharing https://docs.google.com/file/d/0B503TtEQXNHiMjhwTnZ2MVllZHM/edit?usp=sharing Thank … | |
Greetings I have the following question. I'm designing a new database for a human resource application. I will construct a table for employee information is it good to separate the employee information to 2 tables one for personal information and the other one for work data such as the salary, … |
The End.