Home
Get Started
Learn
Downloads
AJAX
MVC
Community
Wiki
Forums
Sign in
|
Join
Home
›
ASP.NET Forums
›
Search
Search
You searched for the word(s): userid:871937
More Search Options
RSS Available
Matching Posts
Re: getting problem if the month is in double fig. for ex. (11/4/2009)
I agree with yrb.yogy with one modification (esspecially valid for SQL2000) Declare @dDate datetime Declare @dDateEnd datetime Select @dDate = DATEADD(day, DATEDIFF(day,0,@date),0), @dDateEnd = DATEADD(day, DATEDIFF(day,0,@dateEnd),0) select * from <tableName> where DATEADD(day, DATEDIFF(day,0,SentDate),0) between @dDate and @dDateEnd SQL Server 2000 will otherwise calculate DateAdd/Dateddiff of parameters @date and @dateEnd for every single row. SQL Server 2005+ will do it only once, but I
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
Niikola
on 11/5/2009
Re: Sql question( select the first, second row in the table)
[quote user="venkatu2005"] i used ur query this is the query Dim selectpageimage_cmd As New SqlCommand( "SELECT TOP 1 * from content where contentid not in(SELECT top 1 * From content where subcategoryid=@subcategoryid )" , con) It show error: Only one expression can be specified in the select list when the subquery is not introduced with EXISTS [/quote] It has to be (contentid instead of *) SELECT TOP 1 * from content where contentid not in(SELECT top 1 contentid From content
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
Niikola
on 11/5/2009
Re: problem with union or union all
[quote user="yrb.yogi"] ... [/quote] Sorry, but it's hard to see the difference as both post (original and your) are differently formated (or differently unformated ;) Could you say what did you change? Or just use bold, underscore or different background color to highlight modification. EDIT - I saw it. Removed brackets :)
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
Niikola
on 10/27/2009
Re: problem with union or union all
When you are using UNION ALL - there's no way to get less records than in individual subqueries. It's probably some error in your code. Could you post sam sample data? btw. There are few things you should change: isnull( isnull( sum(Manualsales.Food),0) + isnull( sum(Manualsales.TeaCoffee),0), 0 ) Outer isnull can be safely avoided as two nonull values can not produce null value (you already checked nullability of both columns) WHERE convert ( datetime , convert ( varchar ( 12 ), Sales_Date
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
Niikola
on 10/27/2009
Re: Fetch Data from Table Datewise
I tested it against 10000 rows and it works
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
Niikola
on 10/4/2009
Re: Fetch Data from Table Datewise
Huh, missed that. You mean, you want increment for all months between Date1 and Date2. It's a bit more complex, and I'm bussy at the moment. I'll post you solution bit later.
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
Niikola
on 10/2/2009
Re: help in sql coding!!
Could you post execution times of your solution compared to T-SQL code execution times? [quote user="purple07"]dis code onli assigns to the one with the highest quota. [/quote] Did you tested solution I posted? It assigns ticket to person having lowest percentage of assigned quota used at that moment. Example (initial point, no tickets assigned): a 20% b 30% c 50% assigns 1st ticket to c Whom the next ticket should be assigned, to one with highest qouta? Example 2: a 20% holds 1 b 30% holds
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
Niikola
on 10/2/2009
Re: Fetch Data from Table Datewise
NOTE! If you have more than 100 months between expdate and effdate you willget next error: Msg 530, Level 16, State 1, Line 17 The statement terminated. The maximum recursion 100 has been exhausted before statement completion. You can overcome it using MAXRECURSION option Anyway, number of rows in Alerts table is not limited, you can have them as much as you need (depending on your server resources only)
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
Niikola
on 10/2/2009
Re: send email to specific users problem
[quote user="bilgohan"] if i remove it gives an error like : Incorrect syntax near '@body' [/quote] I've updated my previous post - I made mistake in first version
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
Niikola
on 10/2/2009
Re: send email to specific users problem
Declare @bodytext nvarchar(500) Set @bodytext = 'Please approve expense of'+ @UserName +'!...' EXEC msdb.dbo.sp_send_dbmail --@profile_name='Test', @recipients=@email, @body=@bodytext, @body_format='HTML', @subject='aprove expenses' ;
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
Niikola
on 10/2/2009
Page 1 of 66 (660 items) 1
2
3
4
5
Next >
...
Last ยป
ASP.NET:
PDC and Tech-Ed Europe Slides and Code
WindowsClient:
Anybody build a XAML parser in C or C++ yet?
WindowsClient:
Silverlight use, power and deployment keeps growing; so does WPF
ASP.NET:
T4CSS: A T4 Template for .Less CSS With Compression
WindowsClient:
JSON-P: An Elegant Hack
Channel 9:
Photosynth Update and New UI
Channel 9:
First Look: Streetside in Bing Maps
Channel 9:
Coding4Fun at PDC 2009
WindowsClient:
10 Must-See PDC 09 Sessions
Channel 10:
Photosynth Updated with New Release and New UI
Channel 10:
WindowsBlinds 7 Now Works with Windows 7
Channel 10:
Zune HD Launches New Colors
ASP.NET:
PDC09: ASP.NET MVC 2: Ninjas Still on Fire Black Belt Tips
ASP.NET:
Hanselminutes Podcast 188: ASP.NET MVC 2 Beta with Phil Haack
ASP.NET:
Hanselminutes Podcast 186: .NET Debugging 101 with Tess Ferrandez
TechNet Edge:
WinRE and free stuff with Sean Kearney
WindowsClient:
XslCompiledTransform and large template elements
WindowsClient:
The Future of Client App Dev : WPF and Silverlight Convergence
Channel 9:
PDC09 GeekFest Party
Channel 10:
How to Use "Play to" and "Remote Media Streaming" in Windows 7
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online