Viewing 15 posts - 286 through 300 (of 362 total)
[font="Verdana"]
Have you tried your query this way? It work well for me. This query will return the last History Orders. And you need the first one then just only replace...
April 18, 2008 at 2:46 am
[font="Verdana"]
Declare @sql VarChar(MAX)
Set @sql = '{You whole select statement}'
EXECUTE @error = sp_executesql @sql, N'@min_date SMALLDATETIME, @max_date SMALLDATETIME', @min_date,@max_date
Mahesh
[/font]
April 17, 2008 at 11:10 pm
April 17, 2008 at 6:33 am
[font="Verdana"]
from Company A,Department B,Manager C
Set @Temp = 'from Company A,Department B,Manager C'
Select @Temp = substring(@Temp, 6, Len(Temp)-5)
One step added so that finally you will have:
Company A,Department B,Manager C
OK, now have...
April 17, 2008 at 6:24 am
[font="Verdana"]
The main difference between Select and Set is you can assign values to multiple variables in a single statement through Select but not with Set. You need to write multiple...
April 17, 2008 at 6:03 am
[font="Verdana"]http://www.connectionstrings.com/?carrier=dsn
Mahesh[/font]
April 17, 2008 at 5:57 am
[font="Verdana"]Hey... I found the column DOB. It is there in the EMP table 😀
Union All
select 2,'Select Eno,Ename,DOB from Emp where Eno = @Eno'
Union All
what else you want?
Mahesh
[/font]
April 17, 2008 at 5:53 am
[font="Verdana"]Have you tried to execute the Select statement in your SProc and tally the o/p whether it is desired o/p? If o/p data is desired data then your logic is...
April 17, 2008 at 5:41 am
[font="Verdana"]
EXECUTE(' declare @a as numeric(6) select top 1 @a= bp_id from bug_posts where bp_bug=4648 select @a ' )
Mahesh
[/font]
April 17, 2008 at 5:27 am
Ripal Patel (4/17/2008)
My problem gets Solve, now i need same primary key for INSERT statement. means i want Primerry key value of last inserted statement,
If only...
April 17, 2008 at 5:11 am
[font="Verdana"]Select {PK Col} From M_Product Where PRDm_Level='A'
[/font]
April 17, 2008 at 3:23 am
[font="Verdana"]
t.miecz (4/14/2008)
I am trying to update names in my database (i.e. member.name) but there is a foreign...
April 17, 2008 at 12:37 am
[font="Verdana"]I havn't work at such high level. My scope ends at programming. However I think, but not sure, this can be done through Replication. Search through google on Replication for...
April 16, 2008 at 10:54 pm
or like this ...
(Have stolen Tom's Code :D)
Create PROCEDURE [dbo].[usp_ReportGlassStatsWeb]
@StartDate datetime = null, -- Allow a null value
...
April 16, 2008 at 10:06 pm
[font="Verdana"]
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=65800[/font]
April 16, 2008 at 6:38 am
Viewing 15 posts - 286 through 300 (of 362 total)