Viewing 15 posts - 9,541 through 9,555 (of 10,144 total)
Surely this is all you need?
[font="Courier New"]SELECT t.*
FROM TABLE t
WHERE (IS_MEMBER('role') = 0 AND t.deletedate IS NULL) OR IS_MEMBER('role') = 1
--OR ID IN (SELECT ID FROM table WHERE field...
September 22, 2008 at 9:28 am
It won't do any harm to have an identity column in your table, one which isn't populated with data from your spreadsheet but which is automatically assigned a value as...
September 22, 2008 at 7:42 am
Here's a little sample data in case this thread is revisited.
[font="Courier New"]SET NOCOUNT ON
DROP TABLE #Entity
CREATE TABLE #Entity (entity_id INT, template_id INT, [name] VARCHAR(20))
INSERT INTO #Entity (entity_id, template_id, [name])
SELECT...
September 22, 2008 at 7:13 am
Hi Neil
I reckon this is what you want. Note that there were a couple of missing commas in the SELECT list.
[font="Courier New"]SELECT CL1.CLIENT_UNO, CL1.NAME_UNO, MA1.MATTER_UNO, MA1.CLNT_MATT_CODE, CL1.CLIENT_NAME, NA1.[NAME],
PE2.LOGIN,...
September 22, 2008 at 5:21 am
Hi Glen
You will probably find some useful material in the following post:http://www.sqlservercentral.com/Forums/Topic570892-145-1.aspx
Cheers
ChrisM
September 22, 2008 at 4:42 am
Hi Ramya
If you set up your formula expression as a string and EXECute it, then any variables defined in the calling batch will be out of scope to the batch...
September 22, 2008 at 4:19 am
Hi Ramya
Can't you run the statement as it is? I can't see a need for EXEC:
[font="Courier New"]IF @AssessableValue > 0
SET @BED_BaseAmt = @AssessableValue * @Qty
ELSE
SET @BED_BaseAmt = @price...
September 22, 2008 at 3:54 am
Hi Ramya
You are getting this error message because the batch executed by the EXEC statement cannot reference variables declared in the batch from which it was called.
You could use...
September 22, 2008 at 3:12 am
Not at all b_boy, it's a learning experience for us all. How about posting up some sample data and results? Everybody would appreciate this.
September 19, 2008 at 3:18 pm
'Number' is the Tally table - check the link in Matt's earlier post.
September 19, 2008 at 3:14 pm
John
It's a bit of a guess, as Lynn has pointed out, but I reckon this is what you're looking for:
DECLARE @x VARCHAR (5)
SET @x = 'true'
SELECT id1, id2, id3
FROM...
September 19, 2008 at 9:32 am
It's too big a step in one go. You need to find out how many rows are returned by each temp table without aggregation, and in particular, how many rows...
September 19, 2008 at 9:14 am
ALZDBA (9/19/2008)
I'm used to that :w00t:1) married
2) dba
:D:):P:w00t::hehe:
And if you have children you will lose your voice completely 😛
September 19, 2008 at 8:48 am
beruken (9/19/2008)
September 19, 2008 at 8:43 am
Viewing 15 posts - 9,541 through 9,555 (of 10,144 total)