Viewing 15 posts - 2,851 through 2,865 (of 10,144 total)
spaghettidba (10/22/2014)
SELECT A.activityCode
,A.ActivityName + ISNULL(A.description, '') AS ActivityName
,A.displayOrder
,A.activityStartDate
FROM Activities AS A
LEFT JOIN...
October 22, 2014 at 5:41 am
-- Get all dates from two years ago (rolled back to the first of the month)
-- up to and including today. Include the day name and the relative number
-- of...
October 22, 2014 at 5:24 am
-- You could try breaking up the query. Here's one way, there are a few possibilities:
SELECT
[wck.wck_id] = wck.wck_id,
[pd.mode_id] = pd.mode_id,
...
October 22, 2014 at 3:42 am
SELECT * FROM orders WHERE CAST(orderdate AS DATE) BETWEEN @begindate AND @enddate
http://sqlblog.com/blogs/rob_farley/archive/2010/01/22/sargable-functions-in-sql-server.aspx
October 22, 2014 at 2:17 am
Wouldn't it be easier and more natural to refactor this as a function?
October 21, 2014 at 10:01 am
"However the last few years I find myself crunched to get work done in my work week".
Only the last few years? I've often wondered how you manage to get so...
October 21, 2014 at 1:46 am
compufreak (10/20/2014)
so basically if the table contains prj(8345) then i am sure it...
October 20, 2014 at 5:25 am
You could use an inline tally table too:
CREATE TABLE #MyTable (OrderID INT IDENTITY(1,1), ItemName VARCHAR(20), UnitPrice INT, Quanity INT)
INSERT INTO #MyTable (ItemName, UnitPrice, Quanity)
VALUES ('car', 10, 2), ('Train', 20, 1),...
October 20, 2014 at 5:16 am
Thanks! Try this...
-- Sample data
CREATE TABLE #ADMTABLE (CLASS1 VARCHAR(15), IQREGIONID VARCHAR(10), USERTYPES1 TEXT)
INSERT INTO #ADMTABLE (CLASS1, IQREGIONID, USERTYPES1)
SELECT 'criteria', 'ID No', 'USERTEXT1, Source currency , USERTEXT2, Description for accounts ,...
October 17, 2014 at 6:40 am
GilaMonster (10/16/2014)
Look at the very first red underline in that screen shot (on the very first line), that's your problem.
Also, the name of the stored procedure.
October 16, 2014 at 7:02 am
Elliswhite (10/16/2014)
I also tried it with passing paremeter but still facing syntax error
Can you share the syntax error?
October 16, 2014 at 6:56 am
Elliswhite (10/16/2014)
Execute GetBooksbyBorrowerID
We're not mindreaders around here - did the procedure fail to create, run with an error, run but fail to generate results...?
October 16, 2014 at 6:25 am
1) You're calling a different stored procedure (SP_Task1) from the one you've just created (GetBooksbyBorrowerID).
Edit: must learn to read.
October 16, 2014 at 6:14 am
ams00601 (10/16/2014)
Hi Chris,I tried using the code you gave but still no joy!
Any other ideas?
Not really. The code you've posted so far indicates that you may be a novice...
October 16, 2014 at 4:04 am
Gosh that's horrible! Have a play with this:
SELECT x1.UserTypes, x2.pos
FROM ADMTABLE AT
CROSS APPLY (SELECT UserTypes = CAST(AT.USERTYPES1 AS VARCHAR(MAX))) x1
CROSS APPLY (SELECT pos = CHARINDEX('Working Paper',x1.UserTypes)) x2
WHERE AT.CLASS1 = 'criteria'
AND...
October 15, 2014 at 8:42 am
Viewing 15 posts - 2,851 through 2,865 (of 10,144 total)