Viewing 15 posts - 31 through 45 (of 119 total)
You may want to consider using the GROUP BY clause in your SELECT statement. GROUP BY will group the data in groups as desired. Look up the GROUP BY clause...
February 5, 2004 at 11:39 am
Actually I haven't tried that. I will give it a shot.
Many thanks
Billy
February 4, 2004 at 6:03 pm
try...
create view TestView1 with schemabinding as
select TTid from dbo.TestTable1
in the code you posted, it appears that you are aliasing TestTable1 as the alias name "schemabinding"
HTH
Biilly
February 4, 2004 at 5:23 pm
The data is fine. There is only one datetime field in the table and that is the created date field. I have no idea what else is there except unproven...
February 4, 2004 at 5:18 pm
No datetime conversions..
here is the code...
CREATE FUNCTION udf_show_this (@tblOrder_ID INT) RETURNS VARCHAR(8000) AS
BEGIN
DECLARE @strMsg VARCHAR(8000)
DECLARE @i TINYINT
SET @i = 0
SELECT @strMsg = 'x' + CAST(@tblOrder_ID AS...
February 4, 2004 at 3:55 pm
You should be able to add cols to temp tables. Try this... put in batch separates between your statements.... like below:
SELECT MSG INTO #TMPTBL FROM DBO.ORIGINALTABLE WHERE 1=0
go
ALTER TABLE...
November 26, 2003 at 6:15 pm
as far as I know, I don't think you can use column aliasing within an expression.
how about:
select (1+1) as two, ((1+1)+1) as three
HTH
Billy
November 19, 2003 at 4:04 pm
quote:
One reason I like poking around here regularly.WITH TIES, didn't know about that one.
Except we're corporate casual, so we don't wear ties.
BOOO...
November 6, 2003 at 11:19 am
Thanks Steve. Both our queries execute with same query cost. The only difference is that your query has much better readility.
Billy
November 5, 2003 at 4:08 pm
How does WITH TIES know what is a tie? The SELECT statements below return the same results regardless if you use WITH TIES or not.
DECLARE @TTT TABLE (THE_ID INT...
November 4, 2003 at 2:14 pm
Yes. According to Books-On-Line (BOL)
<quote>
Two basic rules for combining the result sets of two queries with UNION are:
1) The number and the order of the columns must...
October 20, 2003 at 10:27 pm
lenardd
If you are still looking for a way of doing optional filters, what do you think of piecing the sql statement together in your stored procedure? this method will...
October 17, 2003 at 2:33 pm
To follow up on my last post, if you have a date criteria which you want as optional, then it is best to piece the sql statement together and then...
October 17, 2003 at 11:31 am
Viewing 15 posts - 31 through 45 (of 119 total)