Viewing 15 posts - 3,136 through 3,150 (of 3,482 total)
sure enough... must be getting old... forgot that my Tally table is indexed, so that caused me to overlook it.
Definitely need an ORDER BY clause! TOP VALUES without an...
February 2, 2014 at 5:51 pm
Here's an example... I'm just creating a bunch of dates from a table of numbers.
SELECT TOP 1 SomeDate, N
FROM
(SELECT DATEADD(dd,n,'1-1-2010') AS SomeDate, n
FROM dbo.Tally) x
WHERE SomeDate<=GETDATE();
What you want is...
February 2, 2014 at 4:03 pm
If you're using 2012, then you can use PARTITION and COUNT, then you don't need GROUP BY.
January 30, 2014 at 12:30 pm
robert.wiglesworth (1/30/2014)
TableA has customer information such as:
CustomerNumber
Firstname
Lastname
Address
City
State
Zip
TableB has order information...
January 30, 2014 at 11:12 am
This post might help a little:
They discuss calling SQL Server stored procedures from an Access front end. One of the last commenters is Van Dinh, who at least used...
January 29, 2014 at 4:23 pm
Does this work? The SQL returns what I want it to...
DECLARE @sql varchar(1000); -- just a variable to stuff the completed SQL statement into.
declare @curDate nvarchar(8)
declare @filePath VARCHAR(500)
set...
January 28, 2014 at 1:28 pm
If you do this in Reporting Services, it's simple.
create a data source that points to your database,
then a dataset that points to this query
then add a tablix and add a...
January 28, 2014 at 7:35 am
You can create one "outer" report that acts as a container for the subreports, and then use a tablix for the subreports (or just place them, if you want) ...
January 27, 2014 at 10:23 pm
, i have tried to use sub reports but not able to split the data within subreports for specific customers.
If your main report is just (CustomerID, CustomerName, OrderCount, OrderDate)
and your...
January 27, 2014 at 7:55 pm
The query is basically "asking" which column to total, and then setting the query up to accomplish that. It's just a slightly more advanced version of using parameters.
It's saying...
January 27, 2014 at 3:53 pm
need to write IIF condition; like if labor then populate VendorNo information and right side is inoviceamt information data below) we need to pull data
If Labor THEN what?
Sounds like you...
January 27, 2014 at 3:05 pm
Could you post some data as a UNION query or a CREATE TABLE and then some INSERTs... (Not millions, just enough to get an idea of what you're dealing with.)...
January 27, 2014 at 12:43 pm
I saw the first part and thought... oh, use STUFF...
and then I saw the odd requirement (show all permutations)
Here's the sample data part I did from the example... since he's...
January 27, 2014 at 10:28 am
Never thought I was qualified for it anyway. =)
After coming up with one answer, I looked around at all the other options, and that one is probably the worst. ...
January 26, 2014 at 5:43 pm
I don't see any reason why you couldn't create a @FileName variable or similar and just build the string in pieces, and then use it in a loop to process...
January 26, 2014 at 2:50 pm
Viewing 15 posts - 3,136 through 3,150 (of 3,482 total)