Viewing 15 posts - 16 through 30 (of 51 total)
Hey MD,
Check out if the SQL below gives the results you are looking for:
SELECT
code = r.code,
code_updated = SUBSTRING(r.code, 1, 2) + '0' + SUBSTRING(r.code, 3,...
July 25, 2004 at 10:49 am
Hey There Leslie,
Check out if this SQL is what you are looking for:
SELECT
*
FROM
WorkedHours w INNER JOIN
Employees e LEFT OUTER JOIN
Dependants d ON...
July 24, 2004 at 3:48 pm
Hey,
Are you able to do a SELECT on the view such as:
SELECT * FROM myview
Just taking a guess here:
I'm thinking that maybe mytable in database2 might contain...
July 23, 2004 at 1:33 pm
Hey StephanJ
Some approaches that I could think of are:
[Approach 1 : Go SQL Server all the way]
1) Create a stored procedure to identify user e-mails with...
July 23, 2004 at 10:11 am
Hey Juanita,
I corrected the UPDATE statement in the code in my previous post. I noticed that I originally posted the UPDATE like this:
UPDATE SQL_Table a
SET <pairs of "sql...
July 23, 2004 at 7:47 am
Hey There Juanita,
The approach you mention about loading the Access data into an auxilary SQL table and then working off that table seems like a reasonable approach. I...
July 22, 2004 at 2:11 pm
Hey barcoder,
Check out this SQL to see if this is what you are looking for or helps you get there:
SELECT
P.Productcode,
PlantName = MIN(F.PlantName)
FROM
...
July 22, 2004 at 12:41 pm
hey egnagey,
try adding the following HAVING clause to your SQL to see if that is what you are looking for:
SELECT
tblroofs.roofid, cap.estimatedcost as CapCost, cap.estimateddate
FROM
...
July 22, 2004 at 9:19 am
Yeah, I've seen this too for the case posted ...
It seems as if though SQL Server is expecting the start_value and end_value of BETWEEN to be the same...
July 21, 2004 at 6:38 pm
Hey jmarg,
You would have to resort to dynamic SQL to be able to concatenate @filterCMD.
From looking at the code posted, you could do this:
IF @filterCriteria LIKE 'w'
...
July 21, 2004 at 5:25 pm
Hey Jordan,
SQL for this might be something like this:
SELECT
*
FROM
Some_Dates_Table
WHERE
DATEDIFF(year, someDate, GETDATE() ) = 1 AND
DATEPART(week, someDate) =...
July 21, 2004 at 4:47 pm
hey joe,
you would have to resort to dynamic SQL to be able to do this.
so your proc would look something like this:
CREATE PROCEDURE dbo.usp_product
(
July 21, 2004 at 10:46 am
Hey Sahana,
According to the T-SQL online reference in MSDN, it is recommended that table variables be used instead of temp tables whenever possible.
July 20, 2004 at 6:54 pm
try this one then:
INSERT INTO Destination_Table(item, source1, source2, source3, source4)
SELECT
DISTINCT s.item,
source1 = MIN(s.source1),
source2 = MAX(s.source2),
source3 = MAX(s.source3),
source4 = MAX(s.source4)
FROM
(
SELECT
s1.item,
...
July 20, 2004 at 10:28 am
hey,
try to see if this is what you are looking for:
INSERT INTO Destination_Table(item, source1, source2, source3, source4)
SELECT
s1.item,
source1 = MAX(s1.source),
source2 = MAX(CASE WHEN s2.source <>...
July 19, 2004 at 8:47 pm
Viewing 15 posts - 16 through 30 (of 51 total)