2,736 Topics

Member Avatar for
Member Avatar for michaelzip

Hello I had a problem uploading or adding a file on the database and shows the error stated on the title. The column holding the binary data was set to varbinary(MAX). I couldn't find what was my error because I was able to upload a 900kb MS Word Document but …

Member Avatar for michaelzip
0
581
Member Avatar for Stuugie

Hi all, I am attempting to rename a file using the File System Task Editor in SSIS. In the Expression Builder, I have @[User::fileName]+(DT_WSTR,2)DATEPART("mm",GETDATE())+(DT_WSTR,4)DATEPART("yyyy",GETDATE())+".zip" but it returns the following error: > TITLE: Expression Builder >------------------------------ >Expression cannot be evaluated. >------------------------------ >ADDITIONAL INFORMATION: >The data types "DT_I4" and "DT_WSTR" are incompatible …

Member Avatar for Stuugie
0
337
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
205
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
153
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
236
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
231
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
354
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
244
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
137
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
324
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
226
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
208
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
151
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
127
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
94
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
229
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
282
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
233
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
77
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
220
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
171
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
234
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
308
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
529
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
191
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
196
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
303
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
119
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
139

The End.