Viewing 15 posts - 1 through 15 (of 33 total)
Apologies for the delay in replying Luis.
This is a great tip for the dynamic SQL. Thanks for taking the time to respond to my query.
January 27, 2015 at 8:31 am
Thanks Luis - that's very much appreciated.
I will use Excel to generate the case statements as I have about 125 references!
Unfortunately my hands are tied with the structure of the...
January 19, 2015 at 1:35 pm
Hi, thanks for the quick response.
Here is the code to create the sample table.....
--===== If the test table already exists, drop it
IF OBJECT_ID('TempDB..#ctr_ref','U') IS NOT NULL
DROP TABLE #ctr_ref
--===== Create the...
January 19, 2015 at 1:22 pm
Hi all,
I've got an update.....
We have two XP clients that are exactly the same - well out the box anyway, perhaps someone has changed something.
I still have the problem with...
March 23, 2009 at 7:14 am
That works - thanks Chris......so it was just doubling up the quotes basically?
December 4, 2008 at 5:28 am
Chris Morris (12/4/2008)
Richard, can you post the result of the print statement please?
Sure.....
SELECT 'PK1|'
+ ...
December 4, 2008 at 4:59 am
I increased it to 4000 and it still doesn't work. Slightly amended the query as well taking out the CONVERT's...
ALTER PROCEDURE dbo.Sun5_OFAC_Export
...
December 4, 2008 at 4:49 am
Chris Morris (12/4/2008)
December 4, 2008 at 4:36 am
rbarryyoung (11/30/2008)
Declare
December 4, 2008 at 3:32 am
Aha, I did see another thread actually where the query was actually a parameter - thanks very much!!
November 30, 2008 at 1:02 pm
Evening all,
Thanks for your suggestions.
However, its the table name that I need assistance on rather than the SELECT clause.
How would I do this dynamically?
Thanks!
Richard
November 30, 2008 at 12:35 pm
GilaMonster (10/30/2008)
October 30, 2008 at 5:56 am
OK, have done some further tests:
1. created new table:
CREATE TABLE TEST
REF INT NOT NULL,
DATE DATETIME NOT NULL
2. Inserted 4 rows - made sure that the REF was sequential but...
October 30, 2008 at 5:44 am
John Marsh (10/30/2008)
1) What happens if you try Select * From dbo.qryTEST
Same result - I created this for testing this issue - the real view contains more columns and joins...
October 30, 2008 at 5:29 am
Thanks BigBucket - you set me on the right path.
I just put an IF statement in as follows:
IF @DisplayNo = '%%'
SET @DisplayNo = ''
October 8, 2008 at 12:09 pm
Viewing 15 posts - 1 through 15 (of 33 total)