2,935 Topics
![]() | |
Hello all. I want to know whether it is possible to retrieve list of all tables found in a particular database titled 'Company'? It have got several tables with the names, Suppliers, Customers, etc etc. Just like Oracle, where you retrive all tables using select * from tab; . Is … | |
In my database table, 16 rows are inserted with null values for all columns. How can I delete these rows using SQL statement? | |
Hey guys, I'm working on a job. I need sql statement for the following query: "List all Employees Names with equal ages." (If possible, along with their year of birth, or date of birth.) | |
Error : SERVER TAG NOT WELL FORMED, why ? <%@ Page Language="C#" AutoEventWireup="true" CodeFile="employerView_ScrutinyMembers.aspx.cs" Inherits="employerView_ScrutinyMembers" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Scrutiny Members</title> </head> <body> <form id="form1" runat="server"> <div> <asp:TextBox ID="txtboxMemberName" runat="server"></asp:TextBox> <asp:Button ID="btnSearch" runat="server" Text="Search" onclick="btnSearch_Click" /> Or <asp:Button ID="btbViewall" runat="server" Text="View … | |
I have a table with these columns: stockNumber, storageID, lastPutDate, qtyOnHand Each stockNumber can have multiple storageID's but only one lastPutDate and qtyOnHand for each storageID. Here is an example of what the rows might look like: stockNumber storageID lastPutDate qtyOnHand ----------- --------- ----------- --------- 100505 R010101 2012-10-18 150.00 100505 … | |
Hi all, This is something I should know but for some reason the answer is eluding me. In a SSIS Script Task Editor, I am trying to set a package String variable called ReNameFile with the following VB.NET line using DateParts for month and year: Dts.Variables("User::ReNameFile").Value = Dts.Variables("User::fileName").Value.ToString + DatePart(DateInterval.Month, … | |
Dear All! I want to get my columns value into rows . i am taking sum of qty of each month . like this select sum(Case when month(invoicedate) = 1 then qty else 0 end) as janQty, sum(Case when month(invoicedate) = 1 then qty else 0 end) as febQty, sum(Case … | |
Hi all, I have a csv that has over 800,000 records that gets loaded into my db via SSIS package routines. However, there are about 190 records that I do not want to be loaded into the the database. The csv comes from an external source and is unaltered at … | |
i have a view named vw_admissionform with columns familycode,Regno,studentname,class for admission form . now if i want to print a student admission form by enetring registration no "regno" in txt1.text then his siblings should also be mentioned on the admission form as requirment by client. for this am using familycode … | |
I have Table1 with a VARCHAR(MAX) column which contains values like 4, 1.4, 0.3, 4.25 and I'm trying to take these decimal values and populate them into another table (Table2) with a DECIMAL (18, 2) column with the following Scalar-Valued Function: Convert to Number. (The reason why the column in … | |
Hi, Please look at my code Declare @tableName varchar(100), @total int, @sql nvarchar(2000),@id varchar(4) set @tableName='details'; set @id='C'; SELECT @sql= ' select @total = count(*) from details where id='+@id exec sp_executesql @sql, N'@total int output', @total output select @total Error: Msg 207, Level 16, State 1, Line 2 Invalid column … | |
I have a sproc that pulls six years of records for a report. The person who set it up years ago set it up using statically defined years which ended in 2009. I am rewriting this sproc to pull the current year and five years previous. In the process of … | |
there is a table. both "age" and "DOB" columns are there. how to give a SQL command to make "AGE" a derived attribute from "DOB"? thanks | |
Hi All, Something strange just happened. I just tried to open a package that I have been working on but nothing opens in Recent Projects on the Start Page in SSIS. The package title is also grey. I have no idea what happened or what I could have done to … | |
Hi All, I am trying to export data from SQL Server. But i am unable to do that. I have also created an SSIS pacage and after connecting the excel Manager when I am going to select the excel sheet it shows me the following error **The 'Microsoft.ACE.OLEDB.12.0' provider is … | |
Hi all, This is going to be difficult for me to describe but I'm going to give it a go! I have tables called tblCPI, tblCPI_Staging, & tblVSeriesList. Please see the diagram.  Right now I am using SSIS 2008 to get data from Statistics Canada and load the … | |
Query to make movement of a record I have this tables User Description Item UID Name DeID Dgroup ID DeID Name 1 Jose 1 Printer 1 1 Stylus 2 James 2 Monitor 2 1 Epson 3 2 Viewsonic Transaction Details Ttype IID UserName NewUser Release 1 Jose Release 2 Jose … | |
Hello, everyone I'm new into databases. I have an Oracle insert sequence that I need to convert to SQL server if anyone could help me to get this to work. I'm not sure if nextval is compatible with SQL Server. Here is the code: // original insert into invoice select … | |
For Security Concern, I am using mssql_execute(). I am not getting way to get the recordset return from procedure. Below is my sample code $query = mssql_init("USP_GET_ICIN_DATA",$mssql_link); mssql_bind($query, '@ICIN_NUMBERS',trim($icin_data), SQLVARCHAR, false); mssql_bind($query, '@FROMRECORDNUMBER', $start, SQLINT4, false); mssql_bind($query, '@LIMIT', $limit, SQLINT4, false); $result = mssql_execute($query); while ($row = mssql_fetch_assoc($result)) { $icin … | |
Hi All, From a table I am getting the length of character in a column. My query is below SELECT b.[file_id],b.[lineno],b.fileContent, datalength(b.fileContent) Length1 FROM FileBascContent b join filebasic on filebasic.[file_id]=b.[file_id] WHERE substring(b.fileContent,1,4) not in('VOL1','HDR1','UHL1','UTL1','HDR2','EOF1','EOF2') and filebasic.[file_id]=347 I am getting the result 98, 97 and 100 which is fine for me. … | |
I am trying to make a basic page in ASP.Net by inserting into a MSSQL database. When I run the page it does not insert anything and no error is produced :( The connection string name is right as well as the table name and fields. This is my code: … | |
So I downloaded the [Adventureworks 2012 SQL database](http://msftdbprodsamples.codeplex.com/releases/view/55330) to browse hoping to find something interesting and just nearly fell asleep looking at example data when I came across something new or that I at least never noticed before...a field with a data type of "xml(CONTENT Person.AdditionalContactInfoSchemaCollection)" and when viewing the … | |
The idea is to check whether if phone number already exists(data table). If the number exists, then it will create a new row under another table(output table) with the customer ID for that customer. Table data is where pre-loaded phone numbers are stored. Table input is the table where feed … | |
Hello, used tech: C# 4.0, sql-Server 2008 i have this stored proc: -- ================================================ -- Template generated from Template Explorer using: -- Create Procedure (New Menu).SQL -- -- Use the Specify Values for Template Parameters -- command (Ctrl-Shift-M) to fill in the parameter -- values below. -- -- This block … | |
Hi, I have 3 tables Description, Item, Transaction Description Item Transaction DeID Name IID Name DeID TranNo Type IID Date 1 Printer 1 Styl T10 1 1 Repair 1 2 Monitor 2 MPS 1 2 Repair 3 3 ImpSonic 2 I need to count how many printers, Monitors etc. are … | |
Consider this: I have a user-defined stored procedure which returns a bit value as OUTPUT. In my calling code I want to check that value. I define it in my code as follows: Dim retval As New SqlParameter() retval.ParameterName = "@return" retval.SqlDbType = SqlDbType.Bit retval.Direction = ParameterDirection.Output DataCommand.Parameters.Add(retval) DataCommand.ExecuteNonQuery() ' … | |
i have an ajax Calender extender along with textbox in gridview, it works fine, when i select some date from calendar then it tranfers date to textbox and after clicking Update button in gridview , it sends date to database , Fine but when i don't select any thing from … | |
Hello Everyone... Can someone tell me what am not doing right here? Because am trying to insert a record into a database through a VB.net 2012 windows form into a MSsql satabase. Problems: When I write the codes without the insert statement, it will work well and open the connection. … | |
i have tblScrutiny , COLUMNS: teamid name userid now confusion is that every team has many members, so how how would i mention them, like e.g i mention 1 member in teamid =1 , then in next row the teamid changes (identity=ON) , so how to mention 2nd member ? | |
Hi, I have 3 tables Description Item Transaction DeID Name IID Name DeID TranNo Type IID Date 1 Printer 1 Stylus T10 1 1 Repair 1 2 Monitor 2 HP 1 2 Repair 3 3 ViewSonic 2 I need to count how many printers, Monitors etc. are in Item and … | |
i want to grab "DataValueField" of dropdownBox and want to use it in INSERT statement , so how ? i have already filled my Dropdownbox in grid view now want to get DataValueField and using it in insert statement , how ? | |
Greetings, I'm developing an HRM application and such application including functionality like hiring decision, moving decision "for example, moving an employee from a department to another" etc. All such types of decisions done throgh the same Windows Form and each type of decision has a different data from the other … | |
Hi All, I have 44,000 data in a table (dbo.IA_Subscription) where I have only 2 columns; one is ID and another is Magazine_Type ID filed is filled with contact_ID and Magazine_Type is filled with 3 Magazine e.g. Papaer Type, Digital Type and Web Type. Now contact_ID is not unique...one contact_ID … | |
i have here my search code. i want to search for firstname, and gender, but what if firstname is empty and gender is the one were going to search. but the gender is not filtering they just filter the name. any suggestions.. SELECT --ACCOUNT_CODE --HOSPITAL_CODE MRN ,CONVERT(DATE,BIRTHDATE)BIRTHDATE ,FIRSTNAME ,MIDDLENAME ,LASTNAME … | |
Hello dear T-SQL community, I am working on some exciting project but my problem is not exciting and I have not been able to find a valid solution... (all related fix are arround BCP or BULK INSERT). The server where the DB is located is not allowing BCP / Bulk … | |
I'm a bit of a SQL newbie so I'm wondering if you can help me. I've looked on Google it for some time, but maybe I'm not using the proper terms. Here is my question: I have TableA that has the following columns: ID(PK), location, departA, departB. I would like … | |
Hi, I have my data which looks like '0/1,0/2,0/3,0/4' or '0/1,0/2,0/6,0/3,0/4' I need to select min and max of the numbers for example for first example my output should be 0/1-0/4 and for second it should be 0/1-0/6.. I am able to get like 0-1 or 0-6.. Any help would … | |
There are 5 columns in my table structure and they are: 1) Id - PK 2) Name 3) IdentityNo1 4) IdentityNo2 5) PassportNo Since duplicate records are inserted into the table I am attempting to remove the duplicate records. What makes the records unique is the IdentityNo1, IdentityNo2 and Passport … | |
Hi All, I'm having a bit of an issue with a stored procedure I have written which encrypts a value using ENCRYPTBYPASSPHRASE and DECRYPTBYPASSPHRASE. The problem is these functions return Varbinary data types which I need to append to a Varchar data type. Can anyone help with being able to … | |
i am getting nothing , i am trying to retrieve checkbox value and email address from gridview via code, I am succeeded in getting Checkbox value successfully but cannt get email address, even grid view has it, but i cant get, just blank, here is the code: .cs : protected … | |
i filled a gridview with tblUser, now gridview has a checkbox file (status), which is used to activate newly registered users, so i want to inform user via mail when admins activates him, mean when i (admin) checks checkbox field true, in edit mode of girdview then at that moment … | |
am near to cry bcz solving this problem took my whole day , simply, i am trying to get status of checkbox from grid view, so i converted it into tempaltefield and in .cs code i used findcontrol property but still getting error: Object reference not set to an instance … | |
When the exchCode is empty the record shouldn't be displayed. However the code below display the records. SELECT * FROM( SELECT bhCliCode, exchCode = CASE X.Which WHEN 'accSgx' THEN accSgx WHEN 'accHk' THEN accHk WHEN 'accIdx' THEN accIdx WHEN 'accUs' THEN accUs WHEN 'accSet' THEN accSet WHEN 'accPhp' THEN accPhp … | |
Hi all, Quick one for you, designing a bit of software in VB.net for a company that inputs data into an mdb file and then uses a web service to take this data an insert into an SQL server 2008 R2 database. I know I can have to instances of … | |
Hi I have two tables Employee and Job, Employee's prmary key is EID and in Job there is a EID that is a foreign key to Job. job has another column as the status of the employee. first the employee is added to the database and then the job detils … | |
I am having trouble figuring out how to execut the following SQL query. Say for example I have the following 2 databases. Db1 Col_1 Col_2 1 a 2 b 3 c 4 d 5 e 6 f 7 g 8 j 9 h 10 i Db2 Col_1 Col_2 1 j … | |
i am trying to do something like this but it gives me error that **cannot convert int to string** , even the field which i am accessing from db is int and i parsed it into int but why ? here is my code: userId = (int)com.Parameters["@ReturnValueUserId"].Value; Response.Write(userId); SqlDataSource1.InsertParameters["@userId"] = … | |
my griedview is half shown on browser's screen and even it disabled horizontal scroller on screen (browser), why ? whenever i fill my gridview with many columns than it is half shown and disables scroller too, why ? | |
see i am using this mode of SQLDATASOURCE configuration  and now on the basis of this sql statement i want to generate UPDATE, INSERT, DELETE queries, especially UPDATE and i tried my best to do it but can't. this thing is quite possible in the mode given below … | |
Greetings, I want to know what is the pest practice in the following issue. I have a From for releasing decision such as hiring employee, discharging employee etc. The process of releasing a decision takes the following steps 1- You fill the necessary data within the from and then click … |
The End.