久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

t sql中的相對路徑?

Relative path in t sql?(t sql中的相對路徑?)
本文介紹了t sql中的相對路徑?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

如何獲取t sql中的相對路徑?以.sql文件位于D:\temp文件夾為例,我想獲取D文件夾中hello.txt文件的路徑:\temp\App_Data.如何使用相對路徑引用?

How to get the relative path in t sql? Take for example a .sql file is located in the folder D:\temp, I want to get path of the file hello.txt in the folder D:\temp\App_Data. How to use the relative path reference?

假設我正在 SQL 服務器管理工??作室中執行 sql 文件.

Let's say I am executing the sql file inside the SQL server management studio.

推薦答案

服務器正在執行 t-sql.它不知道客戶端從哪里加載文件.您必須在腳本中嵌入路徑.

The server is executing the t-sql. It doesn't know where the client loaded the file from. You'll have to have the path embedded within the script.

DECLARE @RelDir varchar(1000)
SET @RelDir = 'D:\temp\'
...

也許您可以以編程方式將路徑放入 .sql 腳本文件中的 SET 命令中,或者您可以使用 sqlcmd 并將相關目錄作為變量傳入.

Perhaps you can programmatically place the path into the SET command within the .sql script file, or perhaps you can use sqlcmd and pass the relative directory in as a variable.

這篇關于t sql中的相對路徑?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Sql server table usage statistics(Sql server 表使用情況統計)
Getting the last record in SQL in WHERE condition(在 WHERE 條件下獲取 SQL 中的最后一條記錄)
Query to get XML output for hierarchical data using FOR XML PATH in SQL Server(在 SQL Server 中使用 FOR XML PATH 查詢以獲取分層數據的 XML 輸出)
T-SQL IF statement embedded in a sum() function(嵌入在 sum() 函數中的 T-SQL IF 語句)
Table vs Temp Table Performance(表與臨時表性能)
Can#39;t see created tables in Object Explorer - Microsoft SQL Management Studio(在對象資源管理器中看不到創建的表 - Microsoft SQL Management Studio)
主站蜘蛛池模板: 18成人免费观看网站 | 久久久久久成人 | 成年人网站在线免费观看 | 亚洲人成在线观看 | 久久成人一区 | 久久精品国产免费 | 日韩午夜影院 | 久久久久久亚洲 | 黄色大片一级 | 日本精品国产 | 久久久久久久久久久国产 | 日本婷婷| 欧美精品综合 | 日韩av免费在线观看 | 欧美日韩小视频 | 日韩欧美一区二区三区久久婷婷 | 一级肉体全黄裸片 | www.中文字幕 | 亚洲综合五月天婷婷丁香 | 不卡视频在线观看 | 久久久九九 | 一级黄色小视频 | 国产乱码精品一品二品 | 中文有码在线 | 天天干视频 | 亚州av在线| 特黄aaaaaaaaa真人毛片 | 97精品在线视频 | 熟女毛片 | 天堂网亚洲 | 日韩伦理一区 | 国产高清网站 | 亚洲精品色| 久久一区精品 | 91小视频在线观看 | 800av在线播放 | 国产精品二区一区二区aⅴ污介绍 | 午夜精品久久久久久久久久久久 | 国产一区二区三区在线观看视频 | 视频在线一区二区 | 免费福利片 |