Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Showing results 1 to 6 of 6
Search took 0.01 seconds.
Search: Posts Made By: Javierera
Forum: SQL Server 2005 October 27th, 2008, 03:01 PM
Replies: 6
Views: 3,529
Posted By Javierera
This sentece with maxdt is not working, I'm...

This sentece with maxdt is not working, I'm receiving a syntax error when SQL try to convert the string to a date

DECLARE @maxdt DATETIME

set @sql = 'select @maxdt = MAX(q.eff_dt) as dw_end_dt...
Forum: SQL Server 2005 October 24th, 2008, 05:41 PM
Replies: 6
Views: 3,529
Posted By Javierera
One question I need this field with this format ...

One question I need this field with this format '+ @maxdt + ' ?
Forum: SQL Server 2005 October 24th, 2008, 03:47 PM
Replies: 6
Views: 3,529
Posted By Javierera
Get value with EXEC

Hi

I have this code:

set @sql = 'select MAX(q.eff_dt) as dw_end_dt from ' + ' (select top ' + @count_rows + '* from dbo.table where code = 99 order by eff_dt) AS q'
execute (@sql)

I need to...
Forum: SQL Server 2005 October 24th, 2008, 10:17 AM
Replies: 3
Views: 1,393
Posted By Javierera
Thanks I modified something and now working fine

Thanks I modified something and now working fine
Forum: SQL Server 2005 October 24th, 2008, 09:37 AM
Replies: 3
Views: 1,393
Posted By Javierera
thanks for your recommendation but I have...

thanks for your recommendation but I have problems with the type of data

Msg 245, Level 16, State 1, Procedure whatevername, Line 6
Syntax error converting the varchar value 'select MAX...
Forum: SQL Server 2005 October 23rd, 2008, 07:44 PM
Replies: 3
Views: 1,393
Posted By Javierera
Problem with clause Top in store procedure

Hi

I have this code

declare @count_rows int
declare @sql as varchar(8000)
set @count_rows = 2
set @sql = (select top 1 eff_dt from (select top 2 * from dbo.tabla where cod = 99 order by...
Showing results 1 to 6 of 6

 




Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.