Viewing 15 posts - 16 through 30 (of 69 total)
Here you go
the problem was on your join
SELECT dimUser.EmpFullName1 [User Name]
...
March 25, 2013 at 7:51 am
fair enough. then the code ive supplied will work a treat if thats the column name for the real date
March 25, 2013 at 7:44 am
without knowing the columns on your Date Dimension table i assume its called ActualDate, here is a solution which doesnt require any conversion, since it should of already been done...
March 25, 2013 at 7:40 am
can you join to the dim.date table twice once for each date and then return the actual date, which i'd expect to be stored in most date dimension tables?
March 25, 2013 at 7:22 am
Interesting. i may have to reconsider my own usage of defaulting to while loops now.
Thanks for the pointer Gila
March 25, 2013 at 6:28 am
be wary of the Brackets, can you post the modified code with the column name in it?
March 25, 2013 at 6:22 am
here's an example :
SELECT a.custno
, RTRIM(a.firstname) + ' ' + RTRIM(a.lastname) AS name
, company
...
March 25, 2013 at 6:05 am
i've done this at my previous place and found assignment of a scoring algorithm the best method.
you'll need to build the score based on what you think is...
March 25, 2013 at 5:53 am
This should do it, exchange GETDATE() for the date you deriving the column from. Apply the Logic to the Hours/minutes/seconds if you need to suffix 0's to that also.
(DATEPART(...
March 25, 2013 at 5:28 am
When i have had to do this in the past i have had to use a derived column which is of type DT_STR and then write a fairly complex expression...
March 25, 2013 at 5:10 am
ive made a couple assumptions but this should work:
CREATE TABLE #TEMP1
(
patId INTEGER NULL
, ancienPatId INTEGER NULL
)
PRINT 'Find patient with no phone number...
March 25, 2013 at 5:00 am
i'd say either define the columns your inserting into or add the value 0 to the select statement so you are passing a value through to the "seen" column
maybe that...
March 25, 2013 at 4:52 am
have you ever used a while loop in SQL.. i tend to use these over cursors these days and find they perform a lot better.
here is a sample code...
March 25, 2013 at 4:09 am
no problems.
what i did was break out the login and logout sets and assign a row number to each login and log out. Then join this data back on...
March 25, 2013 at 3:57 am
the below SQL should do what you need and also covers when people login and out multiple times.
I have assumed if they havent logged out they are still logged in
IF...
March 25, 2013 at 3:37 am
Viewing 15 posts - 16 through 30 (of 69 total)