- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 13
- Posts with Upvotes
- 11
- Upvoting Members
- 5
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re: When I did my final project instead of trying to think of an aimless program that hundreds of other students have already done and will just be scrapped the second it was graded. I found a small charitable organization in my city and offered my services. Small organizations always need … | |
Re: Just insert the getdate(). If you want specific date formats look up the CONVERT function. [code=sql] Insert into Table (date) Values(getdate()) [/code] | |
Re: Try This 1. Select Student,sum(case When Credit > 2 and Score > 10 Then 1 else 0 end) as NumPasses 2. From MyTable | |
Re: I have question. How were these records imported into the table in the first place? It would have been easier to parse them correctly when they were initially loaded. | |
Re: There are alot of ways to do this here are a couple examples. Using Year() function [code=sql] Select sum(Salesamount) From Table where Year(salesdate) = Year(@userInput) [/code] using Date functions [code=sql] Select sum(Salesamount) From Table where salesdate between DATEADD(yy,DATEDIFF(yy,0,@userInput),0) --'First Day of Year' and DATEADD(ms,-3,DATEADD(yy,0,DATEADD(yy,DATEDIFF(yy,0,@userInput)+1,0))) --'Last Day of Year' [/code] | |
Re: There is no Top in Oracle. That is SQL Server syntax. | |
Re: BIDS is part of Visual Studio not SQL Server. | |
Re: Try something like this. [code=sql] SELECT DISTINCT emp.Job_ID, a.Employee_ID, a.Last_Name FROM Employees emp Join (Select job_id,employee_id,Lastname From Employees)a on emp.Job_id = a.Job_id ORDER BY a.Last_Name [/code] | |
I have an app where I keep getting this error. This is a c# .net 3.5 app running on a windows 2003 server with IIS 6.0 connecting to an Oracle 10g db. This app had no problems during testing where it was connecting to an Oracle 9i DB but once … | |
Re: What you are asking doesn't make sense, this is a [B]relational database[/B]. If there is no relation in Table 1 with the Data you want in Table 2 then why would you try to access it using Table 1. What happens when someone deletes row 4 in Table2. | |
Re: Try This [code=sql] SELECT Projects.BIMinspector, Sum(NZ(Projects.R9,0)) AS SumOfR9 FROM ProjectsGROUP BY Projects.BIMinspectorHAVING (((Projects.BIMinspector)=[forms]![Form Report]![Elist])); [/code] | |
I am creating a gridview dynamically using Itemplate but I have run into an issue where the event handlers I create for my drop down boxes in edititem template are accumulating every time it fires. To be more specific. When I enter edit mode and select a new item in … | |
Re: You don't directly use triggers in a C# app. If you have a trigger on update for the Student table it will be triggered when you send an update statement from your code. If you want the db to do jobs before an update put this code in a stored … | |
Re: This question should have been posted in the VB forum. Here is a page that explains the basics of connecting to sqlserver from VB. [url]http://www.vbexplorer.com/VBExplorer/vb_feature/june2000/Database_Beginner_ADO_DAO.asp[/url] | |
Re: If statements can not be used within a select statement. Not quite sure what you are trying to achieve here but you could sum a case statement to increment a value. [code=sql] Select abc.value as 'Name', sum(case when (History.OLDSTR == '' and History.NEWSTR == value) then 1 else 0 end) … | |
Re: Why don't you insert the records into the new table with something similar to this. It will create one row per carId and fill in the appropriate property values. [code=sql] Insert into newTable(CarId, Size, Name, Color) Select a.CarId, (Select Propertyvalue from oldTable b where b.PropertyName = 'Size' and b.CarId = … | |
Re: @arjun0 - If you want your questions answered you need to start a new thread. | |
Re: You can't use the alias in the boolean test plus you should use a having clause to test the count(*) and not the where clause. [code=sql] Select title, count(*) As Cnt From poss_titles Group By title Having count(*) > 1 Order By count(*) desc [/code] as for only showing fields … | |
Re: You can use this to get current date at midnight. [code=sql] Select to_char (trunc(SYSDATE), 'MM-DD-YYYY HH:MI:SS') from dual; [/code] Just google Oracle Date functions if you want something more specific. | |
Im currently working on a gridview built using Itemplate at runtime. When in edit mode I use dropdownlists for some of the control fields which are populated from views in my db. The problem I am finding is I usually have a memberID field and a MemberName field and need … | |
Re: Try using select into [code=sql] Select :NEW.sno, UPPER(:NEW.sname), :NEW.class into sno1, sname1, class1 from dual; [/code] | |
Re: Try this [code=sql] Select a,b,c,d,e,f from ( (SELECT a, b, c, d, e, f, DATE FROM table1 WHERE a=10 AND b=1) UNION (SELECT a, b, c, d, e, f, DATE FROM table1 WHERE a=11 AND b=1) ) ORDER BY DATE DESC[/code] You need to encapsulate the whole union to order … | |
Hi, I am working with the gridview in .net 3.5 and have run into something I can not explain. I am testing my delete methods when I realized that the row was actually being deleted before my event handler even finished processing. Am I dreaming or just missing something. I … | |
I am just wondering if there is a way to stop my paging images from moving around the gridview footer when using the builtin gridview paging control. | |
Re: I beleive you need to use a full outer join with a coelesce on the 3 keys to get your desired result. [code=sql] SELECT coalesce(a.Recordingid,b.recordingid), coalesce(a.Connection,b.Connection), coalesce(a.Sequenceno,b.Sequenceno), b.Code, b.Cause FROM dbo.Table_1 a Full OUTER JOIN dbo.Table_2 b on a.recordingid = b.recordingid AND a.connection = b.connection AND a.Sequenceno = b.Sequenceno [/code] | |
| |
Re: I have been getting the same error as well on an app I am working on. I have not been able to find much information on the actual problem but my connection is still working and I am receiving data back from my db but I am not sure if … | |
Re: Did you try using wild cards. [code=sql] Select * from Table1 Where Name LIKE ('%' + @Name + '%') [/code] | |
Re: It is always faster accessing 1 table instead of multiple tables. Not quite sure what else you want in the table but try something like this would most likely be best ID Code Code_Description ...Other fileds 1 Status desc 2 Title desc .... | |
Re: You should be able to clean it up during import with a SSIS package if you know how or else you can do a batch load into a temp table and then clean it up when inserting into maintb. Since you have a reference table you can use s select … |