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
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.
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?
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
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?
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.
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.
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?
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.
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
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),
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?
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.
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 ...