Transact SQL :: Delivering Data In Xml Format

Apr 23, 2015

I've a requirement to deliver the metadata in the xml format, from the database. when the sp is called.  I am trying to develop a query whos output should be something like belo..I've the below data available in the table 

<Cols>
   <Col1>
    <SrtOrder>0</SrtOrder>
    <Legend>N</Legend>
    <ColName>Employee1</ColName>

[code]....

View 3 Replies


ADVERTISEMENT

Transact SQL :: Scrambled Data In The Defined Format?

Aug 12, 2015

I need to scrambled data for a column which has 9 characters or more and numbers conditions..

1) if the column are all numbers and length of the column is 9 then keep the 1st 3 characters same and the rest 6 numbers should be scrambled by converting each character to ASCII value  then use 5 arthematic opertors to get a new number  then by using substring to get the 6 character value then joining first 3 letters with  6 letter that we have scrambled.

for eg: let say we have 345678900 then first 3 numbers should be same '345' then the rest should be scrambled like this taking '678900'.. the ascii value for this number is 545556574848 then use 5 arthematic operator to get a new value and then we can use substring to get 6 charactor value. and the final out will be adding the first 3 with last 6.

2) if the column has character and numbers, for eg- a2345sd09 then first 3 character will be remained same and then with last 6 characters only the number should be scrambled. last 6 - '45sd09'. here sd will be remain same and all the numbers will be scrambled with different number.and if it has extra character like /'(*&^%' for eg madman06/08 then here keeping the extra character and alphabets only the numbers will be scrambled.

how can i achieve this code?

View 3 Replies View Related

Transact SQL :: Change Data Format In A Table

Jun 4, 2015

I have 900000 rows of data in a table and a sample of it is as shown below.Now I need to convert data into the format shown.

View 6 Replies View Related

Transact SQL :: Format To Store Data In Table

May 10, 2015

I would like to know what is the preferred format for form submissions to a SQL table. 

View 5 Replies View Related

Transact SQL :: Flattening Hierarchical Data In Specific Format

Apr 22, 2015

I have the data in this format

ID        NAME         ParentID
CV1      CV1NAME      CV
CVX1    CVX1NAME    CV1
CVXX1  CVXX1NAME  CVX1
CV2      CV2NAME     CV
CVX2    CVX2NAME    CV2
CVXX2  CVXX2NAME  CVX2

How can i flatten this data into this format

CVID    CVNAME     CVXID   CVXNAME   CVXXID   CVXXNAME
cv1        cv1name  cvx1        cvx1name    cvxx1     cvxx1name
cv2        cv2name  cvx2        cvx2name    cvxx2     cvxx2name

View 4 Replies View Related

Transact SQL :: Select Data From Table With Custom Format

Sep 15, 2015

I want to select custom format from table?

View 7 Replies View Related

Transact SQL :: How To Format A String In A Format Coming From A Table

Jun 4, 2015

I have a table which stores date-of-birth in varchar 19861231(yyyymmdd). A view takes this data. I want to store this date as mmddyyyy in the view. How can we achieve this?

View 18 Replies View Related

Transact SQL :: Cast Or Convert Date In Format YYYY-MM-DD Into New Format Of MM/DD/YYYY?

Nov 27, 2015

I have a table that has a DATE field named. AccountingDate that is in the format YYYY-MM-DD. It's not a VARCHAR field. I simply want to convert this date field into the format MM/DD/YYYY and call it New_Accounting_Date.

I've played with various combinations of CAST & CONVERT but haven't been able to get it to work.

Below is my latest effort which returns the error:

Incorrect syntax near the keyword 'as'

What code would work to return a MM/DD/YYYY value for New_Accounting_Date?

Select GLBATCH.AccountingDate,
convert(GLBATCH.AccountingDate as date),101) AS New_Accounting_Date
from GLBATCH

View 11 Replies View Related

Delivering One Reports To Two People

Oct 3, 2007



I have a report that need to be delivered to two different persons.

It has 10 columns. But one of them is not supposed to be seen by one person. Can I do this without creating another report and delivering two different reports although they are almost the same?

Thanks

View 5 Replies View Related

Delivering A Large Nu Of Reports Together

Nov 2, 2007



Hi,

I have created bunch of reports using SSRS. Now I want to deliver all of these reports together. I can use data driven subscription in Report Manager. But that feature allows to deliver one report at a time. Can anyone tell me how to deliver all reports together?
Requirement is reports should be delivered to dirrent departments. These reports have been parameterized.

Thanks


P/S ;

I found this one on MSDN. But I'm not sure whether I can change this and use for multiple reports subscription. I dont hv a good knowledge on C# or VB.

http://msdn2.microsoft.com/en-us/library/microsoft.wssux.reportingserviceswebservice.rsmanagementservice2005.reportingservice2005.createdatadrivensubscription.aspx

View 6 Replies View Related

Error Delivering Subscription Email

Mar 19, 2008

Env: SQL Server 2000 Reporting Services - 8.00.1042.00 on Windows Server 2003 SP1 - Microsoft Windows NT 5.2.3790.0

I configured a report subscription to send an email out, but I did not realize that the mail send was tied to my account. When someone removed my windows login from the local admin group, the report delivery errored with:

"Failure sending mail: The permissions granted to user '<Domain><user>' are insufficient for performing this operation."

My login has been reinstated, but how do I configure the send mail to use a different account? Note that he report server is running under the "NT AuthorityNetworkService" account (unfortunately). I'm hoping I don't have to deal with the unattended execution account because the docs on that are awkward.

TIA,

-Peter

View 4 Replies View Related

Delivering The Same Report To Multiple Subscribers

Feb 7, 2008

I am trying to figure out some scalability-related requirements for the project I'm working on, and unfortunately I cannot find out an answer to one of the questions by test-running, so I have to ask it in hope that someone has a definitive answer.

When two - or, more - different (distinct) users/subscribers
running the Report Manager from two different machines
[independently of each other] create their two subscriptions
with almost exactly the same parameters (same report name, same report rendering format, to be delivered via email at 6:00 AM every day, etc.),
and the only difference between those subscriptions is in email addresses (to whom the report shall be delivered)...
... when those subscriptions get executed at 6:00 AM,
are they executed only once (because those 2 subscriptions are the same except by whom they were created and to whom they should be delivered),
OR
is each of them executed separately?


In other words, if multiple users create absolutely the same subscriptions (except for a parameter to whom they should be delivered), how many times does the Report Server run that report?


Thank you very much.

View 1 Replies View Related

Delivering Multi Parameter Reprots By DD Subscription

Nov 15, 2007



HI All,

If I use more than one parameters in my reports, still would I be able to deliver those reports by Data Driven subscriptions?

Thanks

View 1 Replies View Related

A Sample Programm For Delivering A Large Nu Of Reports

Nov 2, 2007



Hi,

I have created bunch of reports using SSRS. Now I want to deliver all of these reports together. I can use data driven subscription in Report Manager. But that feature allows to deliver one report at a time. Can anyone tell me how to deliver all reports together?
Requirement is reports should be delivered to dirrent departments. These reports have parameterized. Can anyone tell me how to do this? at least if somebody provides sample codes I really appriciate.

Thanks

p/s ;

I found this one on MSDN. But I'm not sure whether I can change this and use for multiple reports subscription. I dont hv a good knowledge on C# or VB. I really aapriciate if anyone can modify this code for multiple reports deploying.

http://msdn2.microsoft.com/en-us/library/microsoft.wssux.reportingserviceswebservice.rsmanagementservice2005.reportingservice2005.createdatadrivensubscription.aspx

View 5 Replies View Related

I Want Ot Convert Xml Data Format Into The General Data Format

Jun 9, 2006

hi siri have table hh .it has two columnsone is hhno is integer datatype another hhdoc is xml data type likehh tablehhno hhdoc---------------------------------------------------------------------------------------------100<suresh>sfjfjfjfjf</suresh>....................................101<ramesh>hhfhfhf</ramesh>..................................how to convert the xml data format into the general data format plshelp me with examples

View 1 Replies View Related

Transact SQL :: How To Convert Hmm Int To Hh:mm:ss Tt Format

Jun 30, 2015

I have these values 

100
900
1300

in int format , now i want to convert them to hh:mm:ss tt format in sql. How can this be done ? I have used this query

declare @nvsDateTime int;set @nvsDateTime = 100;
select convert(datetime, convert(varchar(10),CURRENT_TIMESTAMP,120)  + ' ' + stuff(ltrim(@nvsDateTime),3,0,':') ) AS Answer

But it is only converting 100 and 1300 but not 900 and giving me this error :

Msg 242, Level 16, State 3, Line 2

The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.

View 7 Replies View Related

Transact SQL :: Date Format Conversion

Jul 24, 2015

Hoe to convert date format

My table contains date as " 13FEB2015:08:54:45 " need to be change in datetime or date.

View 10 Replies View Related

Transact SQL :: Date In MMDDYYYY Format

Nov 17, 2015

I need my dates to be in mmddyyyy format, if I use the below syntax it shows the dates in yyyymmdd format, what should I do differently?

Declare @D1 Date, @D2 Date

Set @D1 = '11/01/2015'
Set @D2 = '11/14/2015'

Print @D1
Print @D2

And the output this produces is:

2015-11-01
2015-11-14

View 9 Replies View Related

Transact SQL :: Converting Varchar Into Different Format

Jun 22, 2015

I have a varchar(512) data type on my INVOICE_DATE field and it is in the following format DD/MM/YYYY.

I need it to be in MM/DD/YYYY and have tried with no luck.

SELECT CONVERT(VARCHAR(512), INVOICE_DATE, 101) AS [MM/DD/YY]
FROM F0AInvoices_Tags

This does not swap the numbers as I would have hoped for reporting purposes.

View 8 Replies View Related

Transact SQL :: How To Convert CCYYMMDDHHMMSS To Datetime Format

Aug 20, 2015

I have a data column coming in from a 3rd party vendor in the format of CCYYMMDDHHMMSS. How can I convert this data to a [datetime] format?

CAST(CAST([TransactionDate] AS CHAR(14)) AS datetime)

Is that correct?

View 7 Replies View Related

Transact SQL :: Convert 1/2 Into Half Day Or 4 Hours Format

Sep 21, 2015

I'm developing one leave application form in that I've declared "No of days"column as nvarchar type..If the user taking half(1/2) day leave then have to covert that 1/2 into 4  hours itseems..since I'm trying to display the table data on datagridview while displaying that half day in gridview again it has to conver 4 hours into 1.2 format..

My Table design:
 Create table Leave_Form
(
  Employee_id int primary key,
  Emp_Date date,
  Emp_name nvarchar(50),

[Code] ....

Windows form:

View 8 Replies View Related

Transact SQL :: How To Format Bytes From A 4 Byte Integer

Nov 23, 2015

Given a 4 byte integer, how to extract each individual byte and format with a period separating them? As an example, if MSB is 1, followed by 2, then 3 then 4 then how can the four bytes from this integer be formatted and displayed as 1.2.3.4?

View 15 Replies View Related

Transact SQL :: How To Find If Email Is Of Correct Format

Aug 13, 2015

I am getting email from the end client and i need to validate in sql query.

View 3 Replies View Related

Transact SQL :: Format File For Bulk Insert

May 16, 2012

I need fmt(format ) file for below values

“Stuid”,”Stuname”,”Class”,”DOJ”,”English”,”Math”,”Science”
"S1","Ram","10/31/2011,Monday",40,32,50
"S2","Bala","10/31/2011,Monday",50,45,69
"S3","Sam","10/31/2011,Monday",74,78,79
"S4","Jon","10/31/2011,Monday",65,58,89
"S5","Jos","10/31/2011,Monday",41,25,69
"S6","Jim","10/31/2011,Monday",74,41,41
"S7","Jack","10/31/2011,Monday",98,57,47
"S8","Sate","10/31/2011,Monday",87,73,45
"S9","Brb","10/31/2011,Monday",47,89,65
"S10","Jom","10/31/2011,Monday",14,100,47

View 15 Replies View Related

Transact SQL :: Standard And Correct Cursor Format

Aug 12, 2015

I have a table which is a configuration table, I have declared cursors whereby the cursor doesn't get to all the rows in the configuration table even though there is no where clause in the select statement and the cursor ought to loop/go through every single row. Changed the cursor to the below and it started to go through all rows.

DECLARE XXX CURSOR LOCAL FORWARD_ONLY STATIC READ_ONLY TYPE_WARNING FOR

Now with the definition above, I am now having a situation whereby a column in row 1 which is a bit data type and has a value of 0, then the cursor gets to row 2 the same column but with a value of 1 and an if statement in the cursor saying

IF @row2columnX = 0 set @myval = 99

For some reason within the cursor the IF statement is being implemented even though the value in row2 columnX is = 1

I find it so weird. Is there a database property that affects the way cursors react or is there something that I am doing incorrectly ? Lastly, I would like to have a simple cursor template which simply goes through a configuration table or any table.

View 11 Replies View Related

Transact SQL :: Date Format Conversion In Table

May 20, 2015

I have a data in table like   COLA = '200909' and COLB ='092009'

how to convert it to YYYY-MM format 

COLA = 2009-Sept
COLB =Sept-2009

View 8 Replies View Related

Transact SQL :: FORMAT Command Failure On Time

Oct 4, 2015

The first gives null (on sql 2014); the second works.  why?

select format(cast('07:35' as time(0)), N'hh:mm')
select format(cast('07:35' as datetime2(0)), N'hh:mm')

View 9 Replies View Related

Transact SQL :: Check Date Format Is Dd/mm/yyyy

Nov 2, 2015

Is it possible to check if  the date has been formatted as dd/mm/yyyy i.e. something like this...

if (@EnterDate <> dd/mm/yyyyy )
SET @message = 'date not in the correct format' 

View 4 Replies View Related

Transact SQL :: Server Date Format Conversion

May 12, 2015

I am facing an issue

1:- From Source system ,I am getting dates like --- 

2014-Q3
2014-Q2
2014-09

As per my requirement, I need to convert this time to dates like 

1:- 2014-Q3  ---   last day of quarter 3 of 2014 .  
2: 2014 -02 -- last day of feb 2014

Converting such format  to the dates I expect...

View 8 Replies View Related

Transact SQL :: Display Normal General Date Format

Jul 30, 2015

I've come accross this code and need to alter it to display a normal General Date format.

CASE WHEN p.BIRTHDTTM IS NULL THEN ''
ELSE RIGHT('0' + LTRIM(CONVERT(VARCHAR(20), BIRTHDTTM, 113)) , 20)
END AS BIRTHDTTM

The original data (which is a DOB field) looks like this

1936-08-14 00:00:00.000

And the code above is turning it into this which is good but means I cannot then format in SSRS

14 Aug 1936 00:00:00

So ideally I'd like the code above to be altered so that it gives me

14/08/1936

View 14 Replies View Related

Transact SQL :: Convert Date Into Server Default Format

Jul 27, 2015

I have to varchar columns that contain date and time columns.

Date                    Time
22-06-2015          12:28:29

My output that I want:

Date
2015-06-22 12:28:29

Is there a function that I can convert the date format like I want.

View 8 Replies View Related

Transact SQL :: Create Table Named With Ending Date-time Format

Jun 25, 2015

what would be the TSQL in trying to create a new table with date-time format ending via a select into like:

select
*
into tblResults_
+
SELECT
CONVERT(VARCHAR(10),GETDATE(),112)
+
'_'
+
REPLACE(CONVERT(VARCHAR(10),GETDATE(),108),':','_')
from qryResult

View 3 Replies View Related

Transact SQL :: Pass Parameter To Convert Function To Format Decimal Precision Dynamically?

Nov 4, 2015

I want to change decimal precision dynamically without rounding value

For example

10.56788 value for 2 decimal precision is 10.56.
10.56788 value for 3 decimal precision is 10.567.
---CASE 1 without dynamic parameter---------
DECLARE @DECIMALVALUE AS tinyint
SELECT CONVERT(DECIMAL(10,2),500000.565356) As Amount

[Code] ....

I am getting error as follows......

Msg 102, Level 15, State 1, Line 3
Incorrect syntax near '@DECIMALVALUE'

This decimal precision format value will vary  company to company ...

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved