Viewing 15 posts - 61 through 75 (of 101 total)
Hi,
The problem here is that the access syntax is slightly limited.... But i got this working.
SELECT temp.*, temp_1.*
FROM temp LEFT JOIN temp AS temp_1 ON temp.role_code1 = temp_1.role_code2
WHERE (((temp_1.ID)...
February 23, 2009 at 6:59 pm
Hi.
If I have your requirements correct then I think you are after:
select role_code1
from temp1
where role_code1 not in (select role_code2 from temp1)
That provides 240 results for me.... Every role_code1 that...
February 23, 2009 at 6:00 pm
Hi Bernadette,
You pretty much had it.... I just changed for [program] to for [status]
select [year], [program], [Active], [Declined]
from
(Select [year], program, [status] from #temp)...
February 23, 2009 at 3:23 pm
Hi,
Use the row_number function to create a row number for each column. The partition clause means that the count will restart every time table_name changes.
select TABLE_NAME, COLUMN_NAME
from (Select...
February 19, 2009 at 12:53 pm
Hi.
I think it would be best to pass your data in a different format. Something more like '3,12;84,56;89,67'. ie, a string of ID/Value pairs.
But, besides that, here is...
February 18, 2009 at 6:43 pm
Hi,
Can I just clarify your requirements here - do you have a stored proc with two parameters. One parameter will give the new values for Column1 and the second...
February 18, 2009 at 5:13 pm
Hmmm. true. It might not meet your needs. I guess it depends how you want to see the data.
You can change it from SUMMING though... Right...
February 17, 2009 at 2:25 pm
hi,
How about this for a solution:
-- my table definition
create table #Names (code int, [name] varchar(256))
-- do inserts...
-- use row number and sort to select top 1 in each code. ...
February 17, 2009 at 2:16 pm
Hi,
Have you tried using a pivot chart or pivot table? These are pretty useful tools in Excel for mashing up your data.
B
February 17, 2009 at 1:27 pm
Hi,
I have made two small adjustments, the first one adjusts the parameter to have SQL wildcards around it. The second is to change your WHERE clause to use a...
February 12, 2009 at 1:40 pm
Hi,
I guess it depends on how many columns you have as to whether this is a suitable solution... But the code would be easy to copy and paste anyway
create...
February 12, 2009 at 1:28 pm
JF is right - you need a stored procedure for this.
However, I would suggest you can simplify it slightly:
create PROCSelectForReport
@Parameter nvarchar(3)
as
BEGIN
select blablabla
where ((region =...
January 26, 2009 at 1:24 pm
Hi,
I see you've solved this now but here is the answer I came up with....
declare @customerID int
set @customerID = 2
SELECT * FROM @Categories where CustomerID =@customerID
union all
SELECT * FROM...
January 14, 2009 at 2:10 pm
Hi DC,
Do something like this so that you can use input values for your start datetime
declare @startInput datetime
set @startInput = '2008-01-01'
declare @start datetime
set @start = cast(
cast(year(@startInput) as varchar(4)) + '-'...
January 14, 2009 at 12:47 pm
Hi Arun,
I don't have SQL in front of me so I can't give you the exact syntax, however.....
You can create some dynamic SQL and run it. The dynamic sql...
December 16, 2008 at 1:51 pm
Viewing 15 posts - 61 through 75 (of 101 total)