Posts
 
Reputation
Joined
Last Seen
Ranked #413
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
13
Posts with Upvotes
11
Upvoting Members
5
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
7 Commented Posts
~53.9K People Reached
Member Avatar for jayfaj

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 …

Member Avatar for Nimric
0
960
Member Avatar for Gaurav arora

Just insert the getdate(). If you want specific date formats look up the CONVERT function. [code=sql] Insert into Table (date) Values(getdate()) [/code]

Member Avatar for Timothy_3
0
212
Member Avatar for gbhs

Try This 1. Select Student,sum(case When Credit > 2 and Score > 10 Then 1 else 0 end) as NumPasses 2. From MyTable

Member Avatar for cgyrob
0
281
Member Avatar for Scotto13

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.

Member Avatar for gbann123
0
255
Member Avatar for 21KristianN

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]

Member Avatar for kplcjl
0
5K
Member Avatar for achiman
Member Avatar for S2009
Member Avatar for Billingsley

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]

Member Avatar for Quacau corp
0
23K
Member Avatar for cgyrob

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 …

Member Avatar for cgyrob
0
187
Member Avatar for Rottieman

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.

Member Avatar for Rottieman
0
115
Member Avatar for mela1006

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]

Member Avatar for cgyrob
0
66
Member Avatar for cgyrob

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 …

Member Avatar for cgyrob
0
124
Member Avatar for AnkitKumar

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 …

Member Avatar for AnkitKumar
0
4K
Member Avatar for rakky

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]

Member Avatar for AndreRet
0
135
Member Avatar for Abhishek_Boga

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

Member Avatar for Abhishek_Boga
0
128
Member Avatar for Julamotte

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

Member Avatar for cgyrob
0
90
Member Avatar for culbysl
Member Avatar for debasisdas
0
3K
Member Avatar for benkyma

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 …

Member Avatar for benkyma
0
187
Member Avatar for dotNetDummi

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.

Member Avatar for cgyrob
0
114
Member Avatar for cgyrob

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 …

Member Avatar for cgyrob
0
108
Member Avatar for john_beginner

Try using select into [code=sql] Select :NEW.sno, UPPER(:NEW.sname), :NEW.class into sno1, sname1, class1 from dual; [/code]

Member Avatar for john_beginner
0
142
Member Avatar for Venom Rush

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 …

Member Avatar for Venom Rush
0
93
Member Avatar for cgyrob

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 …

0
61
Member Avatar for cgyrob

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.

Member Avatar for cgyrob
0
61
Member Avatar for milenio

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]

Member Avatar for Ezzaral
0
123
Member Avatar for wil0022
Member Avatar for moorcroft

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 …

Member Avatar for cgyrob
0
110
Member Avatar for Aussie_Here

Did you try using wild cards. [code=sql] Select * from Table1 Where Name LIKE ('%' + @Name + '%') [/code]

Member Avatar for Aussie_Here
0
116
Member Avatar for ditjhaba

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

Member Avatar for debasisdas
0
78
Member Avatar for yangski

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 …

Member Avatar for yangski
0
360