Viewing 15 posts - 4,066 through 4,080 (of 5,504 total)
Would you please confirm the SQL Server version you're using?
It's essential for the solution that can be used.
March 5, 2010 at 4:23 pm
Ok, if the column is already datetime, you don't need to convert it.
So, the following will work:
select * from table where functionDate > date +1
BUT, this will usually end up...
March 5, 2010 at 4:06 pm
Instead of using the SUM() function on varchar values you'd need to use MAX().
Something like:
select
@Zip1 = max(Case When Rank = 1 Then Zip End),
@Zip2 = max(Case When Rank =...
March 5, 2010 at 3:55 pm
Grey Cat (3/5/2010)
Does this work?select * from table where functionDate > convert(date,GETDATE()+1)
It depends.
I asked before: what is the data type of functionDate?
You stated it would be datetime, but that doesn't...
March 5, 2010 at 1:06 pm
There is still no sample data available that would make it possible to create your expected output: COMPLETE(TRAIN) CANCELLED(TRAIN) COMPLETE(BUS) CANCELLED(BUS)
Let's start from the very beginning:
Please show us the data...
March 5, 2010 at 12:24 pm
Unfortunately, we don't have any sample data :unsure:
Please use the INSERT INTO @tbl and add some sample data rather thana join to tables we don't have access to.
Also, you...
March 5, 2010 at 11:28 am
Welsh Corgi (3/5/2010)
Thank you Lutz, please accept my apology for not asking for complete information...
No reason to apologize. That's what a forum is all about: to have more than just...
March 5, 2010 at 10:17 am
apat (3/5/2010)
One more point,
I also would like to do the opposite for power function as well...
Instead of ---- ...
March 5, 2010 at 10:08 am
Are you really sure you want to calculate 1.8 ^975.81???
Not even sure, what that number will be....
March 5, 2010 at 7:11 am
What user did you use to try the insert?
Your revoke statement will remove any previously given permission:
Straight from BOL:
Removes a previously granted or denied permission.
I guess what you're looking...
March 5, 2010 at 4:27 am
Would you please modify your sample data to include some sample data for your new columns?
Also please clarify whether the data you'd like to PIVOT will be static (e.g. there...
March 5, 2010 at 3:45 am
You could use the FOR XML PATH approach and a subquery (or CTE):
DECLARE @tbl TABLE
(
grp INT,ledger CHAR(3), amount INT
)
INSERT INTO @tbl
SELECT 1 ,'A01', 5 UNION ALL
SELECT 1 ,'A02', 3 UNION...
March 4, 2010 at 4:23 pm
I just needed to show that your statement
u have to ensure that the aliases of everything your selecting must match between the top select and bottom select
is just wrong. Nothing...
March 4, 2010 at 4:04 pm
BaldingLoopMan (3/4/2010)
March 4, 2010 at 3:10 pm
There are some confusing statements in your epost:
"fieldname of datetime datatype" vs. "daily date entries; just dates, no time"
That's simply impossible. Either you have a DATE datatype (assuming you're...
March 4, 2010 at 2:49 pm
Viewing 15 posts - 4,066 through 4,080 (of 5,504 total)