Search Results

Showing results 1 to 11 of 11
Search took 0.01 seconds.
Search: Posts Made By: cgyrob
Forum: MS SQL 28 Days Ago
Replies: 11
Views: 837
Posted By cgyrob
Thanks for the response.

The cost on using functions on a where clause come when using the function on the column because it causes a table scan even on an indexed field. When the function is used...
Forum: MS SQL 29 Days Ago
Replies: 11
Views: 837
Posted By cgyrob
Why are you creating constants when you can just use the date functions in the where clause?



SELECT sum(Salesamount)
FROM Table
WHERE salesdate BETWEEN ...
Forum: MS SQL 29 Days Ago
Replies: 11
Views: 837
Posted By cgyrob
There are alot of ways to do this here are a couple examples.

Using Year() function

Select sum(Salesamount)
From Table
where Year(salesdate) = Year(@userInput)
Forum: C# 31 Days Ago
Replies: 5
Views: 496
Posted By cgyrob
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...
Forum: MS SQL Oct 19th, 2009
Replies: 2
Views: 518
Posted By cgyrob
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.


Select title, count(*) As Cnt
From poss_titles
Group By title...
Forum: MS SQL Aug 29th, 2009
Replies: 2
Views: 482
Posted By cgyrob
Did you try using wild cards.


Select * from Table1
Where Name LIKE ('%' + @Name + '%')
Forum: MySQL Jul 21st, 2009
Replies: 8
Views: 601
Posted By cgyrob
Try this


SELECT MAKE.MAKE, MAKE.count, color.Color, color.count
FROM(
SELECT MAKE, count(*)count
FROM cars
Group by MAKE
)MAKE,
( SELECT MAKE, color,...
Forum: MS SQL Jul 21st, 2009
Replies: 7
Solved: Query question
Views: 333
Posted By cgyrob
I don't see where you are getting the alias 'c'

Besides that i think you are making it more difficult then it has to be.



select *
from dbo.tblLevelOneApprover a,...
Forum: Database Design Jul 20th, 2009
Replies: 10
Views: 2,294
Posted By cgyrob
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...
Forum: MS SQL Jul 16th, 2009
Replies: 4
Views: 391
Posted By cgyrob
Select Product From Table
Where Component in ('part1','part3')
Forum: MS SQL Jul 6th, 2009
Replies: 15
Views: 727
Posted By cgyrob
What you need to do is build the query for only the selected options within the code block. If you build a static select query with all the options then it will return nothing because no user will...
Showing results 1 to 11 of 11

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC