Viewing 15 posts - 7,786 through 7,800 (of 13,460 total)
but the results is always a single column FOR XML isn't it? it doesn't matter if the XML contains multiple nodes or not.
April 8, 2011 at 6:34 am
you can also strip the time portion off of the parameter so you can compare dates to dates:
Select DateID FROM tblDates WHERE theDate = select DATEADD(dd, DATEDIFF(dd,0,@SomeDate), 0)
April 8, 2011 at 6:33 am
but you do know the names and number:
SELECT CustId AS label1, Name AS label2,Emailadres AS label3 FROM Customer
into #tmp WHERE 1=2 FOR XML RAW
April 8, 2011 at 6:29 am
for crossdatabase stuff inside a procedure , you only got two choices;
1: can you adapt the specific script to use 3 part names?
you know, SELECT * FROM Production.dbo.Invoices
or
2: switch...
April 8, 2011 at 6:14 am
i think this will do what you are asking:
UPDATE loc_test
SET assoc = CASE
WHEN assoc = '1'
...
April 8, 2011 at 5:54 am
I had that same problem; someone used some script that granted all objects to the public role via a cursor that was included as some 3rd party app; yuck. some...
April 8, 2011 at 5:46 am
here's some sample data i slapped together:
with myERPMap(Letter,Code)
AS
(
SELECT N'ü','\123' UNION ALL
SELECT N'á','\111' UNION ALL
SELECT N'é','\133'
),
MyDataToFix (ThePhrase)
AS
(
SELECT 'Personn\133l \123s\111g\133' UNION ALL
SELECT 'sp\133ci\111l ch\111r\111ct\133rs' UNION ALL
SELECT '\111lph\111n\123m\133ric cod\133'
)
so far, i've only...
April 8, 2011 at 4:57 am
i forced your data to be integers so i could perform math on them, like adding a year; then used a Tally table to generate the results:
With MyData ([Customer...
April 7, 2011 at 2:36 pm
two typical methods can be used
select distinct user from yourtable
--or
select user from yourtable group by user
April 7, 2011 at 1:15 pm
you'll have to install the tools from the standard edition;
the express tools will only let you connect to the database engine.
April 7, 2011 at 1:13 pm
in answer to my own question, i think i needed to use dm_db_session_space_usage instead; that gives me 600 KBbytesUsed in my example.
April 7, 2011 at 12:27 pm
Eddie thanks for the pointers...I'm not getting the results I'm expecting, though.
I created a temp table with the typical SELECT * into #tmp fromSomeTable.
then i ran this command to see...
April 7, 2011 at 12:23 pm
why can't you just wrap the big query as a subselect or CTE, and then join to your lookup table:
you know,
Select
MyAlias.*,
RK_tblInjCodes.*
FROM (
--big query goes...
April 7, 2011 at 10:49 am
could it be something like a missing GO statement, so the DROP/CREATE rolename is part of some stored proc that gets executed?
CREATE PROC MyProc
AS
SELECT 1 from sys.objects
--missing GO
If Exists(somerole)
drop role...
April 7, 2011 at 10:39 am
identity is still exactly what you want, even if you are combining multiple databases together, in my opinion.
One way is to use ranges for the seeds for the identities...
April 7, 2011 at 6:24 am
Viewing 15 posts - 7,786 through 7,800 (of 13,460 total)