I Couldn't Find TRIM Function

Oct 18, 2006

Hi,

I found rtrim and ltrim functions, but I didn't find trim, so should I use rtrim(ltrim(' a ' ))? Am I right?

cheers,

Alessandro Camargo

View 5 Replies


ADVERTISEMENT

Couldn't Find SSMS

Feb 2, 2006

Hi,

I have just installed sql server 2005 enterprise edition. I am totally new to sqlserver. I want to create a database in sql server and access that from my VB.net application. I couldn't find sql server management studio to create a database. can somebody help me with this...

thanks,
Leela

View 3 Replies View Related

I Couldn't Find Appropriate SQL Queries

Feb 6, 2007

Because forum HTML codes are OFF I had to put my question between code tags. Because to tell my question I had to show the database tables and wanted output. I succeeded retrieving the datas but combining these three tables together with SQL or ASP codes is too complex. Please help me determining the table. As I am subscribed to this forum you can ask me anything about my question. I can clarify my question if you need. Your answers will be replied immediately.
(To see my question pls save the codes below as htm file or see it with a wysiwyg editor.)

<p><b><font size="2">tbl_PRODUCTIONS</font></b></p>
<table border="1" width="971" id="table1">
<tr>
<td height="19" width="54"><b><font size="2">fld_DATE</font></b></td>
<td width="161" height="19"><b><font size="2">fld_PRODUCER_UNITCODE</font></b></td>
<td height="19" width="124"><b><font size="2">fld_PRODUCT_CODE</font></b></td>
<td height="19" width="222"><b><font size="2">fld_DAILY_PRODUCTION_PROGRAM</font></b></td>
<td height="19" width="176"><b><font size="2">fld_PRODUCTION_QUANTITY</font></b></td>
<td height="19" width="136"><b><font size="2">fld_STOCK_QUANTITY</font></b></td>
<td height="19" width="52"><b><font size="2">fld_SELL</font></b></td>
</tr>
<tr>
<td width="54" >......</td>
<td width="161" >....</td>
<td width="124">....</td>
<td width="222">....</td>
<td width="176">....</td>
<td width="136">.....</td>
<td width="52">....</td>
</tr>
<tr>
<td width="54" ><font size="2">18.01.2007</font></td>
<td width="161" ><font size="2">IST</font></td>
<td width="124"><font size="2">1.10</font></td>
<td width="222"><font size="2">100</font></td>
<td width="176"><font size="2">115</font></td>
<td width="136"><font size="2">100</font></td>
<td width="52"><font size="2">10</font></td>
</tr>
<tr>
<td width="54" ><font size="2">18.01.2007</font></td>
<td width="161" ><font size="2">IST</font></td>
<td width="124"><font size="2">1.20</font></td>
<td width="222"><font size="2">200</font></td>
<td width="176"><font size="2">190</font></td>
<td width="136"><font size="2">200</font></td>
<td width="52"><font size="2">54</font></td>
</tr>
<tr>
<td width="54" ><font size="2">18.01.2007</font></td>
<td width="161" ><font size="2">ANK</font></td>
<td width="124"><font size="2">2.110.12</font></td>
<td width="222"><font size="2">300</font></td>
<td width="176"><font size="2">350</font></td>
<td width="136"><font size="2">450</font></td>
<td width="52"><font size="2">745</font></td>
</tr>
<tr>
<td width="54" ><font size="2">18.01.2007</font></td>
<td width="161" ><font size="2">ANK</font></td>
<td width="124"><font size="2">12.128.43</font></td>
<td width="222"><font size="2">150</font></td>
<td width="176"><font size="2">150</font></td>
<td width="136"><font size="2">4664</font></td>
<td width="52"><font size="2">55</font></td>
</tr>
<tr>
<td width="54" ><font size="2">18.01.2007</font></td>
<td width="161" ><font size="2">IZM</font></td>
<td width="124"><font size="2">6.142.42</font></td>
<td width="222"><font size="2">100</font></td>
<td width="176"><font size="2">100</font></td>
<td width="136"><font size="2">234</font></td>
<td width="52"><font size="2">77</font></td>
</tr>
<tr>
<td width="54" ><font size="2">18.01.2007</font></td>
<td width="161" ><font size="2">IZM</font></td>
<td width="124"><font size="2">9.86.50</font></td>
<td width="222"><font size="2">125</font></td>
<td width="176"><font size="2">135</font></td>
<td width="136"><font size="2">654</font></td>
<td width="52"><font size="2">80</font></td>
</tr>
<tr>
<td width="54" ><font size="2">18.01.2007</font></td>
<td width="161" ><font size="2">IZM</font></td>
<td width="124"><font size="2">12.43.250</font></td>
<td width="222"><font size="2">75</font></td>
<td width="176"><font size="2">80</font></td>
<td width="136"><font size="2">233</font></td>
<td width="52"><font size="2">101</font></td>
</tr>
<tr>
<td width="54" ><font size="2">19.01.2007</font></td>
<td width="161" ><font size="2">IST</font></td>
<td width="124"><font size="2">1.10</font></td>
<td width="222"><font size="2">100</font></td>
<td width="176"><font size="2">99</font></td>
<td width="136"><font size="2">100</font></td>
<td width="52"><font size="2">10</font></td>
</tr>
<tr>
<td width="54" ><font size="2">19.01.2007</font></td>
<td width="161" ><font size="2">IST</font></td>
<td width="124"><font size="2">1.20</font></td>
<td width="222"><font size="2">200</font></td>
<td width="176"><font size="2">210</font></td>
<td width="136"><font size="2">200</font></td>
<td width="52"><font size="2">54</font></td>
</tr>
<tr>
<td width="54" ><font size="2">19.01.2007</font></td>
<td width="161" ><font size="2">ANK</font></td>
<td width="124"><font size="2">2.110.12</font></td>
<td width="222"><font size="2">300</font></td>
<td width="176"><font size="2">309</font></td>
<td width="136"><font size="2">450</font></td>
<td width="52"><font size="2">745</font></td>
</tr>
<tr>
<td width="54" ><font size="2">19.01.2007</font></td>
<td width="161" ><font size="2">ANK</font></td>
<td width="124"><font size="2">12.128.43</font></td>
<td width="222"><font size="2">150</font></td>
<td width="176"><font size="2">155</font></td>
<td width="136"><font size="2">4664</font></td>
<td width="52"><font size="2">55</font></td>
</tr>
<tr>
<td width="54" ><font size="2">19.01.2007</font></td>
<td width="161" ><font size="2">IZM</font></td>
<td width="124"><font size="2">6.142.42</font></td>
<td width="222"><font size="2">100</font></td>
<td width="176"><font size="2">100</font></td>
<td width="136"><font size="2">234</font></td>
<td width="52"><font size="2">77</font></td>
</tr>
<tr>
<td width="54" ><font size="2">19.01.2007</font></td>
<td width="161" ><font size="2">IZM</font></td>
<td width="124"><font size="2">9.86.50</font></td>
<td width="222"><font size="2">125</font></td>
<td width="176"><font size="2">90</font></td>
<td width="136"><font size="2">654</font></td>
<td width="52"><font size="2">80</font></td>
</tr>
<tr>
<td width="54" ><font size="2">19.01.2007</font></td>
<td width="161" ><font size="2">IZM</font></td>
<td width="124"><font size="2">12.43.250</font></td>
<td width="222"><font size="2">75</font></td>
<td width="176"><font size="2">60</font></td>
<td width="136"><font size="2">233</font></td>
<td width="52"><font size="2">101</font></td>
</tr>
<tr>
<td width="54" ><font size="2">20.01.2007</font></td>
<td width="161" ><font size="2">IST</font></td>
<td width="124"><font size="2">1.10</font></td>
<td width="222"><font size="2">100</font></td>
<td width="176"><font size="2">90</font></td>
<td width="136"><font size="2">100</font></td>
<td width="52"><font size="2">10</font></td>
</tr>
<tr>
<td width="54" ><font size="2">20.01.2007</font></td>
<td width="161" ><font size="2">IST</font></td>
<td width="124"><font size="2">1.20</font></td>
<td width="222"><font size="2">200</font></td>
<td width="176"><font size="2">190</font></td>
<td width="136"><font size="2">200</font></td>
<td width="52"><font size="2">54</font></td>
</tr>
<tr>
<td width="54" ><font size="2">20.01.2007</font></td>
<td width="161" ><font size="2">ANK</font></td>
<td width="124"><font size="2">2.110.12</font></td>
<td width="222"><font size="2">300</font></td>
<td width="176"><font size="2">350</font></td>
<td width="136"><font size="2">450</font></td>
<td width="52"><font size="2">745</font></td>
</tr>
<tr>
<td width="54" ><font size="2">20.01.2007</font></td>
<td width="161" ><font size="2">ANK</font></td>
<td width="124"><font size="2">12.128.43</font></td>
<td width="222"><font size="2">150</font></td>
<td width="176"><font size="2">156</font></td>
<td width="136"><font size="2">4664</font></td>
<td width="52"><font size="2">55</font></td>
</tr>
<tr>
<td width="54" ><font size="2">20.01.2007</font></td>
<td width="161" ><font size="2">IZM</font></td>
<td width="124"><font size="2">6.142.42</font></td>
<td width="222"><font size="2">100</font></td>
<td width="176"><font size="2">120</font></td>
<td width="136"><font size="2">234</font></td>
<td width="52"><font size="2">77</font></td>
</tr>
<tr>
<td width="54" ><font size="2">20.01.2007</font></td>
<td width="161" ><font size="2">IZM</font></td>
<td width="124"><font size="2">9.86.50</font></td>
<td width="222"><font size="2">125</font></td>
<td width="176"><font size="2">140</font></td>
<td width="136"><font size="2">654</font></td>
<td width="52"><font size="2">80</font></td>
</tr>
<tr>
<td width="54" ><font size="2">20.01.2007</font></td>
<td width="161" ><font size="2">IZM</font></td>
<td width="124"><font size="2">12.43.250</font></td>
<td width="222"><font size="2">75</font></td>
<td width="176"><font size="2">90</font></td>
<td width="136"><font size="2">233</font></td>
<td width="52"><font size="2">101</font></td>
</tr>
<tr>
<td width="54" >...</td>
<td width="161" >....</td>
<td width="124">....</td>
<td width="222">....</td>
<td width="176">....</td>
<td width="136">....</td>
<td width="52">....</td>
</tr>
</table>

<p>Â </p>
<p><b><font size="2">tbl_ANNUAL_PRG</font></b></p>
<table border="1" width="552" id="table2">
<tr>
<td width="62"><b><font size="2">fld_YEARS</font></b></td>
<td><b><font size="2">fld_PRODUCER_UNITCODE</font></b></td>
<td><b><font size="2">fld_PRODUCT_CODE</font></b></td>
<td width="177"><b><font size="2">fld_PRODUCTION_PROGRAM</font></b></td>
</tr>
<tr>
<td width="62"><font size="2">2006</font></td>
<td width="161" ><font size="2">IST</font></td>
<td width="124"><font size="2">1.10</font></td>
<td width="177"><font size="2">15000</font></td>
</tr>
<tr>
<td width="62"><font size="2">2006</font></td>
<td width="161" ><font size="2">IST</font></td>
<td width="124"><font size="2">1.20</font></td>
<td width="177"><font size="2">22000</font></td>
</tr>
<tr>
<td width="62"><font size="2">2006</font></td>
<td width="161" ><font size="2">ANK</font></td>
<td width="124"><font size="2">2.110.12</font></td>
<td width="177"><font size="2">35000</font></td>
</tr>
<tr>
<td width="62"><font size="2">2006</font></td>
<td width="161" ><font size="2">ANK</font></td>
<td width="124"><font size="2">12.128.43</font></td>
<td width="177"><font size="2">50000</font></td>
</tr>
<tr>
<td width="62"><font size="2">2006</font></td>
<td width="161" ><font size="2">IZM</font></td>
<td width="124"><font size="2">6.142.42</font></td>
<td width="177"><font size="2">170000</font></td>
</tr>
<tr>
<td width="62"><font size="2">2006</font></td>
<td width="161" ><font size="2">IZM</font></td>
<td width="124"><font size="2">9.86.50</font></td>
<td width="177"><font size="2">12000</font></td>
</tr>
<tr>
<td width="62"><font size="2">2006</font></td>
<td width="161" ><font size="2">IZM</font></td>
<td width="124"><font size="2">12.43.250</font></td>
<td width="177"><font size="2">123000</font></td>
</tr>
<tr>
<td width="62"><font size="2">2007</font></td>
<td width="161" ><font size="2">IST</font></td>
<td width="124"><font size="2">1.10</font></td>
<td width="177"><font size="2">18000</font></td>
</tr>
<tr>
<td width="62"><font size="2">2007</font></td>
<td width="161" ><font size="2">IST</font></td>
<td width="124"><font size="2">1.20</font></td>
<td width="177"><font size="2">25000</font></td>
</tr>
<tr>
<td width="62"><font size="2">2007</font></td>
<td width="161" ><font size="2">ANK</font></td>
<td width="124"><font size="2">2.110.12</font></td>
<td width="177"><font size="2">32000</font></td>
</tr>
<tr>
<td width="62"><font size="2">2007</font></td>
<td width="161" ><font size="2">ANK</font></td>
<td width="124"><font size="2">12.128.43</font></td>
<td width="177"><font size="2">55000</font></td>
</tr>
<tr>
<td width="62"><font size="2">2007</font></td>
<td width="161" ><font size="2">IZM</font></td>
<td width="124"><font size="2">6.142.42</font></td>
<td width="177"><font size="2">190000</font></td>
</tr>
<tr>
<td width="62"><font size="2">2007</font></td>
<td width="161" ><font size="2">IZM</font></td>
<td width="124"><font size="2">9.86.50</font></td>
<td width="177"><font size="2">10000</font></td>
</tr>
<tr>
<td width="62"><font size="2">2007</font></td>
<td width="161" ><font size="2">IZM</font></td>
<td width="124"><font size="2">12.43.250</font></td>
<td width="177"><font size="2">129000</font></td>
</tr>
</table>
<p>Â </p>
<p><b><font size="2">tbl_PRODUCT_GROUPS<br>
(This table gives the names to the product of the tbl_PRODUCTIONS table)</font></b></p>
<table border="1" width="366" id="table3">
<tr>
<td><b><font size="2">fld_PRODUCT_GROUP_CODE</font></b></td>
<td width="175"><b><font size="2">fld_PRODUCT_GROUP_CODE</font></b></td>
</tr>
<tr>
<td width="175"><font size="2">1.10</font></td>
<td width="175"><font size="2">Pencil</font></td>
</tr>
<tr>
<td width="175"><font size="2">1.20</font></td>
<td width="175"><font size="2">Rubber</font></td>
</tr>
<tr>
<td width="175"><font size="2">2.110.12</font></td>
<td width="175"><font size="2">Ruler</font></td>
</tr>
<tr>
<td width="175"><font size="2">12.128.43</font></td>
<td width="175"><font size="2">Pencil Box</font></td>
</tr>
<tr>
<td width="175"><font size="2">6.142.42</font></td>
<td width="175"><font size="2">School Bag</font></td>
</tr>
<tr>
<td width="175"><font size="2">9.86.50</font></td>
<td width="175"><font size="2">Pen</font></td>
</tr>
<tr>
<td width="175"><font size="2">12.43.250</font></td>
<td width="175"><font size="2">Calendar</font></td>
</tr>
</table>
<p>Â </p>
<p><font size="2">These 3 tables are in Oracle. I am trying to access the tables
with an asp page. I succeed to retrieve the values to a page, but processing the
values and joining the tables together is too complex for me. The table I want
is like this. Would you help me creating <b>ASP</b> page and <b>SQL</b> queries
to create this table:</font></p>
<p><font size="2">Parameters to send the asp page that process the SQL queries:<br>
startdate=18.01.2007<br>
finishdate=20.01.2007</font></p>
<p><b><font size="2">The Productions of -18.01.2007-20.01.2007</font></b></p>
<table border="1" width="1066" id="table4">
<tr>
<td><font size="2">Comes From tbl_PRODUCTIONS table</font></td>
<td><font size="2">Comes From tbl_PRODUCT_GROUPS table</font></td>
<td width="155"><font size="2">Comes from tbl_ANNUAL_PRG table</font></td>
<td width="208"><font size="2">Comes from tbl_PRODUCTIONS table summing
each value for each product</font></td>
<td width="179"><font size="2">Comes from tbl_PRODUCTIONS table summing
each value for each product</font></td>
<td width="108"><font size="2">Comes from tbl_PRODUCTIONS retrieving the
values for "finishdate". Not cumulative like other values!</font></td>
<td width="187"><font size="2">Comes from tbl_PRODUCTIONS table summing
each value for each product</font></td>
</tr>
<tr>
<td><b><font size="2">Producer Locations</font></b></td>
<td><b><font size="2">Products</font></b></td>
<td width="155"><font size="2"><b>Annual Production Program</b></font></td>
<td width="208"><font size="2"><b>Production Program for wanted period</b></font></td>
<td width="179"><font size="2"><b>Production Quantity for wanted period</b></font></td>
<td width="108"><font size="2"><b>Stock Quantity</b></font></td>
<td width="187"><font size="2"><b>Selling Quantity for wanted period</b></font></td>
</tr>
<tr>
<td width="119" ><font size="2">IST</font></td>
<td width="61"><font size="2">Pencil</font></td>
<td width="155"><font size="2">18000</font></td>
<td width="208"><font size="2">300</font></td>
<td width="179"><font size="2">304 </font></td>
<td width="108"><font size="2">100</font></td>
<td width="187"><font size="2">30</font></td>
</tr>
<tr>
<td width="119" ><font size="2">IST</font></td>
<td width="61"><font size="2">Rubber</font></td>
<td width="155"><font size="2">25000</font></td>
<td width="208"><font size="2">600</font></td>
<td width="179"><font size="2">590</font></td>
<td width="108"><font size="2">200</font></td>
<td width="187"><font size="2">162</font></td>
</tr>
<tr>
<td width="119" ><font size="2">ANK</font></td>
<td width="61"><font size="2">Ruler</font></td>
<td width="155"><font size="2">32000</font></td>
<td width="208"><font size="2">900</font></td>
<td width="179"><font size="2">1009</font></td>
<td width="108"><font size="2">450</font></td>
<td width="187"><font size="2">2235</font></td>
</tr>
<tr>
<td width="119" ><font size="2">ANK</font></td>
<td width="61"><font size="2">Pencil Box</font></td>
<td width="155"><font size="2">55000</font></td>
<td width="208"><font size="2">450</font></td>
<td width="179"><font size="2">461</font></td>
<td width="108"><font size="2">4664</font></td>
<td width="187"><font size="2">165</font></td>
</tr>
<tr>
<td width="119" ><font size="2">IZM</font></td>
<td width="61"><font size="2">School Bag</font></td>
<td width="155"><font size="2">190000</font></td>
<td width="208"><font size="2">300</font></td>
<td width="179"><font size="2">320</font></td>
<td width="108"><font size="2">234</font></td>
<td width="187"><font size="2">231</font></td>
</tr>
<tr>
<td width="119" ><font size="2">IZM</font></td>
<td width="61"><font size="2">Pen</font></td>
<td width="155"><font size="2">10000</font></td>
<td width="208"><font size="2">375</font></td>
<td width="179"><font size="2">365</font></td>
<td width="108"><font size="2">654</font></td>
<td width="187"><font size="2">240</font></td>
</tr>
<tr>
<td width="119" ><font size="2">IZM</font></td>
<td width="61"><font size="2">Calendar</font></td>
<td width="155"><font size="2">129000</font></td>
<td width="208"><font size="2">225</font></td>
<td width="179"><font size="2">230</font></td>
<td width="108">233</td>
<td width="187"><font size="2">303</font></td>
</tr>
</table>

OS: WinXP Pro
DB: Oracle (Version ?)
Script: ASP

View 4 Replies View Related

No TRIM Function In 2005 - Are You Serious!?

Nov 10, 2005

I cannot believe that there is yet another version of SQL Server without a TRIM function.  So for SQL 2005 (like I've done in 7.0 and 2000) my T-SQL will look like dog poo because I will have to write LTRIM(RTRIM(MyValue)) anytime I want to remove whitespace from both ends of character values instead of just writing TRIM(MyValue).

View 15 Replies View Related

Couldn't Replicate ???

Jan 4, 2006

Hi,

I'm new to replication.
I configured Server named TESTER as publisher & distributer. Create new publication for database named TEST ( type : Transactional ), then Create a new push subcriptions for database TESTREPLICATION ( on the same Server : TESTER). Then I open a table in database TEST to input some data but I couldn't see any tables or data in database TESTREPLICATION ( I chose Continuously, not scheduled).

Yet, after the lunch, I could see the tables, no data. I tried to choose Start Synchronizing but not helped.

Please tell me if I configured incorrectly ?

Thanks,

View 7 Replies View Related

Couldn't Connect To Reports

Feb 6, 2007

Hi,

I'm not able to browse through http://localhost/reports.

When I'm trying to connect it gives me "Server Error in '/Reports' Application."At the same time I'm able to view Reportserver.At the same time I'm able to view Reportserver.(i.e)http://localhost/reportserver

please can anyone suggest me some solution to this problem..
Server Error in '/Reports' Application.


The trust relationship between the primary domain and the trusted domain failed.


Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.SystemException: The trust relationship between the primary domain and the trusted domain failed.


Source Error:





An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:





[SystemException: The trust relationship between the primary domain and the trusted domain failed.
]
System.Security.Principal.NTAccount.TranslateToSids(IdentityReferenceCollection sourceAccounts, Boolean& someFailed) +1167
System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean& someFailed) +42
System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean forceSuccess) +46
System.Security.Principal.WindowsPrincipal.IsInRole(String role) +205
System.Web.Configuration.AuthorizationRule.IsTheUserInAnyRole(StringCollection roles, IPrincipal principal) +120
System.Web.Configuration.AuthorizationRule.IsUserAllowed(IPrincipal user, String verb) +300
System.Web.Configuration.AuthorizationRuleCollection.IsUserAllowed(IPrincipal user, String verb) +191
System.Web.Security.UrlAuthorizationModule.OnEnter(Object source, EventArgs eventArgs) +3403086
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64





Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

View 11 Replies View Related

Which Queries Or Codes Couldn't Use In A Transactions In Sql Server

Feb 21, 2008



May i have a list of Which queries or codes couldn't use in a Transactions in Sql Server ?

View 6 Replies View Related

Why I Couldn't Run The Transfer Database Object Task With SQL Authentication

May 8, 2006

Hi all,

I have created a package to copy 10 tables from a database to another one. I have created a datasource with SQL Authentication mode. And it couldn't run until I changed the datasource connection to Windows Authentication mode. How could it be like that, it's just the authentication mode?

Is there anyone have the right answer for this situation?

View 3 Replies View Related

I Couldn't Access The Secondary Database After I Finished Shipping Configuration

Apr 19, 2006

Dear All

Please I need an urgent help

After i finished all Transaction Log Shipping Configuration.

I tried to use the database in the secondary database but i couldn't access it

i saw it in SQL Managment Studio as (Restoring......)

i tired to make a database snapshot from it , i had a message

Msg 1822, Level 16, State 1, Line 1

The database must be online to have a database snapshot.

Please urgently

View 1 Replies View Related

Cannot Find Either Column Dbo Or The User-defined Function

Oct 14, 2007

 Hi, I have a stored procedure that calls a scalar function.  It works fine on my development database, but on my production database, I get this error when trying to execute the procedure: Cannot find either column "dbo" or the user-defined function or aggregate "dbo.MyFunction", or the name is ambiguous. However, I am able to execute the function outside of the procedure like this: select dbo.MyFunction(0, 0)  Anyone have idea? I can't figure it out.    

View 6 Replies View Related

T-SQL (SS2K8) :: Enhanced Find And Replace Function

Apr 17, 2014

I'm looking for a way to pull off a complex find+replace within some code, as follows:

@step_name = N'SAME - OCF Collins (Tabard)', @command = N'DTSRun /~Z0x5F4F7B0688825E7544AC46CFD664F98AC ', @database_name = N'

We have over 200 variants of the above, but following the same syntax (@step_name, Dbname, @Command etc...

Rules:

1) Note the unique identifier "~Z0x5F4F7B0688825E7544AC46CFD664F98AC". I would like it replaced for whatever is between "@step_name = N'" , and @command = N'DTSRun ; (this will form a filename).

2) Note the 'DTSRun /' string. I'd like that replaced with Dtexec /F "D:MyFileLocationFolderHere" (this folder remains constant).

View 2 Replies View Related

Beginner Question: Find Or Create Function

Jan 18, 2007

I have a table with two columns: siteID (int primary key) and siteName(varchar(50) unique constraint).I am completely new to databases and UDFs and would like to write afunction that looks for a particular siteName and returns the siteID.If the siteName is not found then it would create a record and returnthat record's siteID.I am pretty sure there is a standard way of doing it and have beenlooking for examples, but have yet to find anything on Google.If anyone could point me in the right direction I would be verygrateful - I am still looking and will reply if I find anything.Many thanksJon

View 6 Replies View Related

Find A Function That Returns The Column Width

Mar 3, 2008


Dear all hi,

I would like to create a function that will return to me the width of the column of the table without giving as a parameter the table name. I need it, as I want to exceed my data in this column to the column length. I want to fill the column data with trailing blanks until I reach the column width. The function len returns the length of the data in the column.

I know that If I have the table name I can find the column width through the system tables. I don€™t want this.

Sincerely,
Hellen

View 10 Replies View Related

Script / Function ... To Find Difference B/w 2 Similar Tables

Jul 23, 2005

Hi,I m searching for some Script / Function ... to find difference in datab/w 2 similar tables (exactly same fields structure) in sql 2000.plz update me asap !thanks in advance !

View 2 Replies View Related

How To Find Terms In A File Name: Regular Expression OR A String Function

Oct 15, 2007

hi,

i am using a forEach look to import each file within a folder, but i also need to calculate the dataset related ot these files.
the file are named as:

ff_inbound_20071008_1.csv
ff_inbound_20071008_2.csv


where for file ff_inbound_20071008_1.csv:

ff => flat file
inbound => dataset of this csv
20071008 => date
1=> file count

having in mind that they are store in the variable as a full path:

z:myFlatFilesexportsproj01ff_inbound_20071008_2.csv

i need to extract the dataset and the date for each file.

how can i extract these terms from the file name?


many thanks,

nicolas

View 4 Replies View Related

DB Design :: Filestream Pathname - Cannot Find User Defined Function

Nov 3, 2015

I'm trying to run the query given below but iFile.Pathname is underlined in red.

Query: SELECT top 1 iFile.Pathname AS 'PathName' FROM Videos

Error: Cannot find either column "iFile" or the user-defined function or aggregate "iFile.Pathname", or the name is ambiguous.

Do I need to run a procedure?

View 9 Replies View Related

Cannot Find Either Column Dbo Or The User-defined Function Or Aggregate Dbo.FN_NIVELCOMPETENCIACARGO, Or The Name Is Ambiguo

May 4, 2006

Hello i have this query and I havent been able to solve it

Cannot find either column "dbo" or the user-defined function or aggregate "dbo.FN_NIVELCOMPETENCIACARGO", or the name is ambiguous.

I have tried with dbo and withou dbo, specifyng columns inside it,



Thanks

select a.nmempresa,a.nmtipocompetencia, d.dsnombreciclo, c.dsnombrecargo,a.dstipocompetencia, a.dscatalogo,

b.popeso as PesoTipoCompetencia, f.dsnombrecompetencia as Competencia, e.pocompetencia as PesoCompetencia,

g.DSOPCIONESCALA, g.PESO

from

tgsc_tiposcompetencias a, TGSC_TIPOSCOMPETENCIASxcargo b, tgsc_cargos c, tgsc_ciclos d,

tgsc_competenciasxcargo e, tgsc_competencias f,

(select

dbo.FN_NIVELCOMPETENCIACARGO(a.nmempresa,a.nmciclo, a.nmtipocompetencia,c.nmcargo,f.nmcompetencia)) as g

where a.nmempresa=72 and a.nmciclo=9

and b.nmtipocompetencia=a.nmtipocompetencia

and b.nmcargo=10 and b.nmempresa=72 and b.nmciclo=9

and c.nmcargo=10 and c.nmempresa=72 and c.nmciclo=9 and d.nmciclo=9

and e.nmcargo=10 and e.nmciclo=9 and e.nmempresa=72

and f.nmcompetencia=e.nmcompetencia and f.nmtipocompetencia=a.nmtipocompetencia

and f.nmtipocompetencia=b.nmtipocompetencia

View 7 Replies View Related

Transact SQL :: Function To Find Last Date Of Month One Year Ago - RETURNS ERROR

Apr 28, 2015

I've written sql code which takes a date and finds the Last Day of the Month one year ago. For example,  it takes the date '2015-04-17' and returns the date '2014-04-30'. The code works fine in a query. Now I'm trying to turn this into a function. However, when I try to create the function I get the error:

Operand type clash: date is incompatible with int

Why is this error being returned?

Here is my function:

CREATE FUNCTION dbo.zEOM_LY_D(@Input Date)
       RETURNS date
AS
BEGIN;
  DECLARE @Result date;
  SET @Result =  convert(DATE, DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,dateadd(m, -11, @Input)+1),0)),101)
    RETURN @Result;
END;

View 11 Replies View Related

Couldn't Debug SQL By Step Into Stored Procedure On Server Explorer Of VS2008 (or VS2005) On Remote Machine

Oct 21, 2007

Hi all,


I couldn't debug SQL Server by "Step into Stored Procedure" on Server Explorer of VS2008 (or VS2005) to SQL 2005 Developer on remote Windows Server 2003 machine, it allway issue exception "Unable to start T-SQL Debugging. Could not attach to SQL Server process on 'Server'. Click Help for more information"

1) The environment:
The Client: Windows XP SP2 (WORKGROUP)
Visual Studio 2008 (or VS2005)


The SQL Server Machine: Windows 2003 Server Sp1 (DOMAIN)
SQL Server 2005 Developer

2) User account and Permission login:
I create the same user account for both Client and Domain Server with the same password, i also add that user to "Administrators" group in both machine.

At the SQL Server on Server machine, i added that account to ServerSecurityLogin with 'sysadmin' role already

3) Connection and authentication:
I used "Windows Authentication" for my connection to SQL server, and i checked sure my account of the connection by SQL command

SELECT SYSTEM_USER,
IS_SRVROLEMEMBER ('sysadmin')

4) Firewall:
I checked firewall like MSDN helping (i also tried to test by turn off firewall in both machine)

5) Visual Studio Remote Debugger:
I read "How to: Enable SQL Server 2005 Debugging" on MSDN with comment "The SQL Server can run on the same machine as the application or on a remote machine. If you are debugging T-SQL code only, then no remote setup is required."
so i didn't config Visual Studio Remote Debugger any thing.

Note: If i "Step Into Store Procedure" at Server locally, it works okey, so on at my PC client locally. But if i move debugging from my client to my Server, it occur error "Unable to start T-SQL Debugging. Could not attach to SQL Server process on 'Server'. Click Help for more information"???

If i execute store procedure on Server Explore, it works okey!

Please help me to find out what problem is???

Thanks,
Haiasc

View 2 Replies View Related

Trim() In T-sql?

May 17, 2004

is there a function trimming string such as Trim in vb?

View 2 Replies View Related

(((Trim(Nz

Apr 3, 2008

IN ACCESS
UPDATE 14_Together_final_ICNs INNER JOIN 14_Together_UniqueSKUs ON [14_Together_final_ICNs].SKU = [14_Together_UniqueSKUs].SKU SET [14_Together_final_ICNs].sku_desc = [14_Together_UniqueSKUs].NewDesc
WHERE (((Trim(Nz([NewDesc])))<>""));



THIS IS WHAT I TRY IN SQL SEVER BUT GET A DIFFERNET RESULT

UPDATE [14_Together_final_ICNs]
SET sku_desc = [14_Together_UniqueSKUs].NewDesc
FROM [14_Together_final_ICNs] INNER JOIN
[14_Together_UniqueSKUs] ON [14_Together_final_ICNs].SKU = [14_Together_UniqueSKUs].SKU
WHERE (RTRIM(LTRIM([14_Together_final_ICNs].sku_desc))<> N'')

View 1 Replies View Related

Help Trim Or Len

Jan 29, 2007

Guys/Girls

Have a small problem I have received a load of data in a flat file format and each column has dividend up with a comma. I have stuck the whole row in to its own column.

What I want to do is take the first 12 characters of the row and put them in there own column.

I think I need to use the Len function or the trim function, so can some body point me in the right direction on how to do this.

Regards Lee

View 9 Replies View Related

Trim()

Mar 16, 2007

Okay basic question from the village idiot. How do I return only the date and not the time from a datetime column and also can I return only a set number of digits in a float column?

Thanks in advance peter

The Yak Village Idiot

View 3 Replies View Related

How To TRIM

Aug 9, 2007

Hi I have the below paragraph in my datacolum called 'Description'

Ansmann Powerline 5 Super Fast Charger, Microprocessor controlled desktop charger with discharge function for up to 5 NiCd/NiMH cells, For all NiCd and NiMH rechargable batteries including AA/AAA/C/D/9V, Negative Delta V control, faulty cell detection, defined predischarge, trickle charge, separate status indicator for every charging slot, ultra rapid charging, 230V AC. For UK use. Price for 1 Charger.

How do I take only the sentence upto the first comma in my STORED procedure

(ex:Ansmann Powerline 5 Super Fast Charger)

Advance thanks

Vaishu

View 16 Replies View Related

Query To Find A Value In Column B Based On An Aggregate Function On Column A?

Jul 20, 2005

Hi,Suppose I have a table containing monthly sales figures from my shopbranches:Branch Month Sales-----------------------London Jan 5000London Feb 4500London Mar 5200Cardiff Jan 2900Cardiff Feb 4100Cardiff Mar 3500The question I am trying to ask is this: in which month did each branchachieve its highest sales? So I want a result set something like this:Branch Month----------------London MarCardiff FebI can do a "SELECT Branch, MAX(Sales) FROM MonthlySales GROUP BY Branch" totell me what the highest monthly sales figure was, but I just can't figureout how to write a query to tell me which month corresponded to MAX(Sales).Ideas anyone?Cheers,....Andy

View 5 Replies View Related

Trim An Apostrophe Off Of A Last Name

Apr 16, 2002

we need to cut the aprostrophe out of a name (ie...o'brien, o'leary) to create userid's... can this be done....thanks!

View 1 Replies View Related

Left Trim

Jun 28, 2000

What is the syntax of left triming characters seperated by space.

e.g elsie reed
and i want elsie to go to one field and reed in another field i do not want to use numbers because they don't all have the same numbers but are all seperated by spaces

View 2 Replies View Related

Trim To Space

Nov 9, 2005

What is the best way to trim a string to the space in a select statement? An example string would be:
'asdf and hjkl'

The result would be:
'asdf'

View 1 Replies View Related

UPDATE Using TRIM

Jan 3, 2007

hi guys,

i need to update a column by trimming the right end. i tried many things but its not working. can anyone tell me?

Regards,
David

View 12 Replies View Related

Trim Character

Jul 5, 2007

OK, the problem is like this; say the table is sumthing like this

i have a table 't3' has 3 fields
id(number,2)
date(date/time)
text(varchar,200)

eg. id date text
-----------------------
01 05-jul-07 abcdefghijkl (i want to get rid of the first 6 characters i.e. abcdef)

i want to display 'text' field from t3 table but with the first 6 characters trimmed/removed (i want to get rid of the 6 first characters)

so i did:

select LTRIM(text,6) from t3

but the above code didn't work because LTRIM only trims spaces NOT characters... Is there any way that i can trim off the first 6 characters from every record in the 'text' field?

View 12 Replies View Related

Trim String

Dec 14, 2007



In my report, i have a TextBox which retrieve the result from the database.I am using this code :


=Fields!Category.Value.ToString().Trim(" ").TrimEnd(",").TrimStart(",")

But i am encountering a problem,wherein,when the value contains '&' (ex. Jog & Hop)
the result became Jog&amp;Hop.
What could be wrong with my trim???
Thanks!!

View 1 Replies View Related

TRIM Question?

Mar 14, 2006

"select RTrim(columName) from tableName"

it can change the stirng " abc" to "abc". But I want change the string "a bc" to "abc".

Why the TRIM cannot work ?

How do I do ?Thanks.

View 3 Replies View Related

T-SQL TRIM() Error

Jan 4, 2008



Whan using the TRIM() function in a SELECT we are getting an invalid function error. What gives? I thought TRIM() was T-SQL & not one of Microsoft's SQL "extras".


Thanks!

View 8 Replies View Related







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