Viewing 15 posts - 1 through 15 (of 31 total)
I think you're having a problem concatenating the % wildcard and the @Query variable.
Try something like this: AND sdest.[text] LIKE ''%' + @Query + '%''
HTH
January 18, 2010 at 6:54 am
You might get better response for this question in the SQL Server 2008 forums.
December 2, 2009 at 11:58 am
It might also help to know what collation you're using.
December 1, 2009 at 7:03 am
That is sweet. I love the way it trims out the time as well because the '0' date started at midnight. So this trick will work with any...
November 24, 2009 at 12:49 pm
What do you do if the month is January?
November 24, 2009 at 12:04 pm
I usually do something like this:
DECLARE @now datetime
SET @now = CONVERT(datetime, CONVERT(char(8), GETDATE(), 112), 112)
SELECTDATEADD( dd, -1 * DATEPART( dd, @now), @now )
HTH
November 24, 2009 at 6:15 am
Something like this?
CREATE TABLE [dbo].[#Tickets](
[Ticket_ID] [char](8) NULL,
[StartTime] [datetime] NULL,
...
November 17, 2009 at 7:57 am
Nice work, Jeff. Particularly the discussion of the potential gotchas in the choice of the "unlikely" character. It never would have occured to me that using something like...
November 16, 2009 at 6:21 am
Thanks, Lutz.
That was careless of me. Any time you're using a CASE statement, it should explicitly deal with each possible case, and I obviuosly didn't.
November 11, 2009 at 10:47 am
It's not really any prettier:
UPDATE PURC_ORDER_LINE
SET USER_ORDER_QTY = CASE
...
November 11, 2009 at 10:30 am
I may have misunderstood what you were looking for.
This should get you the first four rows you wanted. The derived table x will include distinct copies of...
November 9, 2009 at 12:26 pm
Have you asked the sa for rights to OpenRowSet?
October 29, 2009 at 6:01 am
I'd love to be able to do this too. However, I've yet to find a reliable way to do it. I've tried fn_get_sql and the dynamic management views...
October 19, 2009 at 6:37 am
From BOL:
ERRORFILE = 'file_name'
Specifies the file used to collect rows that have formatting errors and cannot be converted to an OLE DB rowset. These rows are copied into this...
October 14, 2009 at 6:02 am
You can also use BULK INSERT from within a stored procedure or query without having to use xp_cmdshell.
October 12, 2009 at 6:40 am
Viewing 15 posts - 1 through 15 (of 31 total)