2,935 Topics

Member Avatar for
Member Avatar for bnitishpai

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 …

Member Avatar for code739
0
206
Member Avatar for bnitishpai

In my database table, 16 rows are inserted with null values for all columns. How can I delete these rows using SQL statement?

Member Avatar for darkagn
0
154
Member Avatar for bnitishpai

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.)

Member Avatar for bnitishpai
0
238
Member Avatar for HunainHafeez

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 …

Member Avatar for JorgeM
0
633
Member Avatar for spowel4

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 …

Member Avatar for spowel4
0
232
Member Avatar for Stuugie

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, …

Member Avatar for Stuugie
0
356
Member Avatar for M.Waqas Aslam

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 …

Member Avatar for adam_k
0
245
Member Avatar for Stuugie

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 …

Member Avatar for BitBlt
0
141
Member Avatar for satti

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 …

Member Avatar for satti
0
325
Member Avatar for mada.hauptfleisch

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 …

Member Avatar for BitBlt
0
234
Member Avatar for jacksantho

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 …

Member Avatar for BitBlt
0
210
Member Avatar for Hers2keep

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 …

Member Avatar for BitBlt
0
152
Member Avatar for silvercats

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

Member Avatar for barb.saunders.5
0
4K
Member Avatar for Stuugie

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 …

Member Avatar for Stuugie
0
130
Member Avatar for niladri.prima

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 …

Member Avatar for moone009
0
95
Member Avatar for Stuugie

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. ![Diagram](/attachments/large/3/Diagram.JPG "Diagram") Right now I am using SSIS 2008 to get data from Statistics Canada and load the …

Member Avatar for Stuugie
0
233
Member Avatar for Lethugs

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 …

Member Avatar for Lethugs
0
286
Member Avatar for toldav

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 …

Member Avatar for toldav
0
239
Member Avatar for Arjun_Sarankulu

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 …

Member Avatar for Arjun_Sarankulu
0
147
Member Avatar for niladri.prima

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. …

Member Avatar for pritaeas
0
79
Member Avatar for n3xtgen

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: …

Member Avatar for Momerath
0
226
Member Avatar for zachattack05

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 …

Member Avatar for zachattack05
0
214
Member Avatar for amishraa

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 …

Member Avatar for john.knapp
0
173
Member Avatar for grarhakim

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 …

Member Avatar for grarhakim
0
246
Member Avatar for Lethugs

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 …

Member Avatar for Lethugs
0
315
Member Avatar for john.knapp

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() ' …

Member Avatar for john.knapp
0
532
Member Avatar for HunainHafeez

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 …

Member Avatar for JorgeM
1
268
Member Avatar for rexyspy

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. …

Member Avatar for pritaeas
0
194
Member Avatar for HunainHafeez

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 ?

Member Avatar for JorgeM
0
199
Member Avatar for Lethugs

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 …

Member Avatar for darkagn
0
309
Member Avatar for HunainHafeez

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 ?

Member Avatar for JorgeM
0
208
Member Avatar for AmrMohammed

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 …

Member Avatar for spectra
0
121
Member Avatar for niladri.prima

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 …

Member Avatar for adam_k
0
143
Member Avatar for cyberdaemon

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 …

Member Avatar for cyberdaemon
0
128
Member Avatar for bayle.nicolas

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 …

Member Avatar for bayle.nicolas
0
1K
Member Avatar for agr8lemon

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 …

Member Avatar for adam_k
0
1K
Member Avatar for Pgmer

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 …

Member Avatar for Pgmer
1
114
Member Avatar for solomon_13000

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 …

Member Avatar for buddylee17
0
157
Member Avatar for Fost

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 …

Member Avatar for buddylee17
0
139
Member Avatar for HunainHafeez

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 …

Member Avatar for JorgeM
0
250
Member Avatar for HunainHafeez

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 …

Member Avatar for HunainHafeez
0
807
Member Avatar for HunainHafeez

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 …

Member Avatar for HunainHafeez
0
950
Member Avatar for solomon_13000

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 …

Member Avatar for solomon_13000
0
208
Member Avatar for thewilf

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 …

Member Avatar for thewilf
0
214
Member Avatar for anisha.silva

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 …

Member Avatar for AleMonteiro
0
205
Member Avatar for jrm44

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 …

Member Avatar for BitBlt
0
783
Member Avatar for HunainHafeez

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"] = …

Member Avatar for roopeshpm
0
379
Member Avatar for HunainHafeez

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 ?

Member Avatar for HunainHafeez
0
259
Member Avatar for HunainHafeez

see i am using this mode of SQLDATASOURCE configuration ![154](/attachments/small/3/154.jpg "align-left") 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 …

Member Avatar for HunainHafeez
0
398
Member Avatar for AmrMohammed

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 …

Member Avatar for AmrMohammed
0
110

The End.